Re: [mh] MQTT/HomeAssistant
Giles Godart-Brown <[email protected]> Wed, 4 Dec 2024 23:05:51 +0000
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============1734498773932118793== Content-Type: multipart/alternative; boundary="------------2CGg6mdJ9eCcZv4L2P1toCq9" Content-Language: en-GB This is a multi-part message in MIME format. --------------2CGg6mdJ9eCcZv4L2P1toCq9 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit The bidirectional bit between Misterhouse and Home Assistant via MQTT is included in the latest master release. Your items.mht looks like this, (substitute your IP addresses and HA API key) ######################################################################################################### # HA set up ######################################################################################################### # HA_SERVER, obj name, address, keepalive, api_key HA_SERVER, ha_house, 999.999.999.999:8123, 10, .............your api key from HA ................... ######################################################################################################### # MQTT setup ######################################################################################################### MQTT_BROKER, mqtt_1, , 999.999.999.999 MQTT_DISCOVERY, mqtt_disc_mqtt1, homeassistant, mqtt_1, publish So if you have any item in Misterhouse you will need an MQTT_LOCALITEM, then Misterhouse will sync this bi-directionally with HA, GENERIC, Lounge_comfort_temp, Lounge|Comfort_temp #MQTT_LOCALITEM, <mh-mqtt-object>, <mh-object-to-sync>, <mh-mqtt-broker-object>, <ha object type>, <node-id>/<mh-object-to-sync>/+, <discoverable>, <Friendly Name> MQTT_LOCALITEM, Lounge_comfort_mqtt, Lounge_comfort_temp, mqtt_1, number, mh/Lounge_comfort_temp/+, 1, Lounge Comfort If you want to see an HA entity in Misterhouse, you will need an HA_ITEM like this #HA_ITEM, object_name, domain[:subtype], ha_entity, ha_server, groups, options HA_ITEM, Lounge_TV, switch, lounge_tv, ha_house, groups Regards Giles On 04/12/2024 21:47, Spencer Ryan wrote: > Neither. Insteon (PLM)-->Misterhouse<--MQTT-->HomeAssistant > > > > Someone from reddit gave me some code they built to do most of this, > and I'm about to go down the rabbit hole > > Here is the email from the guy along with the code he provided if > anyone is curious > > https://pastebin.com/wRfJYWnV > > https://pastebin.com/fumbhVzw > > https://pastebin.com/pvYnr37n > > https://pastebin.com/378NETi8 > > https://pastebin.com/L05ax8vf > > On Sun, Dec 1, 2024 at 7:43 AM Giles Godart-Brown > <[email protected]> wrote: > > Ryan > > How are you doing this? > > Device > MQTT > Misterhouse > > OR > > Device > MQTT > Home Assistant > Misterhouse > > If its the former then please see > https://github.com/hollie/misterhouse/wiki/Items-mqtt > > Your items.mht will need something like > > <snip> > ######################################################################################################### > # MQTT setup > ######################################################################################################### > MQTT_BROKER, mqtt_1, , 192.168.100.64 > MQTT_DISCOVERY, mqtt_disc_mqtt1, homeassistant, mqtt_1, publish > > ######################################################################################################### > # MQTT devices > ######################################################################################################### > MQTT_DEVICE, Workshop_fingerprint, Workshop|tasmota_fingerprint > ,mqtt_1, tele/Workshop_fingerprint/SENSOR > CODE, $Workshop_fingerprint->{states_casesensitive} = 1; > </snip> > > Then every time something publishes a message to > tele/Workshop_fingerprint/SENSOR your MH object > Workshop_fingerprint->{state} will be set to the message. > You may need to decode this as its likely to be JSON > > Note you can also use wildcards e.g. > <snip> > MQTT_DEVICE, MQTT_LWT, , mqtt_1, tele/+/LWT > </snip> > > If its the latter, then you need to use HA_ITEM and MQTT_LOCALITEM > > Let me know if this helps > > Giles > > On 30/11/2024 18:48, Spencer Ryan wrote: >> A timely email from Giles earlier today. >> >> After my house was almost hit by lightning a few months ago and >> frying a lot of stuff I finally got around to rebuilding my >> Raspberry Pi's. >> >> >> I'm all Insteon, and I wanted to give HomeAssistant another go >> after trying it 5+ years ago, spoiler alert, it's Insteon support >> still is awful. >> >> I'd like to keep MH doing all of the PLM and scene building work, >> Someone on reddit gave me some code to interface between the two >> but I'm looking for some pointers on getting MH set up with MQTT >> from scratch. I don't see a lot (or any?) real documentation on it. >> >> Any pointers? >> >> >> ________________________________________________________ >> To unsubscribe from this list, go to:https://lists.sourceforge.net/lists/listinfo/misterhouse-users >> --------------2CGg6mdJ9eCcZv4L2P1toCq9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <font size="4" face="Calibri">The bidirectional bit between Misterhouse and Home Assistant via MQTT is included in the latest master release. <br> Your items.mht looks like this, (substitute your IP addresses and HA API key)<br> <br> </font>#########################################################################################################<br> # HA set up<br> #########################################################################################################<br> # HA_SERVER, obj name, address, keepalive, api_key <br> HA_SERVER, ha_house, 999.999.999.999:8123, 10, .............your api key from HA ...................<br> <br> #########################################################################################################<br> # MQTT setup<br> #########################################################################################################<br> MQTT_BROKER, mqtt_1, , 999.999.999.999<br> MQTT_DISCOVERY, mqtt_disc_mqtt1, homeassistant, mqtt_1, publish<br> <br> So if you have any item in Misterhouse you will need an MQTT_LOCALITEM, then Misterhouse will sync this bi-directionally with HA, <br> <br> GENERIC, Lounge_comfort_temp, Lounge|Comfort_temp<br> #MQTT_LOCALITEM, <mh-mqtt-object>, <mh-object-to-sync>, <mh-mqtt-broker-object>, <ha object type>, <node-id>/<mh-object-to-sync>/+, <discoverable>, <Friendly Name><br> MQTT_LOCALITEM, Lounge_comfort_mqtt, Lounge_comfort_temp, mqtt_1, number, mh/Lounge_comfort_temp/+, 1, Lounge Comfort<br> <br> If you want to see an HA entity in Misterhouse, you will need an HA_ITEM like this<br> <br> #HA_ITEM, object_name, domain[:subtype], ha_entity, ha_server, groups, options<br> HA_ITEM, Lounge_TV, switch, lounge_tv, ha_house, groups<br> <br> <br> Regards<br> Giles<br> <br> <br> <div class="moz-cite-prefix">On 04/12/2024 21:47, Spencer Ryan wrote:<br> </div> <blockquote type="cite" cite="mid:CALWY-Ypr=8jiVb+bzB4aEot0+o+r2cAdKsbXmG4xRB+MRUuttg@mail.gmail.com"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <div dir="ltr">Neither. Insteon (PLM)-->Misterhouse<--MQTT-->HomeAssistant <div><br> </div> <div><br> </div> <div><br> </div> <div>Someone from reddit gave me some code they built to do most of this, and I'm about to go down the rabbit hole</div> <div><br> </div> <div>Here is the email from the guy along with the code he provided if anyone is curious</div> <div><br> </div> <div><a href="https://pastebin.com/wRfJYWnV" moz-do-not-send="true" class="moz-txt-link-freetext">https://pastebin.com/wRfJYWnV</a><br> <br> <a href="https://pastebin.com/fumbhVzw" moz-do-not-send="true" class="moz-txt-link-freetext">https://pastebin.com/fumbhVzw</a><br> <br> <a href="https://pastebin.com/pvYnr37n" moz-do-not-send="true" class="moz-txt-link-freetext">https://pastebin.com/pvYnr37n</a><br> <br> <a href="https://pastebin.com/378NETi8" moz-do-not-send="true" class="moz-txt-link-freetext">https://pastebin.com/378NETi8</a><br> <br> <a href="https://pastebin.com/L05ax8vf" moz-do-not-send="true" class="moz-txt-link-freetext">https://pastebin.com/L05ax8vf</a></div> </div> <br> <div class="gmail_quote gmail_quote_container"> <div dir="ltr" class="gmail_attr">On Sun, Dec 1, 2024 at 7:43 AM Giles Godart-Brown <<a href="mailto:[email protected]" moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a>> wrote:<br> </div> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div> <p><font size="4" face="Calibri">Ryan</font></p> <p><font size="4" face="Calibri">How are you doing this?</font></p> <p><font size="4" face="Calibri">Device > MQTT > Misterhouse <br> </font></p> <p><font size="4" face="Calibri">OR</font></p> <p><font size="4" face="Calibri">Device > MQTT > Home Assistant > Misterhouse</font></p> <p><font size="4" face="Calibri">If its the former then please see <a href="https://github.com/hollie/misterhouse/wiki/Items-mqtt" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/hollie/misterhouse/wiki/Items-mqtt</a></font></p> <p><font size="4" face="Calibri">Your items.mht will need something like</font></p> <p><font size="4" face="Calibri"><snip><br> #########################################################################################################<br> # MQTT setup<br> #########################################################################################################<br> MQTT_BROKER, mqtt_1, , 192.168.100.64<br> MQTT_DISCOVERY, mqtt_disc_mqtt1, homeassistant, mqtt_1, publish</font></p> <p><font size="4" face="Calibri">#########################################################################################################<br> # MQTT devices<br> #########################################################################################################<br> </font><font size="4" face="Calibri">MQTT_DEVICE, Workshop_fingerprint, Workshop|tasmota_fingerprint ,mqtt_1, tele/Workshop_fingerprint/SENSOR<br> CODE, $Workshop_fingerprint->{states_casesensitive} = 1;<br> </snip></font></p> <p><font size="4" face="Calibri">Then every time something publishes a message to </font><font size="4" face="Calibri">tele/Workshop_fingerprint/SENSOR your MH object </font><font size="4" face="Calibri">Workshop_fingerprint->{state} will be set to the message. <br> You may need to decode this as its likely to be JSON</font></p> <p><font size="4" face="Calibri">Note you can also use wildcards e.g. <br> <snip><br> MQTT_DEVICE, MQTT_LWT, , mqtt_1, tele/+/LWT<br> </snip></font></p> <p><font size="4" face="Calibri">If its the latter, then you need to use HA_ITEM and MQTT_LOCALITEM</font></p> <p><font size="4" face="Calibri">Let me know if this helps<br> </font></p> <p><font size="4" face="Calibri">Giles<br> </font></p> <div>On 30/11/2024 18:48, Spencer Ryan wrote:<br> </div> <blockquote type="cite"> <div dir="ltr">A timely email from Giles earlier today. <div><br> </div> <div>After my house was almost hit by lightning a few months ago and frying a lot of stuff I finally got around to rebuilding my Raspberry Pi's. </div> <div><br> </div> <div><br> </div> <div>I'm all Insteon, and I wanted to give HomeAssistant another go after trying it 5+ years ago, spoiler alert, it's Insteon support still is awful.</div> <div><br> </div> <div>I'd like to keep MH doing all of the PLM and scene building work, Someone on reddit gave me some code to interface between the two but I'm looking for some pointers on getting MH set up with MQTT from scratch. I don't see a lot (or any?) real documentation on it.</div> <div><br> </div> <div>Any pointers?</div> </div> <br> <fieldset></fieldset> <br> <fieldset></fieldset> <pre>________________________________________________________ To unsubscribe from this list, go to: <a href="https://lists.sourceforge.net/lists/listinfo/misterhouse-users" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.sourceforge.net/lists/listinfo/misterhouse-users</a> </pre> </blockquote> </div> </blockquote> </div> </blockquote> <br> </body> </html> --------------2CGg6mdJ9eCcZv4L2P1toCq9-- --===============1734498773932118793== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1734498773932118793== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users --===============1734498773932118793==--