Giter Club home page Giter Club logo

Comments (23)

hanskroner avatar hanskroner commented on September 22, 2024 3

Just got a chance to try the PR. Looks great! All battery levels are exposed individually:

Screen Shot 2021-02-19 at 08 54 55

Thanks for this πŸ˜„

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024 2

Fix has been merged in HASS. Closing this since I see it as solved. Thanks for reporting!

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024 1

So a combination of manufacturer danfoss and those modelids should be sufficient I guess

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024 1

Decide on the path first because changing it down the line means I would need to change stuff a second time

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

Yes, because other devices with multiple endpoints report battery on all end points. This one is the odd one out at the moment. It could be as simple as having some logic based on modelid, typically I like to avoid managing special cases as it makes it harder to maintain over time. This one might be easy enough though

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

To make special cases even more troublesome, this particular device can expose 6 different modelIds - still manageable, but not nice 😞 They can be 0x8020, 0x8021, 0x8030, 0x8031, 0x8034, or 0x8035.

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

Whats the difference between the different modelids? And is it certain no other Danfoss devices expose these modelids?

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

0x8020 and 0x8021 are 24V-powered in-room thermostats, with and without a floor measurement, respectively. 0x8030 and 0x8031 are the battery-powered counterparts. 0x8034 and 0x8035 are in-room thermostats with a dial, instead of a display, with and without a floor measurement, respectively.

No other Danfoss devices expose these modelIds.

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

So our should be 30 and 31 having battery?

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

So our should be 30 and 31 having battery?

0x8030, 0x8031, 0x8034, and 0x8035 will have battery.

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

So a combination of manufacturer danfoss and those modelids should be sufficient I guess

Yeah, that should do it. I just wanted to point out, because I think it's a little crazy, that the modelIds are actually strings - even though they look like hex numbers πŸ€·β€β™‚οΈ

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

All modelids are strings in deconz. But thanks πŸ‘πŸ»

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

Would a better solution to this be to get the REST API to output ZHABattery nodes for each endpoint? I guess I would also need to remove the "config/battery" entries for the HA integration to pick the new nodes up, right?

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

Probably an old structure of the company

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

Would a better solution to this be to get the REST API to output ZHABattery nodes for each endpoint? I guess I would also need to remove the "config/battery" entries for the HA integration to pick the new nodes up, right?

Well I think deconz should go that direction in general. In this case they would still have the same unique id right? So it would still require some special treatment.

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

Well I think deconz should go that direction in general. In this case they would still have the same unique id right? So it would still require some special treatment.

It's me adding support for this device to the REST API. I'm following what it does for the other Danfoss device that it already supports, the Ally TRV, and not exposing ZHABattery sensors. Maybe it's not a great example to follow? For the TRVs, there are ZHATime sensors exposed that I haven't found to be particularly useful. While other well-supported devices (for example, Philips Hue stuff with batteries) do expose ZHABattery sensors - that's why I was asking.

Regardless, I see your point about those ZHABattery sensors having the same uniqueids and still requiring special treatment. Maybe for now it's best to keep it simple and just go by the config/battery entries?

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

It's probably gonna evolve to moredevicew exposing the zha battery so if it's how it should be you should do it. If deconz devs think confug/battery is better go with that

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

The config/battery gets created for sensors with batteries - whether there is a ZHABattery sensor or not. This is true also for the Philips Hue devices, for example. Their motion sensors expose ZHAPresence, ZHATemperature, and ZHALightLevel sensors - all with a config/battery entry - and a ZHABattery sensor (of course, without a `config/battery’ entry).

I’ll talk to the deCONZ devs about the ZHABattery sensor, but since it seems the config/battery entry will be there regardless, could you still special-case it for this device?

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

I've created a draft PR to solve this. Can you try it out?

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

Can you make the automatic naming of the endpoints don't keep the same name? Right now they have the same name.

from deconz.

Kane610 avatar Kane610 commented on September 22, 2024

Have you gotten anywhere with which path regarding config/battery or zhabattery

from deconz.

hanskroner avatar hanskroner commented on September 22, 2024

Can you make the automatic naming of the endpoints don't keep the same name? Right now they have the same name.

You can't really see it in the screenshot, because the names are so long, but they don't have the same names. Every name has the endpoint number correctly appended and can be renamed just fine:

Screen Shot 2021-02-19 at 10 00 35

Have you gotten anywhere with which path regarding config/battery or zhabattery

I've asked, but haven't received any guidance yet. From looking at the REST API code, config/battery seems to be the way to go - which is what the PR you put up handles. ZHABattery entries are used only for a handful of special cases. The ones I have created in my deployment turned out to be created by me when I was experimenting with creating sensor nodes, so I need to recant the statement I made before about Philips Hue products exposing them - they don't.

from deconz.

nagydavid avatar nagydavid commented on September 22, 2024

@hanskroner Can you please guide me how / or when to add the zigbee modul through the phoscon App.
Right now I just plugged in the master controller(not installed) in with the zigbee module to see if deconz finds it. Will the module show us as a device exportable to HA or when I pair it with the thermostats.

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.