Re: [mh] MQTT/HomeAssistant
Giles Godart-Brown <[email protected]> Thu, 5 Dec 2024 07:27:04 +0000
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
--===============5451568269946757788== Content-Type: multipart/alternative; boundary=Apple-Mail-1DD36C70-AB83-43B3-A384-97B57E670E04 Content-Transfer-Encoding: 7bit --Apple-Mail-1DD36C70-AB83-43B3-A384-97B57E670E04 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D= utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"></div><div dir=3D"ltr">Sor= ry, but this is beyond me, I=E2=80=99ve only just started using HA, haven=E2= =80=99t used scenes and , living in the UK we don=E2=80=99t need fans very o= ften :-)</div><div dir=3D"ltr">In my implementation all I needed was the sta= tes to match on both ha and mh so I could continue to use mh for the complic= ated logic I have built over the years, but use HA as an interface to new de= vices like Tuya and to create a fresh UI.</div><div dir=3D"ltr">I=E2=80=99ll= defer to others with more experience</div><div dir=3D"ltr">Sorry I cannot b= e more helpful</div><div dir=3D"ltr">Giles</div><div dir=3D"ltr"><br><blockq= uote type=3D"cite">On 5 Dec 2024, at 03:17, Spencer Ryan <sryan2k1@gmail.= com> wrote:<br><br></blockquote></div><blockquote type=3D"cite"><div dir=3D= "ltr">=EF=BB=BF<div dir=3D"ltr"><div>Thanks Giles,</div><div><br></div><div>= Is there any built in functionality to have status not match the control obj= ect like in the code I shared? For example when HA turns a FanLinc on it's r= eally going to trigger a scene so that the KPL tied to the FanLinc also show= s correct status, however when reading the status back into HA you don't wan= t to read the scene, but the device itself. <br></div></div><br><div class=3D= "gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On= Wed, Dec 4, 2024 at 6:05=E2=80=AFPM Giles Godart-Brown <<a href=3D"mailt= o:[email protected]">[email protected]</a>> wrote:<br></div><bl= ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left= :1px solid rgb(204,204,204);padding-left:1ex"><u></u> =20 =20 =20 <div> <font size=3D"4" face=3D"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 an= d HA API key)<br> <br> </font>#################################################################= ########################################<br> # HA set up<br> ############################################################################= #############################<br> # HA_SERVER, obj name, &n= bsp; address, keepalive, &nbs= p; api_key <br> HA_SERVER, ha_house, &nbs= p; 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, &= nbsp; 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, &n= bsp; domain[:subtype], = ha_entity, &n= bsp; 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>On 04/12/2024 21:47, Spencer Ryan wrote:<br> </div> <blockquote type=3D"cite"> =20 <div dir=3D"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=3D"https://pastebin.com/wRfJYWnV" target=3D"_blank">htt= ps://pastebin.com/wRfJYWnV</a><br> <br> <a href=3D"https://pastebin.com/fumbhVzw" target=3D"_blank">https:= //pastebin.com/fumbhVzw</a><br> <br> <a href=3D"https://pastebin.com/pvYnr37n" target=3D"_blank">https:= //pastebin.com/pvYnr37n</a><br> <br> <a href=3D"https://pastebin.com/378NETi8" target=3D"_blank">https:= //pastebin.com/378NETi8</a><br> <br> <a href=3D"https://pastebin.com/L05ax8vf" target=3D"_blank">https:= //pastebin.com/L05ax8vf</a></div> </div> <br> <div class=3D"gmail_quote"> <div dir=3D"ltr" class=3D"gmail_attr">On Sun, Dec 1, 2024 at 7:43=E2= =80=AFAM Giles Godart-Brown <<a href=3D"mailto:[email protected]" t= arget=3D"_blank">[email protected]</a>> wrote:<br> </div> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;= border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div> <p><font size=3D"4" face=3D"Calibri">Ryan</font></p> <p><font size=3D"4" face=3D"Calibri">How are you doing this?</fo= nt></p> <p><font size=3D"4" face=3D"Calibri">Device > MQTT > Misterhouse <br> </font></p> <p><font size=3D"4" face=3D"Calibri">OR</font></p> <p><font size=3D"4" face=3D"Calibri">Device > MQTT > Home Assistant > Misterhouse</font></p> <p><font size=3D"4" face=3D"Calibri">If its the former then please see <a href=3D"https://github.com/hollie/misterhouse/= wiki/Items-mqtt" target=3D"_blank">https://github.com/hollie/misterhouse/wik= i/Items-mqtt</a></font></p> <p><font size=3D"4" face=3D"Calibri">Your items.mht will need something like</font></p> <p><font size=3D"4" face=3D"Calibri"><snip><br> ############################################################################= #############################<br> # MQTT setup<br> ############################################################################= #############################<br> MQTT_BROKER, mqtt_1, , 192.168.100.64<br> MQTT_DISCOVERY, mqtt_disc_mqtt1, homeassis= tant, mqtt_1, publish</font></p> <p><font size=3D"4" face=3D"Calibri">###########################= ############################################################################= ##<br> # MQTT devices<br> ############################################################################= #############################<br> </font><font size=3D"4" face=3D"Calibri">MQTT_DEVICE, Workshop_fingerprint, Workshop|tasmota_fingerprint ,mqtt_1, tele/Workshop_fingerprint/SENSOR<br> CODE, $Workshop_fingerprint->{states_casesensitive} =3D 1;<br> </snip></font></p> <p><font size=3D"4" face=3D"Calibri">Then every time something publishes a message to </font><font size=3D"4" face=3D"Calib= ri">tele/Workshop_fingerprint/SENSOR your MH object </font><font size=3D"4" face=3D"Calibri">Workshop_fin= gerprint->{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=3D"4" face=3D"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=3D"4" face=3D"Calibri">If its the latter, then you= need to use HA_ITEM and MQTT_LOCALITEM</font></p> <p><font size=3D"4" face=3D"Calibri">Let me know if this helps<b= r> </font></p> <p><font size=3D"4" face=3D"Calibri">Giles<br> </font></p> <div>On 30/11/2024 18:48, Spencer Ryan wrote:<br> </div> <blockquote type=3D"cite"> <div dir=3D"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=3D"https://lists.sourceforge.n= et/lists/listinfo/misterhouse-users" target=3D"_blank">https://lists.sourcef= orge.net/lists/listinfo/misterhouse-users</a> </pre> </blockquote> </div> </blockquote> </div> </blockquote> <br> </div> </blockquote></div> </div></blockquote></body></html>= --Apple-Mail-1DD36C70-AB83-43B3-A384-97B57E670E04-- --===============5451568269946757788== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5451568269946757788== 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 --===============5451568269946757788==--