Re: [mh] mqtt_discovery
Dave Neudoerffer <[email protected]> Thu, 5 Feb 2026 20:11:21 -0500
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <CAOFx8LNAPfJ6172uK9jrhiZofqSbMZNi8tE+-4J4WaHX83jA2Q@mail.gmail.com> |
--===============3027550016416666311== Content-Type: multipart/alternative; boundary="000000000000507f61064a1d781d" --000000000000507f61064a1d781d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I did not add a way to customize the names. It does sound like a good idea. I assume you have found the mqtt function to write those objects out to a .mht file so they become first class objects on the next run of MH -- mqtt::write_discovered_items or mqtt_disc_obj->write_discovered_items. Dave On Thu, Feb 5, 2026, 4:34=E2=80=AFPM Brian M <[email protected]= et> wrote: > I'm now using zwave-js-ui to handle direct management of ZWave devices, > and it works great. It has an API, but I'm using it's MQTT facility to > publish device states and such, so I'm getting deeper into Dave's > mqtt_discovery.pm module. My only "problem" (well, nuisance issue) is > that, based on the data zwave-js-ui provides mqtt_discovery is creating M= H > object names like the following: > > mqttd_Brians_Office_Fan_Brians_Office_Fan > mqttd_Brians_Office_Light_Brians_Office_Light > mqttd_Entryway_Front_Porch_Entryway_Front_Porch > mqttd_Garage_Alert_Light_Garage_Alert_Light > > > These are both redundant and a little unwieldy. I'm sure the redundancy > comes from the data zwave-js-ui provides, but I haven't figured out if > mqtt_discovery provides a handy way to customize the object names. My fir= st > thought was to add a test for an optional user-supplied subroutine to bui= ld > the object name, and if that subroutine wasn't provided, keep doing what > it's currently doing. But before I try to reinvent the wheel I thought I'= d > ask if there's Dave or anyone else has a better, existing way to customiz= e > those names. > > -Brian M > > > ________________________________________________________ > To unsubscribe from this list, go to: > https://lists.sourceforge.net/lists/listinfo/misterhouse-users > > --000000000000507f61064a1d781d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"auto"><div>I did not add a way to customize th= e names.=C2=A0 It does sound like a good idea. I assume you have found the = mqtt function to write those objects out to a .mht file so they become firs= t class objects on the next run of MH -- mqtt::write_discovered_items or mq= tt_disc_obj->write_discovered_items.</div><div dir=3D"auto"><div dir=3D"= auto"><br></div><div dir=3D"auto">Dave</div><br><br><div class=3D"gmail_quo= te" dir=3D"auto"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Feb 5, 2026,= 4:34=E2=80=AFPM Brian M <<a href=3D"mailto:misterhouse-ng1@silverflash.= net" target=3D"_blank">[email protected]</a>> wrote:<br></= div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef= t:1px #ccc solid;padding-left:1ex"><u></u> =20 =20 =20 <div> <p>I'm now using zwave-js-ui to handle direct management of ZWave devices, and it works great. It has an API, but I'm using it'= s MQTT facility to publish device states and such, so I'm getting deeper into Dave's <a href=3D"http://mqtt_discovery.pm" rel=3D"no= referrer" target=3D"_blank">mqtt_discovery.pm</a> module. My only "pro= blem" (well, nuisance issue) is that, based on the data zwave-js-ui provides mqtt_discovery is creating MH object names like the following:</p> <pre style=3D"font-size:16;white-space:pre-wrap">mqttd_Brians_Office_Fa= n_Brians_Office_Fan mqttd_Brians_Office_Light_Brians_Office_Light mqttd_Entryway_Front_Porch_Entryway_Front_Porch mqttd_Garage_Alert_Light_Garage_Alert_Light </pre> <p>These are both redundant and a little unwieldy. I'm sure the redundancy comes from the data zwave-js-ui provides, but I haven'= t figured out if mqtt_discovery provides a handy way to customize the object names. My first thought was to add a test for an optional user-supplied subroutine to build the object name, and if that subroutine wasn't provided, keep doing what it's current= ly doing. But before I try to reinvent the wheel I thought I'd ask i= f there's Dave or anyone else has a better, existing way to customize those names.</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -Brian M</p> <p><br> </p> </div> ________________________________________________________<br> To unsubscribe from this list, go to: <a href=3D"https://lists.sourceforge.= net/lists/listinfo/misterhouse-users" rel=3D"noreferrer noreferrer" target= =3D"_blank">https://lists.sourceforge.net/lists/listinfo/misterhouse-users<= /a><br> <br> </blockquote></div></div></div> </div> --000000000000507f61064a1d781d-- --===============3027550016416666311== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============3027550016416666311== 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 --===============3027550016416666311==--