Skip to content
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

Homepoint and Domoticz? #159

Open
nahoj58 opened this issue Feb 26, 2021 · 17 comments
Open

Homepoint and Domoticz? #159

nahoj58 opened this issue Feb 26, 2021 · 17 comments

Comments

@nahoj58
Copy link

nahoj58 commented Feb 26, 2021

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

@htvekov
Copy link

htvekov commented Mar 4, 2021

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 !

@nahoj58
Copy link
Author

nahoj58 commented Mar 8, 2021 via email

@htvekov
Copy link

htvekov commented Mar 8, 2021

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 !

@ghosty-be
Copy link
Contributor

ghosty-be commented Mar 8, 2021

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"
}]
},

@htvekov
Copy link

htvekov commented Mar 8, 2021

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)

@nahoj58
Copy link
Author

nahoj58 commented Mar 9, 2021 via email

@ghosty-be
Copy link
Contributor

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

@htvekov
Copy link

htvekov commented Mar 9, 2021

Solution: Shift to beta 👍😆

@nahoj58
Copy link
Author

nahoj58 commented Mar 10, 2021 via email

@nahoj58
Copy link
Author

nahoj58 commented Mar 10, 2021 via email

@htvekov
Copy link

htvekov commented Mar 12, 2021

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.

@ghosty-be
Copy link
Contributor

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 ...

@nahoj58
Copy link
Author

nahoj58 commented Mar 15, 2021 via email

@ghosty-be
Copy link
Contributor

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 ... :)

@nahoj58
Copy link
Author

nahoj58 commented Mar 16, 2021 via email

@ghosty-be
Copy link
Contributor

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...

@nahoj58
Copy link
Author

nahoj58 commented Apr 1, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants