MrRacoon / lifx-client

Node executable for interfacing with the Official LIFX API
22 stars 3 forks source link

Toggle option not working #7

Closed Subbeh closed 4 years ago

Subbeh commented 4 years ago

Thanks a lot for developing and sharing what you've made! It works great for what I've tried so far, except for the toggle option:

$ lifx -T
{
  "name": "FetchError",
  "message": "invalid json response body at https://api.lifx.com/v1/lights/group:Office/toggle reason: Unexpected end of JSON input",
  "type": "invalid-json"
}

I can work around this by making my own toggle using the -0/-1 options, but it would be nice to see this working. Let me know if you need me to provide any more information.

Subbeh commented 4 years ago

The method in the togglePower.js file needs to be changed from PUT to POST and it works

MrRacoon commented 4 years ago

Hey there, sorry for the delay.

v2.0.3 should fix this. Thanks for the callout