sieren / Homepoint

Espressif ESP32 Based Smarthome screen for MQTT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Homepoint and Domoticz?

nahoj58 opened this issue · comments

I'm trying to get data (temperature and humidity) and display thos in Homepoint and maybe also some switches.
But via MQTT Domoticz only publishes domoticz/out. How to select the right device? There is no idx to the gettopic / settopic.
Do I miss something /can somebody help me please.

Johan

Hi' @nahoj58

I'm not familiar with Domoticz at all, but googled info about Domoticz MQTT message structure.
Single payload values are apparently not used by Domoticz - only JSON formatted messages. So with current HomePoint version, I don't believe it's possible to control switches or lights as HomePoint is listening for payload values on and off and not JSON payloads. I believe though, that Matt is currently planning/doing a rewrite that will have the option to check for state in a JSON payload as well.

But you should be able to display a temperature/humidity sensor with somthing like this in HomePoint:
(Assuming temperature data is svalue1 and humidity is svalue2 and default Domoticz topic is used)
For this setup you'll also have to load two icons with same name as in firstIcon and secondIcon

{
    "name": "Greenhouse",
    "type": "Sensor",
    "icon": "garden",
    "devices": [{
      "name": "Greenhouse",
      "type": "combinedValues",
      "firstIcon": "temperature_small",
      "secondIcon": "humidity_small",
      "jsondata": true,
      "firstKey": "svalue1",
      "secondKey": "svalue2",
      "getTopic": "domoticz/out"
    }

Ciao !

Hi' @nahoj58

Sorry, wasn't thinking.
Of course you'll need an identifier, unless you only have one device 🙄

Sorry, this will require a specific Domoticz integration in Home Point. And unfortunately I can't help with the programming part.
When Matt get to the specific Zigbee2MQTT / Home Assistant formats he might include a specific Domoticz mode as well that checks for specified index in JSON message as identifier. The Domoticz format looks pretty straight forward to me.

Alternatively you could convert the Domoticz MQTT messages with MQTTfx, Nodered or similar to act as 'translator' between Domoticz <-> Home Point.

Ciao !

You need to reconfigure domoticz to publish all messages on an index topic (or you could use name I guess but that would be more complex)
in Domoticz go to settings -> hardware -> click on your MQTT Client Gateway with LAN interface
Then under Publish Topic: pick from the dropdown "Index"
The explanation says: Index - publish outgoing messagen on topic {domoticz/out}/$idx

So for example I have a temperature and humidity sensor in my bedroom which has index 36 in domoticz
I show temperature (in my sensor json output of svalue1) and humidity (in my sensor json output of svalue2) in 1 scene like this on the homepoint config:

{
"name": "Bedroom",
"type": "Sensor",
"devices": [{
"name": "TH",
"type": "combinedValues",
"jsondata": true,
"firstIcon": "temperature_small",
"secondIcon": "humidity_small",
"firstKey": "svalue1",
"secondKey": "svalue2",
"getTopic": "domoticz/out/36"
}]
}

Note: the device name ("TH" in my case) is not important as it's nowhere shown, it only shows the scene name (in my case "Bedroom")
perhaps that name can even be skipped @sieren? (I just based this snippet on examples I found...)

Here is another example where I combine 2 different (temperature) sensors index 73 and 74 in 1 scene:
{
"name": "AC Sensor",
"type": "Sensor",
"devices": [{
"name": "t_inside",
"type": "singleValue",
"jsondata": true,
"firstIcon": "temperature_small",
"firstKey": "svalue1",
"getTopic": "domoticz/out/74"
},
{
"name": "t_outside",
"type": "singleValue",
"jsondata": true,
"firstIcon": "temperature_small",
"firstKey": "svalue1",
"getTopic": "domoticz/out/73"
}]
},

We'll if Domoticz topics can be altered to device specific topics, you're home free 👍
Actually googled for something like that and couldn't find anything. Other than warnings about changing default Domoticz topic at all (most likely to keep structure 'clean' and ensure all devices can communicate wih Domoticz without issues)

oh I run betas ... :)
2020.2 build 13058 (dated 2021-03-08)

Solution: Shift to beta 👍😆

Hi' @nahoj58

I'm sorry, but I have absolutely no idea about the stability of Domoticz betas.
Don't even know the program at all.

I would suggest you googled for issues and made a full backup of Domiticz, data and setup before trying it out.

I run it already a couple of years in beta and despite a couple hiccups here and there (like some graphs not fully plotting or half invisible (you could see the values if you mouseover, but the actual lines were missing)
I have not really had any serious issues...
But as @htvekov said: backup and test is the best way forward :)
Also the beta gets like updates every couple of days ...

my domoticz is just installed in /home/pi/domoticz (I guess thats according to the standards... ? )
since you just run in that directory the "updatebeta" script ...
just keeping a copy around of the whole directory contents is enough I suppose ... :)

you need to install something like winscp ... if you configure that to connect to your raspberry pi you can just browse through it and download stuff...
But anyway this is beyond the scope of the original question... for domoticz support see the domoticz pages I'd say...