Comments (10)
You have a communication issue likely caused by a firewall.
These are really basic HTTP requests so if the devices are online and the config is correct they should work unless a firewall is blocking the port on the plugin side
from homebridge-hubitat-tonesto7.
You have a communication issue likely caused by a firewall.
These are really basic HTTP requests so if the devices are online and the config is correct they should work unless a firewall is blocking the port on the plugin side
Look at the logs I supplied again. How does something blocking a port let through fader operations but not on/off?
I can assure you there is no firewall in place. I'm happy to assist you with debugging.
from homebridge-hubitat-tonesto7.
from homebridge-hubitat-tonesto7.
Of note, FYI I'm not quite sure at least for this purpose that your GOOD debug logging has much value. It seems to be echoing a code block, rather than showing us the data sent or received.
[11/7/2020, 4:59:10 am] [Hubitat-v2] GOOD: [CHARACTERISTIC (function On() {
var _this = _super.call(this, 'On', On.UUID) || this;
_this.setProps({
format: "bool" /* BOOL */,
perms: ["pr" /* READ */, "pw" /* WRITE */, "ev" /* NOTIFY */]
});
_this.value = _this.getDefaultValue();
return _this;
}) GET] switch (P3 - Crystals) | LastUpdate: (Sat Nov 07 2020 04:56:56 GMT-0800 (Pacific Standard Time)) | Value: (false)
Shouldn't this perhaps be DEBUG, while some of the much more concise DEBUG logs would seem to be more useful?
[11/7/2020, 12:02:37 pm] [Hubitat-v2] DEBUG: sendStartDirect Resp: {"status":"OK"}
This is a bit confused I think (as per my edits on this message) by the choice to send GOOD logs when debug is enabled:
if (this.logConfig.debug === true) this.log.good(`[CHARACTERISTIC (${char}) GET]
And of note, when an operation fails there is no debug output--which seems like the ideal time to dump some data.
[11/7/2020, 4:59:07 am] [Hubitat-v2] NOTICE: Sending Device Command: on | Name: (P4 - Breeze Fan) | DeviceID: (809) | LocalCommand: (false)
[11/7/2020, 4:59:08 am] [Hubitat-v2] ERROR: sendDeviceCommand Error: [object Object] | Message: Request failed with status code 500
from homebridge-hubitat-tonesto7.
#27 is IMHO a logging improvement. It doesn't seem likely to cause other issues but your judgement call
from homebridge-hubitat-tonesto7.
Okay, some more debugging. Don't know if the initial registration is the problem, but disabling Cloud now works for local devices. And switch on/off works fine locally! Flip back to cloud, on/off doesn't work. Back to local it works fine. So something is wrong with the Cloud update for on
/off
that doesn't affect setLevel
It appears err.response
is undefined when a 500 error happens, so replacing that with JSON.stringify(err)
I get this output:
DEBUG: Sending {"method":"post","url":"https://cloud.hubitat.com/api/2020abcd-1a2b-3c4d-5e6f-123456abcdef/apps/512/808/command/on","params":{"access_token":"1a2b3c4d-9f8e-1a2b-3c4d-9f8e7d6d5c4b1fdd71"},"headers":{"evtsource":"Homebridge_Hubitat-v2_512","evttype":"hkCommand"},"timeout":5000}
ERROR: sendDeviceCommand {"message":"Request failed with status code 500","name":"Error","stack":"Error: Request failed with status code 500\n at createError (/homebridge/node_modules/homebridge-hubitat-tonesto7/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/homebridge/node_modules/homebridge-hubitat-tonesto7/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/homebridge/node_modules/homebridge-hubitat-tonesto7/node_modules/axios/lib/adapters/http.js:244:11)\n at IncomingMessage.emit (events.js:327:22)\n at endReadableNT (_stream_readable.js:1220:12)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)","config":{"url":"https://cloud.hubitat.com/api/2020abcd-1a2b-3c4d-5e6f-123456abcdef/apps/712/808/command/on","method":"post","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","evtsource":"Homebridge_Hubitat-v2_512","evttype":"hkCommand","User-Agent":"axios/0.21.0"},"params":{"access_token":"1a2b3c4d-9f8e-1a2b-3c4d-9f8e7d6d5c4b1fdd71"},"transformRequest":[null],"transformResponse":[null],"timeout":5000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1}} | Message: Request failed with status code 500
from homebridge-hubitat-tonesto7.
You've been busy :)
Thanks for working on this stuff... I'm not sure why you are seeing so many errors, but I'm glad someone is reviewing the logging to make it more readable useful.
I'm in the middle of working on v2.1.0 of the main app and I will make sure to merge any more finding you make into v2.1.0 of the plugin.
I just tested using cloud and I'm able to duplicate your finding of the 500 errors. I will investigate and get the fix out in the next release
from homebridge-hubitat-tonesto7.
Thank you for developing this! It been been tremendously useful.
I really suspect my errors were around regenerating and regenerating the access token. The last two times I was super careful to regenerate then completely exit the app and I've had no problems (other than the 500 for this)
Everything else is working fantastically!
from homebridge-hubitat-tonesto7.
I tracked the issue down. It's because I wasn't passing the header key 'Content-Type': 'application/json'
:(
from homebridge-hubitat-tonesto7.
This issue is now resolved and the fix is in the latest code
from homebridge-hubitat-tonesto7.
Related Issues (20)
- [Feature Request] Sync Rooms between Hubitat/HomeKit HOT 1
- (BUG) Device status not updating outside polling interval HOT 2
- Hubitat Virtual Switch only syncs from Homekit to Hubitat HOT 1
- Plugin does not load in Homebridge on Raspberry Pi HOT 1
- (BUG) Plug-in Crashes Homebridge at startup HOT 1
- Hello: HOT 1
- add info about dehumidifier HOT 5
- bug about Thermostat Sinope TH1124ZB HOT 3
- Issue with Eria Switch HOT 1
- (BUG) This plugin generated a warning from the characteristic 'Brightness' HOT 6
- Mapping of certain HomeKit variables. HOT 6
- Homekit Window Shade Positioning HOT 9
- Garage Door Opening does not fire off notification on V 2.90 and greater HOT 16
- [Device Support] Homebridge reporting error getting value for Characteristic using Attribute (alarmSystemStatus) HOT 1
- [Device Support] (BUG) Hampton Bay Zigbee Fan Controller - Incorrect Speed Enumeration HOT 13
- (BUG) VERY long delays in notifications for lock/unlock of locks attached to Hubitat HOT 11
- Socket Hang up HOT 1
- (BUG) {HSM triggering in HomeKit during Intrusion Delay} HOT 2
- Error getting value for Characteristic [Current Position] Using Attribute (position) for blinds HOT 1
- (BUG) Dimming a light under 5% causes setLevel to be called with value 0 and command fails in hubitat
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-hubitat-tonesto7.