Comments (57)
I didn't realize I had to put it in twice:
pi@Heli-Pi:/var/homebridge/.homebridge$ resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)
key=$(echo "$resp" | jq -r .key)
curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 174 0 109 100 65 148 88 --:--:-- --:--:-- --:--:-- 148
pi@Heli-Pi:/var/homebridge/.homebridge$ key=$(echo "$resp" | jq -r .key)
pi@Heli-Pi:/var/homebridge/.homebridge$ curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
from homebridge-bond.
This is the output I get:
pi@Heli-Pi:/var/homebridge$ resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)
key=$(echo "$resp" | jq -r .key)
curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/ % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 174 0 109 100 65 156 93 --:--:-- --:--:-- --:--:-- 156
pi@Heli-Pi:/var/homebridge$ key=$(echo "$resp" | jq -r .key)
pi@Heli-Pi:/var/homebridge$ curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
and:
pi@Heli-Pi:/var/homebridge$ ./testBond.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 174 0 109 100 65 156 93 --:--:-- --:--:-- --:--:-- 156
{"detail":"Invalid token."}pi@Heli-Pi:/var/homebridge$
from homebridge-bond.
Yes I have the correct username and password.
from homebridge-bond.
Your config is wrong please paste you entire config please.
from homebridge-bond.
As requested entire config.json
{
"bridge": {
"name": "Heli-Homebridge",
"username": "CD:22:3D:E3:CE:04",
"port": 51826,
"pin": "777-42-596"
},
"accessories": [{
"name": "Minerva",
"accessory": "NetworkDevice",
"pingInterval": "15",
"mac": "48:d7:05:bf:14:e9",
"wakeGraceTime": "20",
"ip": "192.168.42.109",
"shutdownGraceTime": "45"
},
{
"name": "Lilly",
"accessory": "NetworkDevice",
"pingInterval": "15",
"mac": "c8:2a:14:51:4f:4d",
"wakeGraceTime": "20",
"ip": "192.168.42.120",
"shutdownGraceTime": "45"
},
{
"name": "Heli-Pi Temp",
"accessory": "RaspberryPiTemperature"
}
],
"platforms": [{
"email": "[email protected]",
"password": "Password",
"Living Room": "AJ12191",
"platform": "Bond"
},
{
"platform": "HarmonyHub",
"name": "Command Center"
},
{
"platform": "Nest",
"password": "xxx",
"code": "5V",
"clientId": "bf95e0",
"username": "[email protected]",
"token": "c.iyBEtM5TXdLiZGwX4FeXHXSngqHLfdy2HfhFlH5yUcqJy5VIVrPdRGnQ8bu0",
"clientSecret": "jErSzRF9JKhASmG"
},
{
"platform": "BroadlinkRM",
"name": "Broadlink RM",
"hideScanFrequencyButton": false,
"hideLearnButton": false,
"hideWelcomeMessage": false
}
]
}
from homebridge-bond.
So what I don't get from you config is, why is the "Living Room": "AJ12191",
line in your bond config it should only be:
{
"platform": "Bond",
"email": "<email>",
"password": "<password>"
}
Try out this config:
{
"bridge": {
"name": "Heli-Homebridge",
"username": "CD:22:3D:E3:CE:04",
"port": 51826,
"pin": "777-42-596"
},
"accessories": [{
"name": "Minerva",
"accessory": "NetworkDevice",
"pingInterval": "15",
"mac": "48:d7:05:bf:14:e9",
"wakeGraceTime": "20",
"ip": "192.168.42.109",
"shutdownGraceTime": "45"
},
{
"name": "Lilly",
"accessory": "NetworkDevice",
"pingInterval": "15",
"mac": "c8:2a:14:51:4f:4d",
"wakeGraceTime": "20",
"ip": "192.168.42.120",
"shutdownGraceTime": "45"
},
{
"name": "Heli-Pi Temp",
"accessory": "RaspberryPiTemperature"
}
],
"platforms": [{
"platform": "Bond",
"email": "[email protected]",
"password": "redacted"
},
{
"platform": "HarmonyHub",
"name": "Command Center"
},
{
"platform": "Nest",
"password": "xxx",
"code": "5V",
"clientId": "bf95e0",
"username": "[email protected]",
"token": "c.iyBEtM5TXdLiZGwX4FeXHXSngqHLfdy2HfhFlH5yUcqJy5VIVrPdRGnQ8bu0",
"clientSecret": "jErSzRF9JKhASmG"
},
{
"platform": "BroadlinkRM",
"name": "Broadlink RM",
"hideScanFrequencyButton": false,
"hideLearnButton": false,
"hideWelcomeMessage": false
}
]
}
What I edited:
Platform parameter was at the bottom of config also you had a line I had no idea why it was there as it isn't an option for this plugin.
from homebridge-bond.
Thanks I put in your config.json. No change in behavior. I still can't see my fans:
Jan 31 05:13:14 Heli-Pi systemd[1]: Started Node.js HomeKit Server.
Jan 31 05:13:16 Heli-Pi homebridge[608]: [2019-1-31 05:13:16] Loaded config.json with 3 accessories and 4 platforms.
Jan 31 05:13:16 Heli-Pi homebridge[608]: [2019-1-31 05:13:16] ---
Jan 31 05:13:17 Heli-Pi homebridge[608]: [2019-1-31 05:13:17] Loaded plugin: homebridge-bond
Jan 31 05:13:17 Heli-Pi homebridge[608]: [2019-1-31 05:13:17] Registering platform 'homebridge-bond.Bond'
Jan 31 05:13:17 Heli-Pi homebridge[608]: [2019-1-31 05:13:17] ---
Jan 31 05:13:18 Heli-Pi homebridge[608]: [2019-1-31 05:13:18] Loaded plugin: homebridge-broadlink-rm
Jan 31 05:13:18 Heli-Pi homebridge[608]: [2019-1-31 05:13:18] Registering platform 'homebridge-broadlink-rm.BroadlinkRM'
Jan 31 05:13:18 Heli-Pi homebridge[608]: [2019-1-31 05:13:18] ---
Jan 31 05:13:18 Heli-Pi homebridge[608]: [2019-1-31 05:13:18] Loaded plugin: homebridge-harmonyhub
Jan 31 05:13:19 Heli-Pi homebridge[608]: [2019-1-31 05:13:19] Registering platform 'homebridge-harmonyhub.HarmonyHub'
Jan 31 05:13:19 Heli-Pi homebridge[608]: [2019-1-31 05:13:19] ---
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Loaded plugin: homebridge-nest
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Registering platform 'homebridge-nest.Nest'
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] ---
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Loaded plugin: homebridge-people
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Registering accessory 'homebridge-people.people'
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] ---
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Loaded plugin: homebridge-raspberrypi-temperature
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Registering accessory 'homebridge-raspberrypi-temperature.RaspberryPiTemperature'
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] ---
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Loaded plugin: homebridge-rm-mini3
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Registering accessory 'homebridge-rm-mini3.RM mini3'
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] ---
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Loaded plugin: homebridge-wol
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Registering accessory 'homebridge-wol.NetworkDevice'
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] ---
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Loading 4 platforms...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Bond] Initializing Bond platform...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Command Center] Initializing HarmonyHub platform...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Nest] Initializing Nest platform...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Nest] Fetching Nest devices.
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Broadlink RM] Initializing BroadlinkRM platform...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Broadlink RM] [INFO] Automatically discovering Broadlink RM devices.
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Broadlink RM] No accessories have been added to the "Broadlink RM" platform config.
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Broadlink RM] Initializing platform accessory 'Learn'...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Broadlink RM] Initializing platform accessory 'Scan Frequency'...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] Loading 3 accessories...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Minerva] Initializing NetworkDevice accessory...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Lilly] Initializing NetworkDevice accessory...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Heli-Pi Temp] Initializing RaspberryPiTemperature accessory...
Jan 31 05:13:20 Heli-Pi homebridge[608]: [2019-1-31 05:13:20] [Bond] 0 cached accessories were loaded
from homebridge-bond.
Anyone have any other ideas? It looks to be working, but I do not see my fans in the home app.
from homebridge-bond.
Run this on your pi, be sure to set user/pass, do you get data?
#!/bin/bash
url='https://appbond.com/api/v1/auth/login/'
user=""
password=""
read -d -s doc <<EOF
{
"email": "$user",
"password": "$password"
}
EOF
resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)
key=$(echo "$resp" | jq -r .key)
curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
from homebridge-bond.
No it appears to have failed:
pi@Heli-Pi:$ resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)$ key=$(echo "$resp" | jq -r .key)
key=$(echo "$resp" | jq -r .key)
curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 0 109 100 69 212 134 --:--:-- --:--:-- --:--:-- 212
pi@Heli-Pi:
-bash: jq: command not found
pi@Heli-Pi:$ curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/$ curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
{"detail":"Invalid token header. No credentials provided."}pi@Heli-Pi:
{"detail":"Invalid token header. No credentials provided."}pi@Heli-Pi:~$
from homebridge-bond.
aptitude install jq
Then rerun
from homebridge-bond.
Thanks did that:
{
"email": "$user",
"password": "$password"
}
EOF
pi@Heli-Pi:$ resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)$ key=$(echo "$resp" | jq -r .key)
key=$(echo "$resp" | jq -r .key)
curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 0 109 100 69 202 128 --:--:-- --:--:-- --:--:-- 202
pi@Heli-Pi:
pi@Heli-Pi:~$ curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
I stopped and started my homebridge. I still don't see my fans, should I remove my homebridge and re-add it to home?
from homebridge-bond.
Well, I wanted to see the out of that script. It is not intended to fix your homebridge setup, just show how your devices are being reported by the bond api.
What does the output look like>
from homebridge-bond.
That was the output.
from homebridge-bond.
Oh, I missed the invalid toke. You need to set your bond user, pass on lines 4 and 5
from homebridge-bond.
Since the recent bond firmware release, I'm also not able to control my fan/light that previously worked. Upon reviewing the logs, it's showing an error timed out. See here:
homebridge_1 | [3/6/2019, 7:57:47 AM] [Bond] { RequestError: Error: connect ETIMEDOUT 198.105.244.228:4433
homebridge_1 | at new RequestError (/homebridge/node_modules/request-promise-core/lib/errors.js:14:15)
homebridge_1 | at Request.plumbing.callback (/homebridge/node_modules/request-promise-core/lib/plumbing.js:87:29)
homebridge_1 | at Request.RP$callback [as _callback] (/homebridge/node_modules/request-promise-core/lib/plumbing.js:46:31)
homebridge_1 | at self.callback (/homebridge/node_modules/request/request.js:185:22)
homebridge_1 | at Request.emit (events.js:189:13)
homebridge_1 | at Request.onRequestError (/homebridge/node_modules/request/request.js:881:8)
homebridge_1 | at ClientRequest.emit (events.js:189:13)
homebridge_1 | at TLSSocket.socketErrorListener (_http_client.js:392:9)
homebridge_1 | at TLSSocket.emit (events.js:189:13)
homebridge_1 | at emitErrorNT (internal/streams/destroy.js:82:8)
homebridge_1 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
homebridge_1 | at process._tickCallback (internal/process/next_tick.js:63:19)
homebridge_1 | name: 'RequestError',
homebridge_1 | message: 'Error: connect ETIMEDOUT 198.105.244.228:4433',
homebridge_1 | cause:
homebridge_1 | { Error: connect ETIMEDOUT 198.105.244.228:4433
homebridge_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14)
homebridge_1 | errno: 'ETIMEDOUT',
homebridge_1 | code: 'ETIMEDOUT',
homebridge_1 | syscall: 'connect',
homebridge_1 | address: '198.105.244.228',
homebridge_1 | port: 4433 },
homebridge_1 | error:
homebridge_1 | { Error: connect ETIMEDOUT 198.105.244.228:4433
homebridge_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14)
homebridge_1 | errno: 'ETIMEDOUT',
homebridge_1 | code: 'ETIMEDOUT',
homebridge_1 | syscall: 'connect',
homebridge_1 | address: '198.105.244.228',
homebridge_1 | port: 4433 },
homebridge_1 | options:
homebridge_1 | { method: 'GET',
homebridge_1 | uri:
homebridge_1 | 'https://BD26647.local:4433/api/v1/device/0/device_property/1/device_property_command/54/run',
homebridge_1 | rejectUnauthorized: false,
homebridge_1 | headers:
homebridge_1 | { 'X-Token':
homebridge_1 | '2562950a92b4d1a6150af66b272da1a52879f8f1a053dc910bd7f4e34710d5e7',
homebridge_1 | 'X-Sequence': 1,
homebridge_1 | 'X-BondDate': '2019-03-06T07:55:35Z' },
homebridge_1 | callback: [Function: RP$callback],
homebridge_1 | transform: undefined,
homebridge_1 | simple: true,
homebridge_1 | resolveWithFullResponse: false,
homebridge_1 | transform2xxOnly: false },
homebridge_1 | response: undefined }
Would greatly appreciate any help.
from homebridge-bond.
Since the recent bond firmware release, I'm also not able to control my fan/light that previously worked. Upon reviewing the logs, it's showing an error timed out. See here:
homebridge_1 | [3/6/2019, 7:57:47 AM] [Bond] { RequestError: Error: connect ETIMEDOUT 198.105.244.228:4433
homebridge_1 | at new RequestError (/homebridge/node_modules/request-promise-core/lib/errors.js:14:15)
homebridge_1 | at Request.plumbing.callback (/homebridge/node_modules/request-promise-core/lib/plumbing.js:87:29)
homebridge_1 | at Request.RP$callback [as _callback] (/homebridge/node_modules/request-promise-core/lib/plumbing.js:46:31)
homebridge_1 | at self.callback (/homebridge/node_modules/request/request.js:185:22)
homebridge_1 | at Request.emit (events.js:189:13)
homebridge_1 | at Request.onRequestError (/homebridge/node_modules/request/request.js:881:8)
homebridge_1 | at ClientRequest.emit (events.js:189:13)
homebridge_1 | at TLSSocket.socketErrorListener (_http_client.js:392:9)
homebridge_1 | at TLSSocket.emit (events.js:189:13)
homebridge_1 | at emitErrorNT (internal/streams/destroy.js:82:8)
homebridge_1 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
homebridge_1 | at process._tickCallback (internal/process/next_tick.js:63:19)
homebridge_1 | name: 'RequestError',
homebridge_1 | message: 'Error: connect ETIMEDOUT 198.105.244.228:4433',
homebridge_1 | cause:
homebridge_1 | { Error: connect ETIMEDOUT 198.105.244.228:4433
homebridge_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14)
homebridge_1 | errno: 'ETIMEDOUT',
homebridge_1 | code: 'ETIMEDOUT',
homebridge_1 | syscall: 'connect',
homebridge_1 | address: '198.105.244.228',
homebridge_1 | port: 4433 },
homebridge_1 | error:
homebridge_1 | { Error: connect ETIMEDOUT 198.105.244.228:4433
homebridge_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14)
homebridge_1 | errno: 'ETIMEDOUT',
homebridge_1 | code: 'ETIMEDOUT',
homebridge_1 | syscall: 'connect',
homebridge_1 | address: '198.105.244.228',
homebridge_1 | port: 4433 },
homebridge_1 | options:
homebridge_1 | { method: 'GET',
homebridge_1 | uri:
homebridge_1 | 'https://BD26647.local:4433/api/v1/device/0/device_property/1/device_property_command/54/run',
homebridge_1 | rejectUnauthorized: false,
homebridge_1 | headers:
homebridge_1 | { 'X-Token':
homebridge_1 | '2562950a92b4d1a6150af66b272da1a52879f8f1a053dc910bd7f4e34710d5e7',
homebridge_1 | 'X-Sequence': 1,
homebridge_1 | 'X-BondDate': '2019-03-06T07:55:35Z' },
homebridge_1 | callback: [Function: RP$callback],
homebridge_1 | transform: undefined,
homebridge_1 | simple: true,
homebridge_1 | resolveWithFullResponse: false,
homebridge_1 | transform2xxOnly: false },
homebridge_1 | response: undefined }Would greatly appreciate any help.
Bounce your bond, I just upgraded and 1 of my 2 was not happy until I power cycled it
from homebridge-bond.
I wish that were the case đ I've tried to power cycle, reset the wifi on the bond, re-add the bond to my wifi, remove and re-add the fans/lights and also completely reinstall homebridge with the plugin as the only accessory. I'm completely stumped đ¤ˇđťââď¸
To be clear also, the Fans/light work perfectly in the dedicated Bond app.
from homebridge-bond.
I didn't realize I had to put it in twice:
pi@Heli-Pi:/var/homebridge/.homebridge$ resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)
key=$(echo "$resp" | jq -r .key)
curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 174 0 109 100 65 148 88 --:--:-- --:--:-- --:--:-- 148
pi@Heli-Pi:/var/homebridge/.homebridge$ key=$(echo "$resp" | jq -r .key)
pi@Heli-Pi:/var/homebridge/.homebridge$ curl -H "Authorization: Token $key"
I still donât see a json document, letâs try this:
curl
https://raw.githubusercontent.com/plainsane/scripts/master/testBond.sh
chmod +x testBond.sh
Now edit that file and change username/pass on lines 4/5
Then run it with
./testBond.sh
from homebridge-bond.
I wish that were the case đ I've tried to power cycle, reset the wifi on the bond, re-add the bond to my wifi, remove and re-add the fans/lights and also completely reinstall homebridge with the plugin as the only accessory. I'm completely stumped đ¤ˇđťââď¸
To be clear also, the Fans/light work perfectly in the dedicated Bond app.
So Iâm pretty sure it relies on the bonjour protocol (at least mDNS) to resolve the dns name of you bond device that is on your local network...you must be getting a stale ip. What version of nodejs are you running?
from homebridge-bond.
Currently running 10.15.2.
from homebridge-bond.
I also agree its translating to a stale IP because as soon as I activate the fan in homebridge I get a constant spinning wheel.
pi@raspberrypi:/homebridge $ resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)/homebridge $ curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 135 0 86 100 49 148 84 --:--:-- --:--:-- --:--:-- 148
pi@raspberrypi:
from homebridge-bond.
Then I guess the user/password is incorrect. Do you have the proper account creds?
This is the output I get:
pi@Heli-Pi:/var/homebridge$ resp=$(curl -X POST -d "$doc" -H "Content-Type: application/json" $url)
key=$(echo "$resp" | jq -r .key)
curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/ % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 174 0 109 100 65 156 93 --:--:-- --:--:-- --:--:-- 156
pi@Heli-Pi:/var/homebridge$ key=$(echo "$resp" | jq -r .key)
pi@Heli-Pi:/var/homebridge$ curl -H "Authorization: Token $key" https://appbond.com/api/v1/bonds/and:
pi@Heli-Pi:/var/homebridge$ ./testBond.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 174 0 109 100 65 156 93 --:--:-- --:--:-- --:--:-- 156
{"detail":"Invalid token."}pi@Heli-Pi:/var/homebridge$
from homebridge-bond.
Currently running 10.15.2.
Try bouncing avahi
sudo systemctl restart avahi-daemon
from homebridge-bond.
Like @sofakingcopter, the user/password are correct. I have confirmed this various ways, including running the Bond app on iOS. Something may have changed in the Bond API that was pushed in their latest firmware and the original code is no longer valid.
from homebridge-bond.
Like @sofakingcopter, the user/password are correct. I have confirmed this various ways, including running the Bond app on iOS. Something may have changed in the Bond API that was pushed in their latest firmware and the original code is no longer valid.
Maybe, I have upgraded and it is still working for me, sorry, Iâm out of ideas.
from homebridge-bond.
To be fair, mine has never worked. I guess I'm just the lucky one lol.
from homebridge-bond.
After the recent Homebridge update, I decided to reinstall the Bond plugin thinking that it might work again, but unfortunately, I'm still receiving the following error in the code.
from homebridge-bond.
I got mine to identify the ceiling fan, but when I try any of the "actions", I get
[4/13/2019, 6:24:14 PM] [Bond] { StatusCodeError: 404 - "{}\r\n"
at new StatusCodeError (/usr/local/lib/node_modules/homebridge-bond/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/usr/local/lib/node_modules/homebridge-bond/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-bond/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/usr/local/lib/node_modules/homebridge-bond/node_modules/request/request.js:185:22)
at Request.emit (events.js:193:13)
at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-bond/node_modules/request/request.js:1161:10)
at Request.emit (events.js:193:13)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-bond/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:281:20)
at IncomingMessage.emit (events.js:198:15)
at endReadableNT (_stream_readable.js:1139:12)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
name: 'StatusCodeError',
statusCode: 404,
message: '404 - "{}\\r\\n"',
error: '{}\r\n',
I'm guessing that something in the mapping here points to a non-existent Bond API device? My ceiling fan does not have a variable speed, but rather 0-1-2-3, maybe that's the problem? I was not given any options though upon initializing the Bond device in my HomeBridge / Kit.
Any thoughts?
from homebridge-bond.
Closing this as it is no longer applicable with v2 API.
from homebridge-bond.
from homebridge-bond.
Can you run this command in terminal with your IP and token and let me know what you see?
curl -H "BOND-Token: f074b61f628018fd" -i http://192.100.0.61/v2/devices
from homebridge-bond.
@sofakingcopter did you follow the v1 to v2 upgrade guide? Your config needs to change as well from v1. If youâre using the homebridge docker container from oznu thereâs a thread on here with some additional steps you need to take.
from homebridge-bond.
I was unaware of any upgrade guide. I did a clean install, as I could not get the old plugin working ever, it would crash my home bridge. Did a clean install of home bridge and I just added the new plug int. It looks like its working but I do not see my devices in home app. I ran the command and this is what I got:
pi@Heli-Pi:~/.homebridge$ curl -H "BOND-Token: b0885b521abc0542" -i http://192.168.42.103/v2/devices
HTTP/1.1 200 OK
Content-Length: 18
Content-Type: application/json; charset=utf-8
{"_":"de432dc6"}
pi@Heli-Pi:~/.homebridge$
from homebridge-bond.
Yeah thatâs telling me no devices are showing up in the API, so youâre not going to see anything in the plugin. If you are seeing devices in the Bond Home app, you might want to reach out to Bond support because that sounds any issue on that end
from homebridge-bond.
I am having the same issue. I am not sure why you said no devices are showing after running the curl command. sofakingcopter's device is {"":"de432dc6"}. I receive a similar response with the command, but I get {"":"63b8bea7","1":{"_":"d5c14568"}}
In my case it is two devices (one is the llight and the other one is the fan). The home bridge plugin seems to be run successfully, but it says "0 devices loaded".
from homebridge-bond.
from homebridge-bond.
To be clear, I was only implying that the API was not functioning correctly. I'll quickly explain what the API response means. Looking at this response:
{
"_": "bde50a34",
"00000003": {
"_": "b28a5c82"
},
"00000018": {
"_": "e7cd6d8e"
},
"1b8d06c6": {
"_": "23a40915"
},
"38b3b9ca": {
"_": "afee19c7"
}
}
00000003
, 00000018
, 1b8d06c6
and 38b3b9ca
are the different device ids on this Bond. The first object in the response ("_": "bde50a34"
) is related to the bond itself and doesn't mean anything to the plugin.
Another suggestion would be to re-create the device in the new Bond Home app. That would hopefully get it to show up in the API response.
I'm also happy to take any PRs! I can't replicate the issue on my end so it's difficult to debug it.
from homebridge-bond.
If it helps, bond support gave me this link in the past for resetting the bond and reconnecting it to your network. All your devices that it learned should return, I didnât have to start over. Might be worth a shot to do that. The app also updates you to the latest firmware on the Bond. Make sure youâre using the ânewâ Bond Home app, not the old one from v1.
from homebridge-bond.
Ok, thanks. So according to your explanation, in my response my device is "1", correct?
{
"": "63b8bea7",
"1": {
"": "d5c14568"
}
}
Why does the homebridge plugin not find my device? FYI, my fan is new (one of those fans with the integrated BOND) and I am running the new Bond app. Everything works well from the app, and I can also send commands from Terminal in my computer using the API.
Thanks again.
To be clear, I was only implying that the API was not functioning correctly. I'll quickly explain what the API response means. Looking at this response:
{ "_": "bde50a34", "00000003": { "_": "b28a5c82" }, "00000018": { "_": "e7cd6d8e" }, "1b8d06c6": { "_": "23a40915" }, "38b3b9ca": { "_": "afee19c7" } }
00000003
,00000018
,1b8d06c6
and38b3b9ca
are the different device ids on this Bond. The first object in the response ("_": "bde50a34"
) is related to the bond itself and doesn't mean anything to the plugin.Another suggestion would be to re-create the device in the new Bond Home app. That would hopefully get it to show up in the API response.
I'm also happy to take any PRs! I can't replicate the issue on my end so it's difficult to debug it.
from homebridge-bond.
one of those fans with the integrated BOND
Oh interesting, I didn't even think about that being a factor. I'm wondering if the API behaves differently for those devices. Can you add "debug": true
to your Bond platform config (assuming you're on 2.1.2)? That'll print out all of the API requests and responses, which should help diagnose what's happening
from homebridge-bond.
@KCFT23 can you post your config.json? At least the relevant section to the bond plugin.
from homebridge-bond.
@KCFT23 can you post your config.json? At least the relevant section to the bond plugin.
"platforms": [
{
"platform": "Bond",
"bond_ip_address": "192.168.1.XXX",
"bond_token": "XYZxyzXYZxyz"
}
from homebridge-bond.
Ok, here are the results of adding "debug": true...
[10/2/2019, 2:48:51 PM] [Bond] 0 cached accessories were loaded
[10/2/2019, 2:48:51 PM] [Bond] Getting devices...
[10/2/2019, 2:48:51 PM] [Bond] DEBUG: Request [GET http://192.168.1.1XXX/v2/devices] - body: {}
[10/2/2019, 2:48:51 PM] Homebridge is running on port 518XX.
[10/2/2019, 2:48:51 PM] [Bond] DEBUG: Response [GET http://192.168.1.XXX/v2/devices] - {"1":{"":"d5c14568"},"":"63b8bea7"}
[10/2/2019, 2:48:51 PM] [Bond] 0 devices were found on this Bond.
[10/2/2019, 2:48:51 PM] [Bond] Attempting to add 0 devices that were not previously added.
from homebridge-bond.
Ohhhh man, I see the issue. In an attempt to ignore that first object ("_"
), I was checking the length of the key to make sure it was at least 2 characters, which is ignoring your device. I just fixed it in 2.1.3, so please update to the latest version and let me know!
from homebridge-bond.
Awesome! I will test is as soon as I get home. Thanks!!!
from homebridge-bond.
Some progress, please see debug log below. Now it finds one device! However, the request for commands fails - it results in an empty response. I verified and this is the case from the terminal/API too. It results in a "404 Not Found" error. However, if I run the curl with http://192.168.1.XXX/v2/devices/1/ and exclude the "commands", then I get the right response:
{"name":"Office Fan","location":"Office","type":"CF","actions":["TurnOn","TurnOff","TogglePower","SetSpeed","IncreaseSpeed","DecreaseSpeed","TurnLightOn","TurnLightOff","ToggleLight","SetBrightness","IncreaseBrightness","DecreaseBrightness","CycleBrightness","SetTimer","BreezeOn","BreezeOff","SetBreeze","SetDirection","ToggleDirection"],"":"XXXXX","state":{"":"YYYYY"},"properties":{"_":"ZZZZZ"}}
Is this something you can accommodate in the plugin? Maybe "If Device < 10 then use the curl http://192.168.1.XXX/v2/devices// and skip the "commands" at the end? Thanks!
[10/2/2019, 9:20:12 PM] [Bond] 0 cached accessories were loaded
[10/2/2019, 9:20:12 PM] [Bond] Getting devices...
[10/2/2019, 9:20:12 PM] [Bond] DEBUG: Request [GET http://192.168.1.XXX/v2/devices] - body: {}
[10/2/2019, 9:20:12 PM] Homebridge is running on port 518XX.
[10/2/2019, 9:20:12 PM] [Bond] DEBUG: Response [GET http://192.168.1.XXX/v2/devices] - {"1":{"":"XXXXXX"},"":"YYYYYY"}
[10/2/2019, 9:20:12 PM] [Bond] 1 devices were found on this Bond.
[10/2/2019, 9:20:12 PM] [Bond] Attempting to add 1 devices that were not previously added.
[10/2/2019, 9:20:12 PM] [Bond] DEBUG: Request [GET http://192.168.1.XXX/v2/devices/1/commands] - body: {}
[10/2/2019, 9:20:12 PM] [Bond] DEBUG: Response [GET http://192.168.1.XXX/v2/devices/1/commands]
[10/2/2019, 9:20:12 PM] [Bond] Error getting devices: TypeError: Cannot convert undefined or null to object
from homebridge-bond.
Interesting that it is failing. The commands
request is what I use to determine the number of speeds available. Here's an example speed command:
{
"name": "Speed 2",
"action": "SetSpeed",
"argument": 2,
"button_type": "tap",
"category_name": "Fan",
"feedback": "state.power==1 and state.speed==2",
"icon": "speed_2",
"hidden": false,
"_": "198754ea",
"signal": {
"_": "dd3f678b"
},
"tx": {
"_": "45753734"
}
}
The argument
is the value I need to pass along to the setSpeed
action. (What you have stumbled on is the Device Info API)
I just looked at the API docs again and found the Properties endpoint, which provides a max_speed
. Using that makes the assumption the user started with speed 1 and sequentially moved up (which would break if a fan had speeds of 1 / 3 / 5), but I suppose I could use that as a fallback if the commands request fails... I need to think on that.
I'm really curious as to why the commands request fails when it's clearly documented. Might be worth posting in the Bond forum to see what they say.
from homebridge-bond.
Yes, I am also puzzled. It should work according to the documentation. I just looked to see if there were any firmware updates and sure enough, there was one. However, updating the firmware did not fix the commands issue. I will post in the BOND forum to alert them about this issue.
I can confirm that the using the curl with http://192.168.1.XXX/v2/devices/1/properties works fine and I can see the correct max speed of my fan.
Thanks again.
from homebridge-bond.
I just upgraded mine and still no accessories. I"m going to try and re-add one of them.
from homebridge-bond.
I just upgraded mine and still no accessories. I"m going to try and re-add one of them.
Yes, that is a good idea. If that doesn't work, you may want to try something I found in my quest for information about this. I stumbled with posts from others that seem to have exactly the same issue as you. They suggest adding a new "device", but this time instead of adding the device use the "remote control" option in the app and make the BOND learn the remote buttons one by one. Good luck!
from homebridge-bond.
It worked!! I added it as new just like you said and I can see one fan now. Now I"m franticly teaching my house for a 9volt battery to re-add the other fan.
from homebridge-bond.
@sofakingcopter great to hear! can we consider this issue closed?
@KCFT23 - keep me posted on what you learn in the Bond forum. Feel free to open another issue when there are any changes
from homebridge-bond.
No luck yet with the Bond forum. However, I have confirmed my Device is missing the "commands". You can see it here:
{ânameâ:âOffice Fanâ,âlocationâ:âOfficeâ,âtypeâ:âCFâ,âactionsâ:[âTurnOnâ,âTurnOffâ,âTogglePowerâ,âSetSpeedâ,âIncreaseSpeedâ,âDecreaseSpeedâ,âTurnLightOnâ,âTurnLightOffâ,âToggleLightâ,âSetBrightnessâ,âIncreaseBrightnessâ,âDecreaseBrightnessâ,âCycleBrightnessâ,âSetTimerâ,âBreezeOnâ,âBreezeOffâ,âSetBreezeâ,âSetDirectionâ,âToggleDirectionâ],"":âXXXXXXXXâ,âstateâ:{"":âYYYYYYYâ},âpropertiesâ:{"":âZZZZZZZâ},âaddrâ:{"":âAAAAAAAâ}}
There is actions, properties, state, etc., but no "commands".
from homebridge-bond.
Ahh good point. That could be used to determine if the commands request should be made in the first place
from homebridge-bond.
Ahh good point. That could be used to determine if the commands request should be made in the first place
Yes. Now someone in the bond forum verified: the API states "Commands are only present in bridge devices". So it is normal that a device like mine (and all the Smart by Bond devices) do not have "commands". It would be great if the plug-in can take this into consideration.
Thanks again!
from homebridge-bond.
@KCFT23 glad we were able to clear that up. I'm closing this issue but have opened a new one for your specific use case: #34
from homebridge-bond.
Related Issues (20)
- 404 and TypeError during startup from request to devices/__ HOT 3
- Failing to Add New Devices HOT 2
- Change allowed origin or ease connection for somfy (awning)
- Fireplace shows as a light HOT 18
- Fans not showing up in Home App HOT 1
- Blinds need slider for blinds that support SetPosition
- Getting error "Unable to find Bond for IP Address" with proper IP address and Bond Token configured HOT 19
- Fireplace On/Off inverted and need control of flame in Homekit
- ERR_INVALID_CHAR When trying to load
- Device removed from Bond, but still shows in Home.app HOT 1
- Device removed from Bond, but still shows in Home.app HOT 1
- Uncaught JSON Parsing Error Terminating Plugin
- Using Bond for kitchen hood
- Shade controls and status are inverted HOT 1
- Setting to disable bond.api.toggleFan when changing fan from off to a set speed HOT 3
- Shade SetPosition is restrained HOT 3
- Smart by bond fans not showing up in home app
- state / percentage / operation issue after stopping
- Blinds Stop Control
- Scene and/or Group Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-bond.