Newbie help required - sending mqtt events from Indigo

Posted on
Wed Oct 21, 2020 9:35 am
anupchavda offline
Posts: 23
Joined: Jul 27, 2019

Newbie help required - sending mqtt events from Indigo

Hi

I have an LED device that uses MQTT subscriptions to change colour depending on the message recieved. What i want to do is create a workflow that takes the alarm status (alarm_armed=true/false) to push it to my mosquitto broker which then in turn is read by the device to change colour based on those 2 variables

How would i go about pushing events from indigo to my mosquitto server?

Thanks

Posted on
Wed Oct 21, 2020 10:39 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Newbie help required - sending mqtt events from Indigo

Use the MQTT Connector plugin, and create a Broker device that's configured to communicate with your Mosquito server.

Then use the "MQTT Connector Actions" -> "Publish Message" action to send the message. The topic and payload will depend on the specs for the LED device.


Screen Shot 2020-10-21 at 12.36.08 PM.png
Screen Shot 2020-10-21 at 12.36.08 PM.png (215.61 KiB) Viewed 1176 times


Screen Shot 2020-10-21 at 12.36.20 PM.png
Screen Shot 2020-10-21 at 12.36.20 PM.png (189.59 KiB) Viewed 1176 times

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

Posted on
Wed Oct 21, 2020 2:19 pm
anupchavda offline
Posts: 23
Joined: Jul 27, 2019

Re: Newbie help required - sending mqtt events from Indigo

Thanks for this.

My setup is that i have a raspberry pi with Mosquitto on it...its running actively and its internal IP is 192.168.1.170

I am able to send messages from the server by using a command such as: "mosquitto_pub -h localhost -t "dsc" -m "false"" and this works correctly (it makes node-red do the action i was expecting)

I am now looking to extend this further by getting indigo to do the trigger.

I installed the MQQT Connector Plugin and on the setup screen, i have the following:
Section: Connection Info
IP Address or Hostname: 192.168.1.170
Port: 1883
MQTT PRotocol: MQTTv311
Transport protocol: TCP
Username: <pi username>
Password: <pi password>
use SSL/TLS < unchecked>

when i activate the plugin, my log shows as "MQTT Connector Error MQTT: Disconnected with result code 1

What am i doing wrong?

Thanks for the help!

Posted on
Wed Oct 21, 2020 2:22 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Newbie help required - sending mqtt events from Indigo

You would not use the rPi username and password. You would use the one configured for Mosquitto, or leave blank if you don't have them set up.

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

Posted on
Wed Oct 21, 2020 5:29 pm
anupchavda offline
Posts: 23
Joined: Jul 27, 2019

Re: Newbie help required - sending mqtt events from Indigo

i've removed the username and password and i'm still getting the disconnection error code of 1 not sure how to set this up now

Posted on
Wed Oct 21, 2020 6:12 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Newbie help required - sending mqtt events from Indigo

I recommend you get an MQTT client like http://mqtt-explorer.com to test your connection from the Indigo machine to your rPi MQTT server. Once you have that working, then using the same info in the MQTT plugin should just work.

I suspect you don't have the firewall rules on the rPi set up properly to allow connections from outside systems.

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest