New Homebridge Plug-in via MakerAPI

Can you explain what youā€™re asking?

Like expose all my homebridge added devices to hubitat

Not possible. There have been people saying that was a project they had in mind years ago, but nothing has ever come of it. Seems it must not be possible or feasible for some reason beyond what I understand.

The closest thing (and itā€™s barely close) was a project to create an application to take the place of an Apple device to run HomeKit automations (which Iā€™m certain Apple WOULD have a problem with that kind of reverse engineering). They seem to be fine with Homebridge because thereā€™s been no effort to shut it down or cripple it in many years, but taking away Apple TV, iPad and HomePod sales would be crossing a line they may not accept.

I read you can use virtual devices to trigger on HomeKit automations. You know a link to a tutorial on how to do that?

Also, could I pay you to edit some code? Iā€™m trying to make the wink relay show separate relays so it translates in your app.

It doesnā€™t seem too hard, if I had a clue on how. He said I could update the driver for a parent child, whatever that means

Start with Homebridge. First post in this thread. Then create virtual switches in HE. Add them to Homebridge and then create HomeKit automations.

If you want one way control (HE >HomeKit Device), you need two automations.

Example:
ā€¢ HE virtual switch turns ON > HomeKit Device turns ON

ā€¢ HE virtual switch turns OFF > HomeKit Device turns OFF

If you want a two way sync, then you need four HomeKit Automations per device.

Example 2:

ā€¢ HE virtual switch turns OFF > HomeKit Device turns OFF

ā€¢ HE virtual switch turns ON > HomeKit Device turns ON

ā€¢ HomeKit Device turns OFF > HE virtual switch turns OFF

ā€¢ HomeKit Device turns ON > HE virtual switch turns ON

Example 3 (contact and motion sensors):

ā€¢ HomeKit Device active or open > HE virtual switch turns ON

ā€¢ HomeKit Device Inactive or closed > HE virtual switch turns OFF

Iā€™m not a developer. Sorry, but youā€™ll need to learn to do it, or seek assistance from someone who is willing and able.

Thank you.

1 Like

I reviewed the devices that were not in sync this morning via the Hubitat web control - it seems that my hub is showing the devices as on when it is actually off. I am not sure who to get help on that but perhaps this issue is not a Homebridge or Plug-In issue after all?

I was having a similar issue with z-wave devices. I found that I couldnā€™t control one of my older z-wave dimmers from the device page. I reset the power to the device, hit configure, and it began working again for a couple days but that was all. I ended up replacing it with a z-wave plus dimmer and havenā€™t had any more issues.

1 Like

@dan.t this is the same issue I have as well.

AppleTV Gen4 13.1
Multiple iPhones running 12.4, 12.4.1 and 13.1
Hubitat at latest firmware
RPi updated to latest and greatest
NOde.js 12.0.1 with latest updates
Homebridge update to current release
Homebridge MakerAPI current release

@aaron, what do the devices show in Hubitat when the state is wrong in the Home app. With what @walksonair found, it might be that it is not Homebridge that shows the wrong status

They show on, active or unlocked. Seems like it isnā€™t getting updates from MakerAPI.

Sorry, but I need the answer to be a bit more clear....
Device XYZ shows on on the Home App and off in HE? And you donā€™t see any errors in the Homebridge logs?

@dan.t is there any chance of getting buttons to work with this?

Pretty much the only thing I don't have working are these types of devices.

Thanks for all you do!

I have buttons working without the caveat you canā€™t do long presses.

I have this waiting in a commit, but I haven't submitted a pull request to Dan as people are having the issue with dimmers. I'm not sure it's good to add a new feature when there are unsolved issues.

You can submit the pull request, that shouldn't be an issue.

Done.

Andrew

1 Like

@dan.t Hi, I had another sync issue. The hub seemed to fine as shown on its web interface so I restarted Homebridge with the PM2 restart all command and it's working/syncing again just fine. Not sure what is causing this...trying to get you as many data points to help. The logs are also more populated now:

(node:5544) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:457) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:457) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(node:459) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:459) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(node:429) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:429) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(node:15697) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:15756) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:15756) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
[9/21/2019, 7:50:50 PM] [Hubitat hhm:0.2.17] GET ERROR:  { path: '/devices', method: 'GET' } '<!doctype html>\n' +
  '<html lang="en">\n' +
  '\n' +
  '<head>\n' +
  '    <meta charset="utf-8">\n' +
  '    <meta http-equiv="X-UA-Compatible" content="IE=edge">\n' +
  '    <meta name="description" content="">\n' +
  '    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">\n' +
  '    <title>Hubitat Starting Up</title>\n' +
  '    <meta name="mobile-web-app-capable" content="yes">\n' +
  '    <link rel="apple-touch-icon" sizes="180x180" href="/ui2/images/apple-touch-icon.png">\n' +
  '    <link rel="icon" type="image/png" sizes="32x32" href="/ui2/images/favicon-32x32.png">\n' +
  '    <link rel="icon" type="image/png" sizes="16x16" href="/ui2/images/favicon-16x16.png">\n' +
  '    <link rel="icon" sizes="192x192" href="/ui2/images/favicon.ico">\n' +
  '    <link rel="manifest" href="/ui2/images/site.webmanifest">\n' +
  '    <link rel="mask-icon" href="/ui2/images/safari-pinned-tab.svg" color="#5bbad5">\n' +
  '    <link rel="shortcut icon" href="/ui2/images/favicon.ico">\n' +
  '    <meta name="msapplication-TileColor" content="#da532c">\n' +
  '    <meta name="msapplication-config" content="/ui2/images/browserconfig.xml">\n' +
  '    <meta name="theme-color" content="#ffffff">\n' +
  '    <link rel="shortcut icon" href="/ui2/images/favicon.ico">\n' +
  '    <style>\n' +
  '        @font-face {\n' +
  "            font-family: 'Material Icons';\n" +
  '            font-style: normal;\n' +
  '            font-weight: 400;\n' +
  '            src: url(/ui2/css/fonts/MaterialIcons-Regular.eot);\n' +
  '            /* For IE6-8 */\n' +
  "            src: local('Material Icons'), local('MaterialIcons-Regular'), url(/ui2/css/fonts/MaterialIcons-Regular.woff2) format('woff2'), url(/ui2/css/fonts/MaterialIcons-Regular.woff) format('woff'), url(/ui2/css/fonts/MaterialIcons-Regular.ttf) format('truetype');\n" +
  '            font-display:block;\n' +
  '        }\n' +
  '        @font-face {\n' +
  "          font-family: 'hubitat';\n" +
  "          src:  url('/ui2/css/fonts/hubitat.eot?roox2j');\n" +
  "          src:  url('/ui2/css/fonts/hubitat.eot?roox2j#iefix') format('embedded-opentype'),\n" +
  "            url('/ui2/css/fonts/hubitat.woff2?roox2j') format('woff2'),\n" +
  "            url('/ui2/css/fonts/hubitat.ttf?roox2j') format('truetype'),\n" +
  "            url('/ui2/css/fonts/hubitat.woff?roox2j') format('woff'),\n" +
  "            url('/ui2/css/fonts/hubitat.svg?roox2j#hubitat') format('svg');\n" +
  '          font-weight: normal;\n' +
  '          font-style: normal;\n' +
  '          font-display: block;\n' +
  '        }\n' +
  '        html {\n' +
  '            -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape while allowing user zoom */\n' +
  '        }\n' +
  '    </style>\n' +
  '    <link rel="stylesheet" href="/ui2/css/jquery.dataTables.min.css">\n' +
  '    <link rel="stylesheet" href="/ui2/css/material.min.css">\n' +
  '    <link rel="stylesheet" href="/ui2/css/styles.min.css">\n' +
  '    <script src="/ui2/js/jquery-3.4.0.min.js "></script>\n' +
  '    <script type="text/javascript ">\n' +
  `        window.jQuery || document.write("<script src='/ui2/js/jquery-3.4.0.min.js'> <\\ / script > ");\n` +
  '    </script>\n' +
  '    <script src="/ui2/js/jquery.dataTables.min.js "></script>\n' +
  '    <script src="/ui2/js/material.min.js "></script>\n' +
  '    <script src="/ui2/js/hubitat.min.js"></script>\n' +
  '    <script src="/ui2/js/success-compiled.js"></script>\n' +
  '    <link rel="stylesheet" href="/ui2/css/sumoselect.min.css"/>\n' +
  '    <script src="/ui2/js/jquery.sumoselect.min.js"></script>\n' +
  '    <script src="/ui2/js/moment.min.js"></script>\n' +
  '    <script src="/ui2/js/vue.min.js"></script>\n' +
  '    <script src="/ui2/js/webcomponents-bundle.js"></script>\n' +
  '    <script src="/ui2/js/vue-hub.min.js"></script>\n' +
  '    <script>\n' +
  '        var stripHtml = function(html) {\n' +
  '            if(html) {\n' +
  "                return html.replace(/<(?:.|\\n)*?>/gm, '')\n" +
  '            }\n' +
  '        }\n' +
  '        $(document).ready(function() {\n' +
  '            console.log("Jquery Loaded");\n' +
  '        });\n' +
  '    </script>\n' +
  '    <style>\n' +
  '    .mdl-layout__content { opacity:0 }\n' +
  '    .mdl-grid:focus { outline: none; }\n' +
  '    </style>\n' +
  '\n' +
  '    <style>\n' +
  '       .mdl-layout--fixed-drawer>.mdl-layout__content {\n' +
  '        margin-left:0px;\n' +
  '       }\n' +
  '       .mdl-layout--fixed-drawer.is-upgraded:not(.is-small-screen)>.mdl-layout__header {\n' +
  '            margin-left: 0px;\n' +
  '            width: 100%;\n' +
  '        }\n' +
  '    </style>\n' +
  '</head>\n' +
  '\n' +
  '<body>\n' +
  '<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">\n' +
  '    <main class="mdl-layout__content logs-console logs-console-full">\n' +
  '        <div class="mdl-grid" style="outline:none;">\n' +
  '            <div class="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--6-col" style="margin:0 auto">\n' +
  '                <div class="mdl-card__title">\n' +
  '                    <h5>Hubitat Elevation<sup>&reg;</sup></h5>\n' +
  '                    <p>Your hub is starting up. Please wait...</p>\n' +
  '                    <img src="/ui2/images/HubitatStartup.gif" style="width:100%;max-width:300px;">\n' +
  '                    <div id="p1" class="mdl-progress mdl-js-progress"></div>\n' +
  '                    <div id="hub-init-div"></div>\n' +
  '                    <p>If you are seeing this screen for an extended period of time, please contact Support.  For assistance, email <a href="mailto:support@hubitat.com">support@hubitat.com</a> or go to <a target="_blank" href="http://community.hubitat.com">community.hubitat.com</a>.</p>\n' +
  '                </div>\n' +
  '            </div>\n' +
  '        </div>\n' +
  '    </main>\n' +
  '    <footer class="mdl-mini-footer ">\n' +
  '    \n' +
  '    <div class="mdl-mini-footer__right-section ">\n' +
  '        <ul class="mdl-mini-footer__link-list ">\n' +
  '            <li><a href="/tos" target="_blank">Terms of Service</a></li>\n' +
  '            <li><a href="https://docs.hubitat.com/index.php?title=" target="_blank">Documentation</a></li>\n' +
  '            <li><a href="https://community.hubitat.com" target="_blank">Community</a></li>\n' +
  '            <li><a href="mailto:support@hubitat.com">Support</a></li>\n' +
  '            <li><a href="https://hubitat.com" target="_blank">Copyright 2019 Hubitat, Inc.</a></li>\n' +
  '        </ul>\n' +
  '    </div>\n' +
  '</footer>\n' +
  '<script>\n' +
  '    window.onload = function(){\n' +
  "        $('.mdl-layout__content').css('opacity', 1)\n" +
  '        $(".mdl-layout__header-row .mdl-spinner").hide()\n' +
  '        document.title = stripHtml(document.title)\n' +
  "        var grid = document.getElementsByClassName('mdl-grid')[0]\n" +
  '        if (grid) {\n' +
  `            grid.setAttribute('tabindex', "-1")\n` +
  '            grid.style.outline = "0px solid tranparent";\n' +
  '            grid.focus()\n' +
  '        }\n' +
  '    };\n' +
  '</script>\n' +
  '\n' +
  '</div>\n' +
  '</body>\n' +
  '<script>\n' +
  '    var checkStartupStatus = function () {\n' +
  '        $.ajax({\n' +
  '            type: "GET",\n' +
  '            url: "/hubStatus",\n' +
  '            success: function (response) {\n' +
  "                $('#hub-init-div').html(response.serverInitPercentage);\n" +
  "                var p1 = document.querySelector('#p1');\n" +
  `                if (p1.MaterialProgress) p1.MaterialProgress.setProgress(parseInt(response.serverInitPercentage.split(': ')[1].replace("%","")));\n` +
  '\n' +
  '                if (response.status == "running") {\n' +
  '                    setTimeout(reloadPage, 500);\n' +
  '                }\n' +
  '                else {\n' +
  '                    setTimeout(checkStartupStatus, 2000);\n' +
  '                }\n' +
  '            },\n' +
  '            error: function () {\n' +
  '                setTimeout(checkStartupStatus, 2000);\n' +
  '            }\n' +
  '        });\n' +
  '    }\n' +
  '\n' +
  '    var reloadPage = function() {\n' +
  '        location.reload();\n' +
  '    }\n' +
  '    $(document).ready( function() {\n' +
  "    var p1 = document.querySelector('#p1');\n" +
  '    if (p1.MaterialProgress) {\n' +
  "    document.querySelector('#p1').addEventListener('mdl-componentupgraded', function() {\n" +
  '                    this.MaterialProgress.setProgress(0);\n' +
  '                });\n' +
  '                }\n' +
  '        checkStartupStatus();\n' +
  '    })\n' +
  '    </script>\n' +
  '</html>\n'
[9/21/2019, 7:50:50 PM] [Hubitat hhm:0.2.17] Received an error trying to get the device summary information from Hubitat. <!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
    <title>Hubitat Starting Up</title>
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="apple-touch-icon" sizes="180x180" href="/ui2/images/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/ui2/images/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/ui2/images/favicon-16x16.png">
    <link rel="icon" sizes="192x192" href="/ui2/images/favicon.ico">
    <link rel="manifest" href="/ui2/images/site.webmanifest">
    <link rel="mask-icon" href="/ui2/images/safari-pinned-tab.svg" color="#5bbad5">
    <link rel="shortcut icon" href="/ui2/images/favicon.ico">
    <meta name="msapplication-TileColor" content="#da532c">
    <meta name="msapplication-config" content="/ui2/images/browserconfig.xml">
    <meta name="theme-color" content="#ffffff">
    <link rel="shortcut icon" href="/ui2/images/favicon.ico">
    <style>
        @font-face {
            font-family: 'Material Icons';
            font-style: normal;
            font-weight: 400;
            src: url(/ui2/css/fonts/MaterialIcons-Regular.eot);
            /* For IE6-8 */
            src: local('Material Icons'), local('MaterialIcons-Regular'), url(/ui2/css/fonts/MaterialIcons-Regular.woff2) format('woff2'), url(/ui2/css/fonts/MaterialIcons-Regular.woff) format('woff'), url(/ui2/css/fonts/MaterialIcons-Regular.ttf) format('truetype');
            font-display:block;
        }
        @font-face {
          font-family: 'hubitat';
          src:  url('/ui2/css/fonts/hubitat.eot?roox2j');
          src:  url('/ui2/css/fonts/hubitat.eot?roox2j#iefix') format('embedded-opentype'),
            url('/ui2/css/fonts/hubitat.woff2?roox2j') format('woff2'),
            url('/ui2/css/fonts/hubitat.ttf?roox2j') format('truetype'),
            url('/ui2/css/fonts/hubitat.woff?roox2j') format('woff'),
            url('/ui2/css/fonts/hubitat.svg?roox2j#hubitat') format('svg');
          font-weight: normal;
          font-style: normal;
          font-display: block;
        }
        html {
            -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape while allowing user zoom */
        }
    </style>
    <link rel="stylesheet" href="/ui2/css/jquery.dataTables.min.css">
    <link rel="stylesheet" href="/ui2/css/material.min.css">
    <link rel="stylesheet" href="/ui2/css/styles.min.css">
    <script src="/ui2/js/jquery-3.4.0.min.js "></script>
    <script type="text/javascript ">
        window.jQuery || document.write("<script src='/ui2/js/jquery-3.4.0.min.js'> <\ / script > ");
    </script>
    <script src="/ui2/js/jquery.dataTables.min.js "></script>
    <script src="/ui2/js/material.min.js "></script>
    <script src="/ui2/js/hubitat.min.js"></script>
    <script src="/ui2/js/success-compiled.js"></script>
    <link rel="stylesheet" href="/ui2/css/sumoselect.min.css"/>
    <script src="/ui2/js/jquery.sumoselect.min.js"></script>
    <script src="/ui2/js/moment.min.js"></script>
    <script src="/ui2/js/vue.min.js"></script>
    <script src="/ui2/js/webcomponents-bundle.js"></script>
    <script src="/ui2/js/vue-hub.min.js"></script>
    <script>
        var stripHtml = function(html) {
            if(html) {
                return html.replace(/<(?:.|\n)*?>/gm, '')
            }
        }
        $(document).ready(function() {
            console.log("Jquery Loaded");
        });
    </script>
    <style>
    .mdl-layout__content { opacity:0 }
    .mdl-grid:focus { outline: none; }
    </style>

    <style>
       .mdl-layout--fixed-drawer>.mdl-layout__content {
        margin-left:0px;
       }
       .mdl-layout--fixed-drawer.is-upgraded:not(.is-small-screen)>.mdl-layout__header {
            margin-left: 0px;
            width: 100%;
        }
    </style>
</head>

<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
    <main class="mdl-layout__content logs-console logs-console-full">
        <div class="mdl-grid" style="outline:none;">
            <div class="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--6-col" style="margin:0 auto">
                <div class="mdl-card__title">
                    <h5>Hubitat Elevation<sup>&reg;</sup></h5>
                    <p>Your hub is starting up. Please wait...</p>
                    <img src="/ui2/images/HubitatStartup.gif" style="width:100%;max-width:300px;">
                    <div id="p1" class="mdl-progress mdl-js-progress"></div>
                    <div id="hub-init-div"></div>
                    <p>If you are seeing this screen for an extended period of time, please contact Support.  For assistance, email <a href="mailto:support@hubitat.com">support@hubitat.com</a> or go to <a target="_blank" href="http://community.hubitat.com">community.hubitat.com</a>.</p>
                </div>
            </div>
        </div>
    </main>
    <footer class="mdl-mini-footer ">
    
    <div class="mdl-mini-footer__right-section ">
        <ul class="mdl-mini-footer__link-list ">
            <li><a href="/tos" target="_blank">Terms of Service</a></li>
            <li><a href="https://docs.hubitat.com/index.php?title=" target="_blank">Documentation</a></li>
            <li><a href="https://community.hubitat.com" target="_blank">Community</a></li>
            <li><a href="mailto:support@hubitat.com">Support</a></li>
            <li><a href="https://hubitat.com" target="_blank">Copyright 2019 Hubitat, Inc.</a></li>
        </ul>
    </div>
</footer>
<script>
    window.onload = function(){
        $('.mdl-layout__content').css('opacity', 1)
        $(".mdl-layout__header-row .mdl-spinner").hide()
        document.title = stripHtml(document.title)
        var grid = document.getElementsByClassName('mdl-grid')[0]
        if (grid) {
            grid.setAttribute('tabindex', "-1")
            grid.style.outline = "0px solid tranparent";
            grid.focus()
        }
    };
</script>

</div>
</body>
<script>
    var checkStartupStatus = function () {
        $.ajax({
            type: "GET",
            url: "/hubStatus",
            success: function (response) {
                $('#hub-init-div').html(response.serverInitPercentage);
                var p1 = document.querySelector('#p1');
                if (p1.MaterialProgress) p1.MaterialProgress.setProgress(parseInt(response.serverInitPercentage.split(': ')[1].replace("%","")));

                if (response.status == "running") {
                    setTimeout(reloadPage, 500);
                }
                else {
                    setTimeout(checkStartupStatus, 2000);
                }
            },
            error: function () {
                setTimeout(checkStartupStatus, 2000);
            }
        });
    }

    var reloadPage = function() {
        location.reload();
    }
    $(document).ready( function() {
    var p1 = document.querySelector('#p1');
    if (p1.MaterialProgress) {
    document.querySelector('#p1').addEventListener('mdl-componentupgraded', function() {
                    this.MaterialProgress.setProgress(0);
                });
                }
        checkStartupStatus();
    })
    </script>
</html>

[9/21/2019, 7:50:50 PM] [Hubitat hhm:0.2.17] I am stopping my reload here and hope eveything fixes themselves (e.g. a firmware update of HE is rebooting the hub
(node:32468) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated