aarons22 / homebridge-bond Goto Github PK
View Code? Open in Web Editor NEWHomebridge plugin for Bond
License: MIT License
Homebridge plugin for Bond
License: MIT License
The way Bond interacts with my controller is that whenever the ceiling fan turns off, the lights toggle off. This wouldn't be an issue, except that the light state doesn't change. I have to go into Bond and fix the state of the light. Is there anything I can add to the index file to toggle the light back on when the fan gets turned off?
I saw shades were added and was curious as to which ones would be supported. I for one and on the hunt for HomeKit shades, or Homebridge ones, so shades is interesting especially if bond can handle any shade.
https://github.com/aarons22/homebridge-bond/projects/1#card-26992587
The ability to add two or more different bond bridge devices. On larger houses, a single bond isn't enough to cover all rooms.
Thanks for making this! Any plan to add the lights?
Added “include_dimmer”: true to my configuration, but there is no panel to dim the lights in my home app. I can dim the lights from the bond app, though. Remote is a litex with an lcd panel.
I had it working on my Hoobs homebridge. was working great I uninstalled it to do a tutorial. tried to reinstall it and not showing up. I reinstalled homebridge from scratch update plugin, bond hub, and homebridge. This is the error it get.
[Bond] Initializing Bond platform...
[Bond] ERR: bonds array is required but missing from config.json
Loading 2 accessories...
npm list -g homebridge-bond
v2.5.0)Thank you for your time.
Describe the bug
Once the platform is included in config.json
, Homebridge completely stops working; despite not emitting any errors to STDOUT/STDERR or any log files. The application itself reports that it is functioning (displays pairing QR, other plugins send out their initial requests, etc.), but everything in the Home app displays as "Not Responding." I have tried clearing out the accessory cache and re-adding the Homebridge hub from the Home app to no avail.
Expected behavior
Helpful output should be provided to point the user to what is misconfigured or malfunctioning.
Log Output
homebridge_1 | [9/29/2019, 2:43:59 PM] [Bond] 0 cached accessories were loaded
homebridge_1 | [9/29/2019, 2:43:59 PM] [Bond] Getting devices...
homebridge_1 | [9/29/2019, 2:43:59 PM] [Bond] 2 devices were found on this Bond.
homebridge_1 | [9/29/2019, 2:43:59 PM] [Bond] Attempting to add 2 devices that were not previously added.
homebridge_1 | [9/29/2019, 2:44:07 PM] [Bond] Adding accessory Living Room CF
homebridge_1 | [9/29/2019, 2:44:07 PM] [Bond] Adding accessory Master Bedroom CF
Information (please complete the following information):
Additional context
DEBUG=*
and run homebridge with the -D
flag, still nothing.Hi Aaron,
Does this support multiple Bond hubs? Here is the error I am getting:
[1/9/2020, 6:23:34 PM] Homebridge is running on port 51826.
[1/9/2020, 6:23:34 PM] [Bond] ERR: A request error occurred: Error: getaddrinfo ENOTFOUND undefined undefined:80
[1/9/2020, 6:23:34 PM] [Bond] Error getting device ids: TypeError: Cannot convert undefined or null to object
[1/9/2020, 6:23:34 PM] [Bond] 3 cached accessories were loaded
[1/9/2020, 6:23:34 PM] [Bond] Getting devices...
[1/9/2020, 6:23:34 PM] [Bond] 3 devices were found on this Bond.
[1/9/2020, 6:23:34 PM] [Bond] Attempting to add 0 devices that were not previously added.
[1/9/2020, 6:23:34 PM] [Bond] Getting devices...
[1/9/2020, 6:23:34 PM] [Bond] 0 devices were found on this Bond.
[1/9/2020, 6:23:34 PM] [Bond] Attempting to add 0 devices that were not previously added.
[1/9/2020, 6:23:35 PM] [Bond] Configure Accessory: Family Room GX
[1/9/2020, 6:23:35 PM] [Bond] Configure Accessory: Family Room GX
[1/9/2020, 6:23:35 PM] [Bond] Configure Accessory: Family Room CF
Thanks for working and supporting the plugin!
Bond added fireplace compatibility. Simple on-off commands. Is there any chance this functionality could be added to homebridge-bond? (I have no idea how to do it myself...). Thanks
Describe the bug
Homebridge-bond appears to be initializing correctly, but all of my Bond accessories show up in the Home app with a red "No Response" message. Or they do not appear at all.
Information (please complete the following information):
Additional context
I have 2 fans/lights that were working just fine earlier today. At some point today they started showing up in Home with a red "No Response" message. I did install 2.5.0 earlier today, although I honestly do not remember if I did so before or after getting that message.
I'm running Homebridge on an iMac (running 10.14.6), not in a Docker container. I updated to iOS 13.2 in the last day or two (and everything still worked fine).
The fans still appear in Bond and the controls still work in Bond.
When I remove the Homebridge bridge from Home and then attempt to add it as a new accessory with the QR code, it fails. If I remove the Bond platform items from config.json
, that same attempt to add through the QR code is successful.
When I restore the Bond platform items in config.json
, the accessories do not show up in Home. Not only that, but it breaks the connection to my non-Homebridge accessory (a Wemo plug). Removing the Bond config items restores the connection to the Wemo plug. This part definitely sounds similar to "Causes Homebridge to Stop Functioning."
The only Homebridge plugins I'm running are homebridge-bond and homebridge-config-ui-x.
Other troubleshooting steps I've tried:
config.json
/persist
files. I've tried clearing cachedAccessories
. Neither makes a difference."debug": "true"
to the config, but it doesn't seem to give me any info.I'll admit, I'm pretty new to Homebridge. I think I installed it for the first time a few days ago. So I'm not quite sure what else to try. Let me know what other info I might be able to provide or other diagnostic/troubleshooting I might be able to attempt.
I should also say that when it is working, homebridge-bond is truly a wonderful thing, and I'm so grateful for the work you've put into the plugin. I'm just puzzled by why it is no longer working.
Something has gone wrong with the latest release on my system. It is possible to post a previous version number?
[2018-12-3 19:37:12] ---
Load homebridge-bond.Bond
/usr/lib/node_modules/homebridge-bond/dist/index.js:10
let email = config['email'];
^
TypeError: Cannot read property 'email' of null
at new BondPlatform (/usr/lib/node_modules/homebridge-bond/dist/index.js:10:27)
at Server._loadDynamicPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:347:30)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:88:8)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:45:10)
at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
In the Bond app, after configuring your fan, you can remove unnecessary/unwanted controls. In my case, I only need the Fan controls, since my fan lights are hard-wired to a switch in the wall.
The plugin, however, makes the deleted light controls available in HomeKit. Would be great to display the controls in the Home app exactly as they are in the Bond app.
Hello and thank you for taking over this project and supporting the v2 API!
It's been working great for the most part, the only issue I've been having so far is with regard to setting up automations. Turning fans ON via automation works as it should, however turning fans OFF via automation does not.
Things I have tried:
Has anyone been brave enough to go from V2.8.2 -> V2.9.1? Me not having a spare device puts me off from upgrading the firmware since I don't know if it will break anything. If anyone is on V2.9 let me know if it works for you.
Here's the debug log:
[16/11/2019, 09:04:29] Homebridge is running on port 51826.
[16/11/2019, 09:04:32] [Bond] DEBUG: Error [GET http://192.168.0.16/v2/devices] - {"name":"RequestError","message":"Error: connect EHOSTUNREACH 192.168.0.16:80","cause":{"errno":-113,"code":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.16","port":80},"error":{"errno":-113,"code":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.16","port":80},"options":{"method":"GET","uri":"http://192.168.0.16/v2/devices","headers":{"BOND-Token":"ef762345c434fbf1"},"body":{},"json":true,"simple":false,"timeout":10000,"resolveWithFullResponse":false,"transform2xxOnly":false}}
[16/11/2019, 09:04:32] [Bond] ERR: A request error occurred: Error: connect EHOSTUNREACH 192.168.0.16:80
[16/11/2019, 09:04:32] [Bond] Error getting device ids: TypeError: Cannot convert undefined or null to object
[16/11/2019, 09:04:32] [Bond] 0 cached accessories were loaded
[16/11/2019, 09:04:32] [Bond] Getting devices...
[16/11/2019, 09:04:32] [Bond] 0 devices were found on this Bond.
[16/11/2019, 09:04:32] [Bond] Attempting to add 0 devices that were not previously added.
Information:
Additional context
I'm using the bond's local ip in the config file. Using this worked a couple of times, but would stop after a little (not sure how long, maybe 10 minutes?). I tried clearing the cachedAccessories and persist folders and re-adding the device to the Home app. I'm fairly certain it's the right ip, since going to it in the browser brings up a bond screen where I can view the network it's connected to.
I also tried using the ip obtained by pinging the bond ip. That one never worked, but it doesn't give this error (it still says Error getting device ids: TypeError: Cannot convert undefined or null to object
)
I tried using this plugin with my Bond device, but even though it's identifying the accessory etc., it's not working at all. I'm guessing (but certainly not sure) that it's because my ceiling fan remote does not have variable speed, but 0-1-2-3. I guess I would have expected this to map to 0% - 33% - 67% - 100%, but a) it does not work at all (no percentages work) and b) I can only set it to 33% and 100% (at 67% it changes to either 33% or 100%).
So, I'm mostly curious if this is a project people are still working on?
Hey there, awesome plugin.
Lights on and off work perfect for me.
Fan speed on the other hand is very inconsistent. I have a 3 speed fan that works perfect in the Bond app. If I tell Siri, 100%...it will set it to low. From there, if I say 33%, it will set to medium, etc. If I shut off and then tell Siri 33%, it will set to 66%. I can't seem to find a rhyme or reason for it. Happy to help debug or grab any information -- though I may need help getting it. I'm not exactly experienced with HomeBridge.
In my Bond app, I have speed 1, 2, 3. Selecting one of those takes the fan directly to that speed.
Thanks.
I have my fans connected to smart switches for on/off and only use Bond for speed control, so I don’t have the Power button from my remote added to Bond. (That helps keep me from having situations whe the fan is on at the Switch but off on the remote.)
When I use the plugin it crashes homebridge any time the Bond fan state changes to Off. Here’s what I see in the log:
usr/local/lib/node_modules/homebridge-bond/dist/bond.js:66
let url = "https://" + this.id + ".local:4433/api/v1/device/" + (parseInt(device.propertyId) - 1) + "/device_property/" + device.propertyId + "/device_property_command/" + command.propertyId + "/run";
^
TypeError: Cannot read property 'propertyId' of undefined
at Bond.sendCommand (/usr/local/lib/node_modules/homebridge-bond/dist/bond.js:66:189)
at Characteristic.<anonymous> (/usr/local/lib/node_modules/homebridge-bond/dist/index.js:167:22)
at emitMany (events.js:147:13)
at Characteristic.emit (events.js:224:7)
at Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)
at Bridge.Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at emitMany (events.js:147:13)
at HAPServer.emit (events.js:224:7)
at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:972:10)
at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
at emitNone (events.js:106:13)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Aaron,
What is the problem here. Please help. The Bond IP address is 192.168.1.48 and the token is correct. I have established that through the instructions but I am getting these error messages and no accessories are found.
[Bond] Initializing Bond platform...
[1/9/2020, 2:43:46 PM] [Bond] ERR: A request error occurred: Error: Invalid URI "http:///%3C192.168.1.48%3E/v2/devices"
[1/9/2020, 2:43:46 PM] [Bond] Error getting device ids: TypeError: Cannot convert undefined or null to object
[1/9/2020, 2:43:46 PM] [Bond] 0 cached accessories were loaded
[1/9/2020, 2:43:46 PM] [Bond] Getting devices...
[1/9/2020, 2:43:46 PM] [Bond] 0 devices were found on this Bond.
[1/9/2020, 2:43:46 PM] [Bond] Attempting to add 0 devices that were not previously added.
As a lot of these these devices are base on Frequency and not IR, can it be looked at with the ability to have the controls assigned to its own room. As it stand right now, they all go together.
I understand this project hasn't been touched on much by the creator as he may be busy idk.
Anyways cutting to the point here are my issues with this plugin and things other forks haven't done or have done, but no longer work:
If anyone has any tips please let me know!
Bug Description
In iOS 13.2 I was doing a Shortcuts automation to get the state of the fan and
if fan = on
turn fan off,
else
fan on.
Obviously not real code, I'll share the shortcut once I get home, but I have an NFC sticker that when I place my phone on will toggle the state of accessories.
When trying to control the fan via it, it sets the it to the desired speed, the home app reflects the speed change, but the fan it's self had no change unless manually changed.
It may be good to note that the Fan Light accessory can be toggled from shortcuts.
Expected behavior
When automation sets fan speed to 0, fan should turn off in real life.
Screenshots
Adding once I get home.
Information (please complete the following information):
Additional context
This shortcut works for other accessories and Homebridge accessories, including the fan's light accessory, just not the fan (speed).
Our fans have 6 fan speeds. It would be great if the Fan resolution was split into 6 or something similar. Thanks!
I'm using the new bond app on iPhone. It works great. My other homebridge devices are working great. I'm on firmware v2.9.5.
Does the Bond ID go anywhere in the config file?
If I try to access the bond by web browser directly by entering an IP address I get the screen shot attached.
I'm very thankful that you are helping people troubleshoot! Thanks so much!
-Rob
Here is what I added to my config file:
"platform": "Bond",
"bonds": [
{
"ip_address": "192.168.1.110",
"token": "[Copied from iPhone]"
}
]
[2019-11-28 06:02:43] [Bond] ERR: A request error occurred: Error: connect ENETUNREACH 192.168.1.110:80 - Local (0.0.0.0:0)
[2019-11-28 06:02:43] [Bond] 0 cached accessories were loaded
[2019-11-28 06:02:43] [Bond] Getting devices...
[2019-11-28 06:02:43] [Bond] 0 devices were found on this Bond.
[2019-11-28 06:02:43] [Bond] Attempting to add 0 devices that were not previously added.
Describe the bug
I have 2 bonds and the device Id is duplicated across both my bonds.
Expected behavior
I have 5 fans, HomeKit only shows 4.
Screenshots
Nov 13 00:01:12 zwave homebridge[2186]: [2019-11-13 00:01:12] [Bond] Adding accessory Master Bedroom CF
Nov 13 00:01:12 zwave homebridge[2186]: [2019-11-13 00:01:12] [Bond] Adding accessory Master Bedroom CF
Nov 13 00:01:12 zwave homebridge[2186]: [2019-11-13 00:01:12] [Bond] 00000018 has already been added.
Nov 13 00:01:13 zwave homebridge[2186]: [2019-11-13 00:01:13] [Bond] Adding accessory Office CF
Nov 13 00:01:13 zwave homebridge[2186]: [2019-11-13 00:01:13] [Bond] Adding accessory Media Room CF
Nov 13
Information (please complete the following information):
Additional context
I had sent a pull request to the previous maintainer to update the id of each device to the device attribute that was returned via the api. This value was a uuid and allowed my kits to work, not sure if they still have that or not. I’ll dig on it this weekend.
Greetings. I installed the homebridge-bond-testing2 plugin but am getting the following when I try to run it. I also included my config.json file below as well. Anyone know how to resolve this?
21:59:54
[2019-8-20 15:59:54] Plugin /usr/local/lib/node_modules/homebridge-bond-testing2 package.json does not contain the keyword 'homebridge-plugin'.
21:59:54
[2019-8-20 15:59:54] No plugins found. See the README for information on installing plugins.
21:59:54
[2019-8-20 15:59:54] Loading 1 platforms...
21:59:54
[2019-8-20 15:59:54] Error: The requested platform 'Bond' was not registered by any plugin.
{
"bridge": {
"name": "Homebridge2",
"username": "CC:22:3D:E3:CE:31",
"port": 51335,
"pin": "031-45-154"
},
"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",
"accessories": [
],
"platforms": [
{
"platform": "Bond",
"email": "email address",
"password": "password"
}
]
}
Could the README get some love? Im considering purchasing Bond, but wanted to see how hard this is to get setup. I have to go look through the actual code to see how the config should look.
Running plugin 2.1.0, with phone on iOS 13.1.2.
Saying the command “turn on the ....room fan to 66” (or medium in my case for a 3 speed fan) results in Siri saying ok I’ve set the fan speed to 3, and turning the fan to 100%
Expected behavior
Siri confirms the fan speed correctly and sets the fan to the desired speed.
Additional context
I suspect what’s happening here is a mismatch of units in the workflow, since Siri/HomeKit expects fan speed in a 0-100 range, while the bond expects fan speed in a 0-originating array that increments by 1.
So with the Siri command:
HomeKit tells bond plugin set the fan speed to 66 -> plugin rounds it to the highest value supported by the bond for this particular fan (3 in this case), and tells the bond to make fan speed 3, which is dutifully does, and the fan ramps up to highest. Then the callback fires without converting bond values to HomeKit values and returns 3, so Siri happily reads back that it’s set the fan speed to 3.
Describe the solution you'd like
Support for shades. I'm not myself a homebridge user, but I am one of the developers working on the Bond Bridge and I pointed a user on our forums to this repo today, as he was interested in using his Bond via Homekit. I know this user's also particularly interested in shades control, so I'm opening this with him in mind.
Additional context
Shades are a pretty simple device type: they have the type
MS
, the state open
with potential values 0
and 1
, and at minimum, should have Open
and Close
actions. Some shades have a Hold
action to stop motion of the motor. Some shades have a Preset
action to move the shade to a preset position.
Describe the bug
Getting the following error for bond in homebridge.
[10/26/2019, 3:45:01 PM] [Bond] Initializing Bond platform...
[10/26/2019, 3:45:01 PM] [Bond] ERR: bonds array is required but missing from config.json
Information (please complete the following information):
Additional context
Bond hasn't worked for a couple of weeks. Get an error when it tries to load plugin saying ERR: Bonds array is required but missing from config.json. Below is the bond portion of my config.json
{
"platform": "Bond",
"bond_ip_address": "BOND IP ADDRESS",
"bond_token": "MY BOND TOKEN"
}
@aarons22 Thanks for the continued support on this.
I've updated to the most current version of the plugin and the icons are visible but have a ghost action. In other words, the buttons don't provide a response from Bond.
Seems like a release with minor bug fixes. I updated and it's been working fine for me.
ALSO - and this is the bigger news - it seems that at some point between when I checked in June and now, Bond brought firmware parity between ZZ devices and the rest, so all bonds can be updated to version 2.x now. This is fantastic news and probably means we can completely axe the 1.0 branch of this plugin.
Switching to the local will likely be a net win all around.
Beta sign up: https://forum.bondhome.io/t/bond-local-api-beta-sign-up/250
Local API docs: http://docs-local.appbond.com/#section/Glossary/BOND-Bridge
Describe the bug
When I wake up in the morning all my Bond devices are renames this like:
Garage Bedroom Garage Bedroom Ceiling Fan
When I last left it, it was called Garage Bedroom Ceiling Fan
Expected behavior
Keep the name
Information (please complete the following information):
npm list -g homebridge-bond
in terminal)homebridge-bond v2.5.3
Excited to see updates being made to homebridge-bond!
unfortunately receiving the following error on load.
[9/27/2019, 12:40:08 AM] [Bond] Configuring Accessory: null Fan [9/27/2019, 12:40:08 AM] TypeError: Cannot read property 'some' of undefined at Object.CFhasFan (/usr/lib/node_modules/homebridge-bond/dist/interface/Device.js:20:31) at BondPlatform.setupObservers (/usr/lib/node_modules/homebridge-bond/dist/index.js:94:29) at BondPlatform.configureAccessory (/usr/lib/node_modules/homebridge-bond/dist/index.js:90:14) at Server._configCachedPlatformAccessories (/usr/lib/node_modules/homebridge/lib/server.js:386:24) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:93:8) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10) at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) [9/27/2019, 12:40:08 AM] Got SIGTERM, shutting down Homebridge...
It looks like the plugin is running:
Jan 23 15:15:46 Heli-Pi homebridge[21488]: [2019-1-23 15:15:46] Loaded plugin: homebridge-bond
Jan 23 15:15:46 Heli-Pi homebridge[21488]: [2019-1-23 15:15:46] Registering platform 'homebridge-bond.Bond’
my config.json file has:
{
"email": “[email protected]",
"password": “xxxx",
"Living Room": "AJ12XXX",
"platform": "Bond"
}
It looks like its working. I do not see my devices though, just two ceiling fans. Any ideas?
Hello, I just installed this plugin with no bond fans set up idk if this is the issue, but if it is please lmk. My unit comes by Thursday.
#Config:
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},
"description": "Homebridge",
"accessories": [{
"accessory": "Chamberlain",
"name": "Double garage",
"username": "[email protected]",
"password": "Canada113",
"deviceId": "xxx"
},
{
"accessory": "Chamberlain",
"name": "Single Garage",
"username": "[email protected]",
"password": "Canada113",
"deviceId": "xxx"
},
{
"accessory": "DummySwitch",
"name": "Lights",
"stateful": true
},
{
"accessory": "SonyTV",
"name": "TV",
"mac": "xx",
"ip": "10.0.0.xx",
"tvsource": "tv:dvbs",
"maxchannels": 500,
"soundoutput": "speaker",
"onscript": "/home/pi/scripts/dolbyon.sh",
"offscript": "/home/pi/scripts/dolbyoff.sh",
"savefilenameprefix": "/home/pi/sonycookie"
},
{
"accessory": "DummySwitch",
"name": "Living Room Lights",
"stateful": true
},
{
"accessory": "DummySwitch",
"name": "Master BedRoom Lights",
"stateful": true
},
{
"accessory": "DummySwitch",
"name": "BackYard Lights",
"stateful": true
}
],
"platforms": [{
"platform": "Doorbell",
"doorbells": [{
"name": "Doorbell Front"
},
{
"platform": "TplinkSmarthome",
"name": "TplinkSmarthome",
"devices": [{
"host": "10.0.0.xx"
},
{
"platform": "Bond",
"email": "xx",
"password": "xx"
}
]
}
]
}]
}
And with this I get the error:
Load homebridge-bond.Bond
/usr/local/lib/node_modules/homebridge-bond/dist/index.js:10
let email = config['email'];
^
TypeError: Cannot read property 'email' of null
at new BondPlatform (/usr/local/lib/node_modules/homebridge-bond/dist/index.js:10:27)
at Server._loadDynamicPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:347:30)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:88:8)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:45:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
I bought my Bond the last week of December 2018. I installed the Bond plugin and configured my credentials according to the sample json config. My first ceiling fan partially loaded with some switches available, but some were labeled ‘null’, and all the other ceiling fans also showed ‘null’ (the word null) descriptions. No devices were controlled in any way via Homekit.
I’ve tried several times to get things working. I’ve uninstalled and loaded version 1.1. I’ve reinstalled 2.0. I’ve deleted all my fans, and added them back again with different names, even one at a time. I’ve deleted the cachedAccessories file numerous times. I have two different fan controller modules and tried one of each alone. I noticed that the bond firmware seems to have been updated from 1.117 to 1.130, so retried with no change. The broken devices cause Homebridge to crash, so currently the plugin is not installed.
I recall seeing a notice the first week of January saying there was a server glitch and to rerun discovery on Alexa to fix it. I am not sure if that glitch would have impacted Homebridge loading the devices, but assume that could be the case. Deleting the cachedAccessories file seems to stop Homebridge from logging that it is loading Bond accessories from cache.
Any other suggestions to get this working?
Describe the bug
I just migrated my v1 to v2 after updating firmware, installing the updated version of homebridge-bond, purging cached accessories, and changing my config.json file, when I startup home bridge I get the following error:
[10/17/2019, 8:44:03 AM] Homebridge is running on port 51823.
[10/17/2019, 8:44:03 AM] [Bond] Error getting device ids: TypeError: Cannot convert undefined or null to object
[10/17/2019, 8:44:03 AM] [Bond] 0 cached accessories were loaded
[10/17/2019, 8:44:03 AM] [Bond] Getting devices...
[10/17/2019, 8:44:03 AM] [Bond] 0 devices were found on this Bond.
[10/17/2019, 8:44:03 AM] [Bond] Attempting to add 0 devices that were not previously added.
Expected behavior
I expect my 5 fans to show like they did in the past.
Screenshots
If applicable, add screenshots to help explain your problem.
Information (please complete the following information):
npm list -g homebridge-bond
in terminal)Additional context
Add any other context about the problem here.
Here's my config.json
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E2:CE:30",
"port": 51823,
"pin": "031-45-254"
},
"accessories": [
],
"platforms": [
{
"platform": "Bond",
"bonds": [
{
"ip_address": "192.168.1.195",
"token": "5b5670316c047dc4"
}
]
}
]
}
Using node 10.16.3 on a new installation, and empty config.json
file, produces this error:
[10/15/2019, 1:32:31 PM] Loading 0 accessories...
Load homebridge-bond.Bond
[10/15/2019, 1:32:31 PM] TypeError: Cannot read property 'bonds' of null
at new BondPlatform (/usr/lib/node_modules/homebridge-bond/dist/index.js:24:20)
at Server._loadDynamicPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:358:30)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:92:8)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10)
at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
I can confirm this error goes away (and normal behavior exists) once the "bonds" key is added into "platforms" in config.json
.
My ceiling fan has two lights which the remote and Bond app can control separately. It would be nice if we can control both via HomeKit.
Describe the solution you'd like
Multi-light setups conveniently map to the following bond actions:
ToggleUpLight
ToggleDownLight
I'm thinking that this could be implemented by ignoring the ToggleLight action if the above actions are reported by the Bond, and exporting two light accessories for the CF into HomeKit. I'm not 100% sure that HomeKit can accept two lights on one ceiling fan, still researching this.
Describe alternatives you've considered
If HomeKit can't accept two lights per CF then an alternative implementation could be to allow the user to specify in the config file which light should be triggered when the light is toggled on/off in the home app, and instead of ToggleLight the plugin would translate it to one of the two I mentioned above, depending what's specified in the config.
I considered having BOTH lights toggled on/off instead, but don't think this will be desirable by many users. We can talk about it though.
I'd like to familiarize myself with your code and submit a PR for this but life is too busy lately and who knows when I'll get to it. It may be faster if you implement, hence why I'm throwing this up here as a feature request. Happy to test if you make any progress!
I am on v1 firmware with the v1 homebridge plug-in. 4 of my 5 ceiling fans work as expected, with the 5th having a self automated temperature controlling remote and has not been critical. I am not sure if my bond will upgrade to v2, but expect if it did that I might gain fan 5.
I admit I’m a bit leery to upgrade my working system. Does the v2 api and bond plug-in offer any benefits over my working v1 implementation? Is it worth the effort and risk of upgrading my bond and the plug-in?
When I start homebridge with this plugin loaded I am prompted with the following error. Anybody have any ideas on what the issue is here?
at new StatusCodeError (/usr/lib/node_modules/homebridge-bond/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/usr/lib/node_modules/homebridge-bond/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/usr/lib/node_modules/homebridge-bond/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/usr/lib/node_modules/homebridge-bond/node_modules/request/request.js:185:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/usr/lib/node_modules/homebridge-bond/node_modules/request/request.js:1161:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-bond/node_modules/request/request.js:1083:12)
at IncomingMessage.g (events.js:286:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
name: 'StatusCodeError',
statusCode: 502,
message: '502 - "<html>\\r\\n<head><title>502 Bad Gateway</title></head>\\r\\n<body bgcolor=\\"white\\">\\r\\n<center><h1>502 Bad Gateway</h1></center>\\r\\n</body>\\r\\n</html>\\r\\n"',
error: '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n</body>\r\n</html>\r\n',
options:
{ method: 'GET',
uri: 'https://appbond.com/api/v1/bonds/',
headers: { Authorization: 'Token <REDACTED>' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Object],
close: [Object],
data: [Function],
error: [Function] },```
When the Bond is set to fan level ‘3’ (high), HomeKit displays the fan at 33%. When the fan is set to level ‘1’ (low), HomeKit displays the fan at 100%. This is also the behavior of setting the fan within HomeKit; setting the fan to 33% results in high and setting to 100% results in low.
Plugin version: 2.4.0
Bond version: 2.9.2
iOS 13.2 (17B5077a)
This issue is a feature request for the addition of Dimming the fan light.
Currently bond supports dimming of the fan light and it would be great to extend that into this plugin.
My issue, is that my fan has only 1 button in relation to light, a simple toggle where you either hold the top of the button to brighten the bulb or hold the bottom of the button to dim it.
Instead of a separate accessory to handle light dimming, I feel like it should be a config parameter to specify if a light dim's. Now on to another issue that may arise, not all fans can support dimming.
My assumption is for the service to add a slider like lamps do already if brightness can be toggle, the lightToggle
button be replaced with a slider.
As I mentioned earlier some fans may or may not support dimming so a slider wouldn't work unless the API can report it supports dimming, or send multiple requests to mock holding the button up or down.
If the resolution were to require a config update, It'd may have to specify each device configured on your bond and specify type such as shades, fan, fan with light, fan without light, fan with dimming light, fireplace, etc. I'm sure there is a better way to tackle this and I probably got off track a little, but let the forks begin.
With the latest firmware now supporting Bond Push UDP Protocol (BPUP), it’d be nice if the plugin is updated to take advantage of it to reduce latency of updates in HomeKit.
In my case, I have a Logitech POP button going thru SmartThings to interact with Bond to control my kitchen ceiling fan/light.
It’s quite responsive, however, it takes a while for HomeKit to reflect the current state of the kitchen fan/light (about a minute).
BPUP support should minimize this latency.
Regardless, thanks for the great work!
Hello everyone,
So iOS 13 is now in the hands of developers and there's been some changed to the Home App.
Fans now group accessories with them, so the Fan and Light Accessory and now 1 (Still 2 accessories just show as 1 under the same icon). Now it also added the Fan Reset switch in it so you see the Fan Reset and Fan Light together. I was wondering if anyone could make a PR or a branch based off #19 to be able to have the "Fan Reset" switch not pair with the fan.
If this was confusing here's a tldr:
This plugin adds 3 accessories per fan (Fan, Light, and Fan Reset). iOS 13 now lets you tap on the fan accessory to control the Fan and Light in the same field. Since this plugin adds 3 accessories, it groups all 3 since they are linked (individual controls still work). I was just asking if there can be a way to have the "Fan Reset" accessory not group together with the new fan in iOS 13.
So then it should just look like the Fan and just a Light on the side and have the fan reset be separate.
Paging @plainsane
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.