Closed NathanSweet closed 2 years ago
Interesting. I cannot reproduce this with my setup, where the only temperature sensors are in two Hue motion sensors. Could you provide the JSON that your Bridge returns on sensors? Temperature sensors are supposed to be the ones where "type" is either "zlltemperature" or "cliptemperature".
I have two Hue motion sensors. How do I see the JSON with your library?
Technically you can't do that, but calling hue.getRaw().getSensors()
would be the next best thing. :)
Here you go!
4={"name":"Hue temperature sensor 1","type":"ZLLTemperature","state":{"temperature":null,"lastupdated":"none"},"swupdate":{"state":"noupdates","lastinstall":"2022-02-05T19:57:32"},"config":{"on":false,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"pending":[]},"modelid":"SML001","manufacturername":"Signify Netherlands B.V.","swversion":"6.1.1.27575","uniqueid":"00:17:88:01:09:19:76:4a-02-0402","recycle":null,"productname":"Hue temperature sensor","capabilities":{"certified":true,"primary":false,"inputs":null}}
9={"name":"Hue temperature sensor 2","type":"ZLLTemperature","state":{"temperature":null,"lastupdated":"none"},"swupdate":{"state":"noupdates","lastinstall":"2022-02-05T19:57:25"},"config":{"on":false,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"pending":[]},"modelid":"SML001","manufacturername":"Signify Netherlands B.V.","swversion":"6.1.1.27575","uniqueid":"00:17:88:01:09:19:78:9b-02-0402","recycle":null,"productname":"Hue temperature sensor","capabilities":{"certified":true,"primary":false,"inputs":null}}
Maybe the sensors have never reported a temperature to the lib? I haven't been running the lib much, and not for long periods of time.
Thanks! This reminds me of #34 where a daylight sensor was throwing an NPE for someone who was using the Apple Home Kit instead of the official app. Would you happen to be using that (or some other special software)?
I'm just using Java and 2 Hue motion sensors. It's the first thing I've tried to do with the library.
Right, I don't think this library can confuse the Bridge. Have you taken those motion sensors into use in the app in any way, like are they supposed to be controlling some lights in your house?
Anyway, I should certainly fix the library so that it doesn't throw if the temperature is null.
Figured it out: the motion sensors were disabled in the Hue app. Once enabled I get temperature values.
Excellent, thank you for the information!
This has now been fixed in version 2.6.0.
Gives me: