An MQTT config example to Newbies from a Newbie...

Posted on
Sun Aug 02, 2020 10:11 pm
ppespepe offline
Posts: 49
Joined: May 27, 2020

An MQTT config example to Newbies from a Newbie...

Hi there,

I'm very new to Indigo and it took me a little while to learn to use the MQTT/Shims combo. If you are newbie and lazy to read like me, perhaps this example would help a little bit.

First, I'm using a version of BKHobby's Kube. It is based on the Kube 1 but using the boards of the Kube 2. here you can find some info if you want to give it a try: https://www.pcbway.com/project/shareproject/NodeMCU_v_1_2_Board.html & https://www.thingiverse.com/thing:2539897 I think is a really cool project.

Anyway, I'm using this testbed with the BME680 and MH-Z19 sensors:

Device.jpg
Device.jpg (42.44 KiB) Viewed 18313 times


Let's start from the beginning... the combo plugin combo I mentioned before is:

Step1.jpg
Step1.jpg (79.56 KiB) Viewed 18313 times


Then:

Step2.jpg
Step2.jpg (33.36 KiB) Viewed 18313 times


Step3.jpg
Step3.jpg (36.6 KiB) Viewed 18313 times


Step4.jpg
Step4.jpg (70.44 KiB) Viewed 18313 times


Step5.jpg
Step5.jpg (36.49 KiB) Viewed 18313 times


Step6.jpg
Step6.jpg (82.83 KiB) Viewed 18313 times


Step7.jpg
Step7.jpg (30.98 KiB) Viewed 18313 times


Step8.jpg
Step8.jpg (64.65 KiB) Viewed 18313 times


Step9.jpg
Step9.jpg (80.85 KiB) Viewed 18313 times


Can't put more than 10 attachments so I'll continue in another post.....

To be continued.... :P

Posted on
Sun Aug 02, 2020 10:15 pm
ppespepe offline
Posts: 49
Joined: May 27, 2020

Re: An MQTT config example to Newbies from a Newbie...

Continuing the previous post:

Step10.jpg
Step10.jpg (26.91 KiB) Viewed 18309 times


Step11.jpg
Step11.jpg (63.48 KiB) Viewed 18309 times


Step12.jpg
Step12.jpg (84.04 KiB) Viewed 18309 times


Step13.jpg
Step13.jpg (57.17 KiB) Viewed 18309 times


Step14.jpg
Step14.jpg (46.72 KiB) Viewed 18309 times


Step16.jpg
Step16.jpg (82.03 KiB) Viewed 18309 times


And to be continued to Part III... :P
Attachments
Step15.jpg
Step15.jpg (26.06 KiB) Viewed 18309 times

Posted on
Sun Aug 02, 2020 10:17 pm
ppespepe offline
Posts: 49
Joined: May 27, 2020

Re: An MQTT config example to Newbies from a Newbie...

And third and last part:

Step17.jpg
Step17.jpg (55.65 KiB) Viewed 18308 times


Step18.jpg
Step18.jpg (26.67 KiB) Viewed 18308 times


Step19.jpg
Step19.jpg (47.05 KiB) Viewed 18308 times


Step20.jpg
Step20.jpg (78.54 KiB) Viewed 18308 times


Hopefully this sill help someone!!!

Enjoy...

Posted on
Mon Aug 03, 2020 3:08 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: An MQTT config example to Newbies from a Newbie...

We need a gigantic LIKE button.

Thank you for this! I got a couple more rudimentary ESP8266’s up witj MQTT Connector, but i got into the weeds with Shims. I very well may print this out on paper to guide me!

Posted on
Mon Aug 03, 2020 4:02 pm
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: An MQTT config example to Newbies from a Newbie...

Very nice writeup. The only recommendation I would make at this point is that it's not necessary to list that many subscriptions. You could just subscribe to "home/#" and be done with it. ;)

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

Posted on
Tue Nov 24, 2020 4:34 pm
cesarvog offline
User avatar
Posts: 155
Joined: Aug 13, 2016
Location: Brazil

Re: An MQTT config example to Newbies from a Newbie...

Many, many thanks for this tutorial. I'm totally new to MQTT and this will help a lot.

Posted on
Wed Dec 23, 2020 8:36 am
cesarvog offline
User avatar
Posts: 155
Joined: Aug 13, 2016
Location: Brazil

Re: An MQTT config example to Newbies from a Newbie...

On a side note, can anyone care to clarify the meaning of the three "Match Type" choices ("Match", "Any", "End") in the "Topic Configuration Match" screen?

My understanding of the "Match" and "Any" is the former indicates the string you want to match to, while the latter acts as an anything goes (wildcard type of thing).

Joe has kindly helped me yesterday on the correct creation of a trigger. His suggestion used all three choices, but I'm still not quite sure about the meaning of the "End" choice...

TIA
Cesar
Last edited by cesarvog on Wed Dec 23, 2020 8:42 am, edited 2 times in total.

Posted on
Wed Dec 23, 2020 8:39 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: An MQTT config example to Newbies from a Newbie...

It's there to terminate the matching process. When developing the plugin, I found a few examples of devices that sent multiple topics, some of which were extended versions (more terms) then other ones. I needed a way to complete the match without looking at more terms. I can't recall the specific example right now.

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

Posted on
Wed Dec 23, 2020 8:40 am
cesarvog offline
User avatar
Posts: 155
Joined: Aug 13, 2016
Location: Brazil

Re: An MQTT config example to Newbies from a Newbie...

Thanks Joe, always super fast on your replies.
Ah, so I figure that ALL triggers must include an End choice, correct?

Posted on
Wed Dec 23, 2020 8:43 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: An MQTT config example to Newbies from a Newbie...

I wouldn't say "must". It doesn't hurt to have it, and I usually include it when I do a trigger, but it's only really needed for those edge cases where you don't want to match on a topic that has more terms than the one you do want to match on. I wish I could remember what device I ran into that caused me to include it...

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

Posted on
Wed Dec 23, 2020 8:54 am
cesarvog offline
User avatar
Posts: 155
Joined: Aug 13, 2016
Location: Brazil

Re: An MQTT config example to Newbies from a Newbie...

No need to search for that. I think your explanation above clarifies it perfectly.

I decided to ask because I have followed the Wiki Basic Setup Guide (https://github.com/FlyingDiver/Indigo-S ... asic-Setup) and found some minor inconsistencies between the screenshots there and the actual screen in the current incarnation of the plugins (which also means the "End" choice is never mentioned there)

I believe this exchange of posts between us may help other fellow users in the future, so it's nice to have it clarified.

Best regards,
Cesar

Posted on
Wed Dec 23, 2020 9:02 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: An MQTT config example to Newbies from a Newbie...

Yeah, those screen shots are from before I added the End term.

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

Posted on
Sun Jun 27, 2021 4:26 am
DirkWe offline
Posts: 22
Joined: Jun 22, 2015

Re: An MQTT config example to Newbies from a Newbie...

Fantastic, with your tutorial i made it in a few minutes and get all mey relevant values from my Photo-Voltaic into indigo ! Thanks from Germany
Dirk :D

Posted on
Sun Jun 27, 2021 4:49 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: An MQTT config example to Newbies from a Newbie...

(Like)
(placeholder until M&J give us a “Like” button)

Posted on
Fri Jul 02, 2021 5:12 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: An MQTT config example to Newbies from a Newbie...

I am less than newbie on this. but this is helpful. still struggling to get started.

it does not seem to include setting up brew/mosquitto, but says enter the IP of your broker (mosquitto?) in config.

in the plugin configure broker, do i use the IP of my mac running indigo and mosquitto? i have tried that, but get failed to connect in indigo on that device. and i cannot connect from MQTT explorer.

my indigo mac is 192,168.1.101. on this mac where i installed brew/mosquitto, i can do this:

ow you can test the installation and ensure the server is running successfully. Open a new command window and start a listener.

mosquitto_sub -t topic/state

In another window, send a message to the listener.

mosquitto_pub -t topic/state -m "Hello World"

and i see hellow world in the other window as expected.

what am i missing? is the ip of my broker device supposed to be 192,168.1.101?

thanks for any pointers

Who is online

Users browsing this forum: No registered users and 1 guest