-
Notifications
You must be signed in to change notification settings - Fork 18
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
value of power json is always zero #6
Comments
Thank you for posting your issue. I can successfully turn on/off the Power state of one of my lightbulbs using curl.
In the example above, I'm running tradfri-go in server mode. Can you try running the same |
I've added some missing error checks + logging when parsing the REST API requests into JSON which possibly could help you pinpoint your issue. |
the line: You should try running |
When sending the following line of python to the REST-API of tradfri-go in server-mode the value 1 is ignored. It will always default to 0.
requests.put("http://10.42.3.34:8080/api/device/65539/power", data = {"power":1})
tradfri-go/router/router.go
Lines 92 to 94 in a05a6fc
The value of
powerRequest.Power
is already 0 in line 94. I tested with several ways of input, like a json conversion before sending the data or converting it to a string. I also discovered that this also applies to the dimmer and the dimming and setState function.The text was updated successfully, but these errors were encountered: