Giter Club home page Giter Club logo

Comments (9)

Kane610 avatar Kane610 commented on September 21, 2024 1

If you do a custom component you could as well fork pydeconz

from deconz.

Kane610 avatar Kane610 commented on September 21, 2024 1

I am improving pydeconz to map all attributes of devices (including this temperature value) so it will be added to hass in release 88 or 89.

from deconz.

Gronis avatar Gronis commented on September 21, 2024

In deconz:
screen shot 2018-10-06 at 16 42 47
In home assistant:
screen shot 2018-10-06 at 16 49 52

from deconz.

Kane610 avatar Kane610 commented on September 21, 2024

Hmm. If it reports temperature correctly it should appear. Can you enable debug per component documentation and post the json data for that device?

from deconz.

Kane610 avatar Kane610 commented on September 21, 2024

I just saw your post in Svenska hemautomatiseringsgruppen. I didn't realize it is the same as the once in door sensors. There is a different PR requesting support for the door sensors and due to the poor quality of the temp sensor I'm not inclined to add support for it.

from deconz.

Gronis avatar Gronis commented on September 21, 2024

As I understand, the readings are not very accurate. I'm not sure if that is because of a bad sensor or bad tuning of the sensor. Personally, my readings are very stable, but it seems to be slightly higher than ground truth, so it might be a tuning problem.

Either way, I understand that you are not inclined to add support for it, but since the temperature is reported to deconz by the sensor, I think it's accurate to report it to home-assistant as well.

from deconz.

callelj avatar callelj commented on September 21, 2024

I started looking into this and here is an example of what deconz sends on the REST API (badly formated):
"18":{ "config":{ "battery":100, "on":true, "reachable":true, "temperature":2400, "tholddark":12000, "tholdoffset":7000 }, "ep":1, "etag":"6f5621302c442acd784b9d85ee7a191e", "manufacturername":"LUMI", "modelid":"lumi.sensor_motion.aq2", "name":"PIR5", "state":{ "dark":true, "daylight":false, "lastupdated":"2018-10-24T18:22:40", "lightlevel":0, "lux":0 }, "type":"ZHALightLevel", "uniqueid":"00:15:8d:00:02:22:be:5a-01-0400" }, "19":{ "config":{ "battery":100, "duration":60, "on":true, "reachable":true, "temperature":2400 }, "ep":1, "etag":"6f5621302c442acd784b9d85ee7a191e", "manufacturername":"LUMI", "modelid":"lumi.sensor_motion.aq2", "name":"PIR5", "state":{ "lastupdated":"2018-10-24T18:23:41", "presence":false }, "type":"ZHAPresence", "uniqueid":"00:15:8d:00:02:22:be:5a-01-0406" },
The temperature is for some objects stored in the "ZHALightLevel" object as a value in the "config" section and for some under the same sction in the "ZHAPresence" object. And for the Aqara water sensors it is the same place but for the "ZHAWater" object.

One possible solution would be to do similar to how battery is handled in DeconzSensor class and store like this:
self._temperature = device['config'].get('temperature')

Also to note is that some devices have the temperature value but it's always 0.

I guess since the battery is reported and that isn't very accurate (always stuck at 100%) then why shouldn't the temperature be able to be reported?

from deconz.

Kane610 avatar Kane610 commented on September 21, 2024

Same place for different sensors then. Yes that would be the solution.

But apart from Xiaomi there are other devices that send battery in a proper way so just because Xiaomis battery status isn't the most accurate doesn't actually warrant supporting their poor temperature sensor as well ;).

I also want to avoid creating sensors that always report 0 as a value. We have this issue with certain Osram power plugs reporting 0 for power usage. And I really want to avoid a lot of extra checking for devices with 0-values that can be ignored in HASS. Maybe when hass supports ignoring specific entities...

from deconz.

callelj avatar callelj commented on September 21, 2024

Reporting static 0 values is bad but reporting static 100% values are equally bad. I wish the battery worked because I think the values are actually sent in the zigbee msgs, just in a non-standard way.

I first tried to get the temperature values by making a custom component of deconz in HA but it's not possible for a user of pydeconz to get the temperature values since the values in "device['config']" are not stored anywhere and are thrown away in init. Might be possible to do some python magic but I just need a way to get the temperature value from the object.

Another solution is to store the whole config but that kind of works against the separation of concerns...

A third solution is just that I give up and try to parse the values with a REST component myself.

from deconz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.