MQTT Plugin

User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Bridge

Post by FlyingDiver »

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
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: MQTT Bridge

Post by autolog »

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? :)
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: MQTT Bridge

Post by autolog »

btw - I use an App on my iPhone MQTTInspector which I have found to be quite useful for debugging. :)
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Bridge

Post by FlyingDiver »

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
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: MQTT Bridge

Post by autolog »

OK, Set it back to 1883 - Connected now :)
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Bridge

Post by FlyingDiver »

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
User avatar
mreyn2005
Posts: 161
Joined: Fri Oct 06, 2006 8:36 pm

Re: MQTT Bridge

Post by mreyn2005 »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Bridge

Post by FlyingDiver »

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
User avatar
mreyn2005
Posts: 161
Joined: Fri Oct 06, 2006 8:36 pm

Re: MQTT Bridge

Post by mreyn2005 »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Bridge

Post by FlyingDiver »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Plugin

Post by FlyingDiver »

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
User avatar
mreyn2005
Posts: 161
Joined: Fri Oct 06, 2006 8:36 pm

Re: MQTT Plugin

Post by mreyn2005 »

Awesome, thanks!

Matt
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Plugin

Post by FlyingDiver »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Plugin

Post by FlyingDiver »

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
Locked

Return to “MQTT”