-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support MQTT Discovery (AD) with Domoticz #2177
Comments
Just got an (immediate :-) ) reply on the same from Domoticz in this post https://www.domoticz.com/forum/viewtopic.php?p=321086#p321086. It refers to the development branch of the same: https://github.com/domoticz/domoticz/blob/development/hardware/MQTTAutoDiscover.cpp. |
Thanks. I'll take a look. Interesting that this file is 5200 lines without a single comment and there isn't any documentation either. I guess most people have moved over to Home Assistant |
Looks like Domoticz does support select, switch and climate so we can add that back in. Except for 'text'. And we need to make sure every entity has a uom ("unit_of_meas") set |
Remember #1360 (comment)
I think this is still valid. |
yes, we just replace 'text' and also fix the analog & temp sensors (I made TODOs). I'll do the final changes after your PR is merged. |
made some changes in dev-4 that need testing (when the PR is merged). I'm not sure how to handle the uom for sensors without a uom (like a number). It's not clear from the Domoitcz c++ code how they handle this. |
with the risk of posting 'old news'...
|
It needs to be a number, but looking through the Domoticz code, I can't find anything that would be suitable for a numerical value. They have a condition here that says if there is no uom then it will default to a number, otherwise a string. So in theory, it should work. Can you try dev-4 at https://github.com/proddy/EMS-ESP32/releases/tag/latest ? |
I have quick tested rev-4. Still the UMO is ?? in domoticz. |
ok, thanks for trying. For the ?? (like Tx Reads) I don't know what to do, or to add. For the number ones, the same. Perhaps you can adjust the topics in MQTTExplorer directly until it starts working in Domoticz |
For the Lines 1142 to 1144 in 77330c9
we send no uom for NONE, but uom_to_string(uom) would give back a space.If HA does not like it, you can add for domotics.
@Brugje : The number values are only generated for type DOMOTCZ-Latest, selecting the DOMOTICZ as type should publish as sensor. |
good spot Michael. @Brugje wen you can test the dev-4 version from this link: https://github.com/proddy/EMS-ESP32/releases/tag/latest |
@Domoberry re: your previous comment about wanting to use Sensors instead of numbers. You can either set the Entity Format to DOMOTICZ (not the latest) and it will not use numbers. But the correct method is to use the EMS-ESP Customizations Module and mark those writable entities 'read-only' by checking the "disable write action' icon. The change should be immediate, no need to restart anything. I'll create a new issue for the other corrections (price, noise times etc.). Thanks for testing. |
dat is jammer. i thought we had fixed this. Keep using the Domoitcz (latest) so you have the numbers, you can always make them sensors by making them read-only/not-writable via the EMS-ESP Customizations Web module. Would you mind send the topic for one of those numbers in MQTT Explorer, say the boiler_selflowtemp. We can see what the unit_of_measure is set to. It should be a space " " |
The uom for this is not " " but degrees C. |
ok so Tx Reads works now, or still showing ?? I need an example of an MQTT topic where it is not showing what you expect |
good testing! Two things more:
|
I found at domoticz that there is a (thermostat) setpoint device. Is this something we can work with? |
A general setpoint device would be great for setting generic parameters indeed. |
I have asked this at the domoticz github page and their answer is here |
The link did not work in my case, the link-text is correct though |
We need to get the basic working working again. It hasn't been touched in years and and suddenly things are broken. Maybe something changed on the Domoticz side that is not in line with the MQTT autodiscovery standard which Home Assistant, I believe, invented. As I mentioned before it is very hard for me to work on this as I'm stretched for time and have no Domoticz environment to test against. I'm relying on someone from the 10K+ EMS-ESP users to help us. It's really just a matter of understanding the MQTT config topics and manually editing them using MQTT Explorer until it works as it should. Same with the setpoint thermostat thing. How about if a give you a https://www.home-assistant.io/green? :-) |
There's been a few comments in various issues around correct support for Domoticz, so thought best to create it's own GitHub Issue for tracking progress.
@bbqkees pointed me to https://github.com/domoticz/domoticz/blob/master/hardware/MQTTAutoDiscover.cpp so now we can see what is and what isn't supported.
This is related to #2138 and #2156
The text was updated successfully, but these errors were encountered: