Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: service.on is not a function #2

Open
MrZarniwoop opened this issue Aug 25, 2020 · 3 comments
Open

TypeError: service.on is not a function #2

MrZarniwoop opened this issue Aug 25, 2020 · 3 comments

Comments

@MrZarniwoop
Copy link

Trying to use the plugin and get this error if I add my Braava Jet m6 as an accessory:

[BraavaName] Enabling keepAlive
8/25/2020, 10:49:42 AM TypeError: service.on is not a function
at Accessory._this.addService (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/dist/lib/Accessory.js:191:21)
at /usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:411:31
at Array.forEach ()
at Server.createAccessory (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:406:22)
at Server.loadAccessories (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:266:40)
at Server.run (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:90:18)
at module.exports (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:84:12)
at Object. (/usr/local/lib/node_modules/@hoobs/hoobs/bin/hoobs:95:81)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47

From my config:

    {
        "accessory": "Braava",
        "plugin_map": {
            "plugin_name": "homebridge-braava",
            "index": 0
        },
        "name": "BraavaName",
        "model": "m6",
        "blid": "***pastedfromscript***",
        "robotpwd": "***pastedfromscript***",
        "ipaddress": "***ipaddress***",
        "autoRefreshEnabled": true,
        "keepAliveEnabled": true,
        "cacheTTL": 30
    }

I do have homebridge-roomba-stv working just fine.

@binomialstew
Copy link
Owner

Is this a typical homebridge installation? I see the error is coming from the @hoobs/hoobs package, but this isn't a dependency of homebridge-braava, and I'm not familiar with that project. I'd be happy to investigate and correct the issue if this was part of this homebridge plugin, but I'm not seeing this error with a similar config to yours and a Braava M6.

@MrZarniwoop
Copy link
Author

In this case, it’s running on a vanilla unmodified “HOOBS in a Box” setup. HOOBS is a front-end to Homebridge that grew out of homebridge-config-ui-x.

https://github.com/hoobs-org/HOOBS/wiki/8.0-Credits
https://www.reddit.com/r/homebridge/comments/emglk5/homebridge_vs_hoobs/
https://github.com/hoobs-org/HOOBS/wiki
https://support.hoobs.org/docs
https://hoobs.org/
https://www.reddit.com/r/HOOBS/

Your plugin is the first I’ve encountered that wouldn’t load on HOOBS, although I’ve only tried a little more than a dozen so far.

For what it’s worth, homebridge-roomba-stv runs well on HOOBS to the point that it’s certified for it. That means the HOOBS project team offers support to help users setup that plugin.

Also, homebridge-braava-m6 seems to work ok but not with all of homebridge-braava’s features.

@binomialstew
Copy link
Owner

There do appear to be compatibility issues with hoobs. Unfortunately, I am not running it, so can't easily test this, but I will see if I can get around to it eventually. In the meantime, PRs are welcome.

Repository owner deleted a comment from jabreuint Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants