MQTT Plugin

Posted on
Fri Aug 02, 2019 10:33 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Bridge

Release 0.0.2 - https://github.com/FlyingDiver/Indigo-M ... /tag/0.0.2

plugin ID and name changed
subscribe and unsubscribe working
local mqtt server included

Because of the name change, you'll have to edit your broker device(s). And any actions that target them.

If you use the included Mosquitto server, the defaults in the broker device configuration panel are correct for the included server.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Aug 02, 2019 12:12 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: MQTT Bridge

Hi Joe,
Thanks a lot for your efforts on this. :D

I currently use the MQTTGateway plugin and Mosquito to send messages to an App that speaks to a couple of HomePods attached to Airfoil.
This means that I can have house announcements separate from the Indigo Speak commands.

I have just installed your plugin and setup a broker changing the port to 1887 (address localhost) as I already have a broker running on 1883.

The MQTT Broker has a red dot and Connection Failed state.

Any thoughts? :)

Posted on
Fri Aug 02, 2019 12:13 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: MQTT Bridge

btw - I use an App on my iPhone MQTTInspector which I have found to be quite useful for debugging. :)

Posted on
Fri Aug 02, 2019 12:39 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Bridge

autolog wrote:
Hi Joe,
Thanks a lot for your efforts on this. :D

I currently use the MQTTGateway plugin and Mosquito to send messages to an App that speaks to a couple of HomePods attached to Airfoil.
This means that I can have house announcements separate from the Indigo Speak commands.

I have just installed your plugin and setup a broker changing the port to 1887 (address localhost) as I already have a broker running on 1883.

The MQTT Broker has a red dot and Connection Failed state.

Any thoughts? :)


The Broker device represents an existing broker/server that you want the plugin to communicate with. So if you want the plugin to talk to your existing server, leave the port as 1883.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Aug 02, 2019 4:56 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: MQTT Bridge

OK, Set it back to 1883 - Connected now :)

Posted on
Sat Aug 03, 2019 8:49 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Bridge

Release 0.0.3 - https://github.com/FlyingDiver/Indigo-M ... /tag/0.0.3

Login authentication and SSL/TLS Support

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Aug 03, 2019 1:21 pm
mreyn2005 offline
User avatar
Posts: 161
Joined: Oct 06, 2006

Re: MQTT Bridge

So I setup a trigger on a topic match, action is set to update a variable (increment it by 1). I publish a new message on that topic, nothing happens in indigo (I don't see any message in the log window and the variable does not update). I tried with the broker device configured to use TLS and WSS, that didn't seem to make a difference... said device shows a Connected state for either protocol. What am I doing wrong?

Matt

Posted on
Sat Aug 03, 2019 1:55 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Bridge

mreyn2005 wrote:
So I setup a trigger on a topic match, action is set to update a variable (increment it by 1). I publish a new message on that topic, nothing happens in indigo (I don't see any message in the log window and the variable does not update). I tried with the broker device configured to use TLS and WSS, that didn't seem to make a difference... said device shows a Connected state for either protocol. What am I doing wrong?


Did you subscribe to the topic?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Aug 03, 2019 2:26 pm
mreyn2005 offline
User avatar
Posts: 161
Joined: Oct 06, 2006

Re: MQTT Bridge

Now I get it... Ok, so I setup my subscriptions as Indigo Server Startup triggers. Now I see the incoming trigger activate - yay! Now I just need to play with parsing the payload. I got to do some house work for awhile, but I will be back on later.

If my goal is to update a device (on or off) from the incoming payload (which contains the device name/id and the on|off value I want to use) what is the best Action to run to do that with the current implementation? Execute script? I need to read up on the variable substitution for accessing the incoming payload...

Thank you so much for making this plugin!
Matt

Posted on
Sat Aug 03, 2019 2:33 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Bridge

mreyn2005 wrote:
Now I get it... Ok, so I setup my subscriptions as Indigo Server Startup triggers. Now I see the incoming trigger activate - yay! Now I just need to play with parsing the payload. I got to do some house work for awhile, but I will be back on later.


Subscriptions are persistent across restarts, they're stored in the Broker device's pluginPrefs, and re-sent to the Broker whenever the client (the plugin) connects. You can do them in a startup action group, or you could do them manually (once) using the plugin menu commands.

mreyn2005 wrote:
If my goal is to update a device (on or off) from the incoming payload (which contains the device name/id and the on|off value I want to use) what is the best Action to run to do that with the current implementation? Execute script? I need to read up on the variable substitution for accessing the incoming payload...


At this time, a script is required. But I'd like to create some pre-defined parsing routines that would do it for you. What's the source of these payloads? Is it a standard format or something you created?

Please post an example of your payload. I'll give you a sample script to parse it.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Aug 04, 2019 7:01 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Plugin

Release 0.0.4 posted - https://github.com/FlyingDiver/Indigo-M ... /tag/0.0.4

Broker device config dialog now has multiple panels.
Moved topic management to device config subpanel.
Removed topic commands from plugin menu.
Added initial support for broadcast device lists to config subpanel. Those lists are not used in this version.
Topic persistence now does QoS.
Added delay to internal mosquitto server startup so that the Broker device doesn’t fail to connect.
Removed disabled plugins from device selection dialogs.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Aug 04, 2019 9:55 pm
mreyn2005 offline
User avatar
Posts: 161
Joined: Oct 06, 2006

Re: MQTT Plugin

Awesome, thanks!

Matt

Posted on
Mon Aug 05, 2019 6:29 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Plugin

Oh, yeah. I announced 0.0.5 in a different thread. https://github.com/FlyingDiver/Indigo-M ... /tag/0.0.5

Added automatic publishing for Device changes
Added automatic publishing for Variable changes
Added template system for Device and Variable publishing

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 05, 2019 6:32 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Plugin

Time to close this catch-all thread.

If it's a bug or feature request, use this thread.

Otherwise, use one of the topic threads I already created or create a new one.

Thanks!

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 1 guest