Closed OfficialVreesie closed 3 years ago
Hi, thanks for your issue report! Right the first steps are:
nl = Nanoleaf("192.168.x.xx")
nl.generate_auth_token()
It looks like you've done this, so the next step is to remove the generate_auth_token()
call and just initialise the Nanoleaf object with your token like this:
auth_token = "TOKEN"
nl = Nanoleaf("192.168.x.xx", auth_token, print_errors=True)
Now you can start calling the methods as listed without having to get a new key every time. Also try setting the print_errors
argument to True as shown above to help me diagnose the issue. Then try repeating nl.toggle_power()
and nl.set_color((255, 0, 0))
and please tell me the result of that. Thanks!
Thanks, this fixed it.... I did saw it indeed in the code!
Hi, I have a problem using the nanoleafapi.
Problem
I am trying to toggle the power of my nanoleaf using the following command:
nl.toggle_power()
, but that gives me the following error:Expecting value: line 1 column 1 (char 0)
What I did
nl.set_color((255, 0, 0))
, it returns False and nothing happensCode
Here is my full code (not much)
What am I doing wrong?