MQTT Broker - How to map a topic to a virtual device?

I have a Honeywell alarm system to which is fitted a SelfMon VMod. This monitors all alarm circuits and connects to an MQTT broker publishing topics for each alarm zone and output. I currently have this set up:

Alarm MQTT message > Mosquitto (on Pi) > node-red flow maps the changes to a virtual device in Hubitat.

With the new MQTT broker functionality in the latest version I'd like to bypass the Pi and node-red if possible. I've got the broker running on Hubitat and if I use MQTT Explorer I can see the topics being updated from my alarm. So what's the best way to use that topics change to actually change the virtual device state. Example here from one of the doors monitored by my alarm closing:

selfmon/vmod.010***/prio/inputs/read/1043

Do I need a to make a custom driver that maps each topics message to the individual Hubitat virtual device or is something already available to do that? TIA

We don't usually comment on upcoming features, but the next firmware version (2.5.0) will have MQTT import ability. It will use Home Assistant config topics to create matching devices in Hubitat. No need for custom drivers, then.

12 Likes

Outstanding! - I'm not an HA user, but I'm totally fine using their JSON format to bulk import data into HE in an efficient and "1st class" app/driver manner.. - Great news and thanks!

4 Likes

Hopefully this will let me do what I want. I'm not using HA at all, but most users of the alarm and MQTT module I mention in the opening post are using HA or Homey and there's integrations for both of those platforms. My current setup using a Pi, Mosquitto, node-red works fine but I like the idea of keeping everything I can under one roof so to speak.

1 Like