I've noticed a couple of strange things now that I'm looking more at my Xaiomi devices..
For device 9, which is a multi function device, which does temperature, pressure and humidity (I'll attach the JSON at the end).
As you can see from the screen shot, the battery Pressure 9 and Battery Humidity 9 aren't grouped with the others. Even if it were, I think it would still look a little strange - wouldn't it be something like 'Device 9 root', with the battery, temp etc as child objects? Since it's a single multi function device, there should be no need for the 3 batteries.
I can understand why there's 3 battery devices showing - the JSON is pulling back 3 devices, and there's a battery object in each, but since the unique ID is, well unique, other than the function suffix, they should be able to be grouped together, or ideally eliminated. You could just return the temperature battery value, but check all 3, and drop an error status in the root object if they do not match?
Looking at the device in Phoscon, it's only showing a single battery when you bring up the device, which makes sense, since there's only one battery in it.
G
For device 9, which is a multi function device, which does temperature, pressure and humidity (I'll attach the JSON at the end).
As you can see from the screen shot, the battery Pressure 9 and Battery Humidity 9 aren't grouped with the others. Even if it were, I think it would still look a little strange - wouldn't it be something like 'Device 9 root', with the battery, temp etc as child objects? Since it's a single multi function device, there should be no need for the 3 batteries.
I can understand why there's 3 battery devices showing - the JSON is pulling back 3 devices, and there's a battery object in each, but since the unique ID is, well unique, other than the function suffix, they should be able to be grouped together, or ideally eliminated. You could just return the temperature battery value, but check all 3, and drop an error status in the root object if they do not match?
Looking at the device in Phoscon, it's only showing a single battery when you bring up the device, which makes sense, since there's only one battery in it.
G
ZHATemperature **************************** Object info ***************************** { "ep": 1, "etag": "5111c21a24f0497555cecc263d0789a6", "state": { "temperature": 2003, "lastupdated": "2019-01-04T13:18:29" }, "config": { "on": true, "battery": 98, "reachable": true, "offset": 0 }, "name": "Temperature 9", "type": "ZHATemperature", "modelid": "lumi.weather", "manufacturername": "LUMI", "uniqueid": "00:15:8d:00:02:37:4f:ed-01-0402" } ************************* End Object info *************************** |
|||
ZHAHumidity **************************** Object info ***************************** { "ep": 1, "etag": "a0d1228db309feeff9d47c8655516f6c", "state": { "humidity": 4480, "lastupdated": "2019-01-04T13:18:29" }, "config": { "on": true, "battery": 98, "reachable": true, "offset": 0 }, "name": "Humidity 9", "type": "ZHAHumidity", "modelid": "lumi.weather", "manufacturername": "LUMI", "uniqueid": "00:15:8d:00:02:37:4f:ed-01-0405" } ************************* End Object info *************************** |
|||
ZHAPressure **************************** Object info ***************************** { "ep": 1, "etag": "a0d1228db309feeff9d47c8655516f6c", "state": { "lastupdated": "2019-01-04T13:18:29", "pressure": 970 }, "config": { "on": true, "battery": 98, "reachable": true }, "name": "Pressure 9", "type": "ZHAPressure", "modelid": "lumi.weather", "manufacturername": "LUMI", "uniqueid": "00:15:8d:00:02:37:4f:ed-01-0403" } ************************* End Object info *************************** |
Comment