MQTT Broker

Colly
Posts: 542
Joined: Sat Jan 16, 2016 10:19 am
Location: Ireland

MQTT Broker

Post by Colly »

Hi Joe,
I have (had) a trigger than restarts the MQTT Connector plugin if my Broker Status was "Disconnected 0".
I realised today that this trigger wasn't working, I've now changed it to trigger on Status = "Stopped". Was this changed in the last version? Is using a trigger for Status = "Stopped" the best approach here?
SMUSEBY
Posts: 547
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Re: MQTT Broker

Post by SMUSEBY »

My trigger is set to “not equal to Connected 0”. But it doesn’t work. I’m embarrassed to say that my “solution “ is to reload both plugins every 10 min. That reduced the failures, but did not eliminate them. There has to be a better way.
Colly
Posts: 542
Joined: Sat Jan 16, 2016 10:19 am
Location: Ireland

Re: MQTT Broker

Post by Colly »

Once I updated it to “Stopped” it works fine. Problem was I was tracking an incorrect status as I see it.
SMUSEBY
Posts: 547
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Re: MQTT Broker

Post by SMUSEBY »

That’s interesting. I have never seen a status. “stopped“. Was this for the connector device or something else?
Colly
Posts: 542
Joined: Sat Jan 16, 2016 10:19 am
Location: Ireland

Re: MQTT Broker

Post by Colly »

That is the status of the broker.
SMUSEBY
Posts: 547
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Re: MQTT Broker

Post by SMUSEBY »

You're correct - the device is the broker (when I first started with Shelly, I incorrectly named the broker "Connector").
So back to my question, - have you seen the broker status "Stopped"? - the third line in custom states for the device? And what exactly does your trigger do?
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MQTT Broker

Post by FlyingDiver »

Colly wrote:Hi Joe,
I have (had) a trigger than restarts the MQTT Connector plugin if my Broker Status was "Disconnected 0".
I realised today that this trigger wasn't working, I've now changed it to trigger on Status = "Stopped". Was this changed in the last version? Is using a trigger for Status = "Stopped" the best approach here?
Damifino. Open. GitHub issue and I’ll look into this when I get back from vacation.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Colly
Posts: 542
Joined: Sat Jan 16, 2016 10:19 am
Location: Ireland

Re: MQTT Broker

Post by Colly »

FlyingDiver wrote:
Colly wrote:Hi Joe,
I have (had) a trigger than restarts the MQTT Connector plugin if my Broker Status was "Disconnected 0".
I realised today that this trigger wasn't working, I've now changed it to trigger on Status = "Stopped". Was this changed in the last version? Is using a trigger for Status = "Stopped" the best approach here?
Damifino. Open. GitHub issue and I’ll look into this when I get back from vacation.
Done
Colly
Posts: 542
Joined: Sat Jan 16, 2016 10:19 am
Location: Ireland

Re: MQTT Broker

Post by Colly »

SMUSEBY wrote:You're correct - the device is the broker (when I first started with Shelly, I incorrectly named the broker "Connector").
So back to my question, - have you seen the broker status "Stopped"? - the third line in custom states for the device? And what exactly does your trigger do?
Hi Smuseby,
My trigger is as per screenshots attached. Hope this helps.
My actions is to reload the connector plugin.
Attachments
MQTT_Broker_Trigger.png
MQTT_Broker_Trigger.png (40.67 KiB) Viewed 2405 times
SMUSEBY
Posts: 547
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Re: MQTT Broker

Post by SMUSEBY »

That's very interesting. Maybe I have a device issue? - as my broker is of type "MQTT Connector", model: "MQTT Broker"., whereas yours is "Shelly NG Broker". - (which might explain why I called mine a connector?)
Anyway, following your lead, my trigger screenshot - which shows the device as "Shelly Broker", not your "Shelly NG Broker". (see screenshot)
Creating a new device, there are 3 Shelly options - I picked the first. This was months ago, and I don't recall why I picked it, and today, I don't know which one is correct. (I have both Shelly and Shelly Plus devices installed).
Are you aware of any documentation? Lacking that, can you advise me as to what is the correct device(s)?
Thanks,
Bob
Attachments
Screenshot 2023-09-18 at 17.48.59.png
Screenshot 2023-09-18 at 17.48.59.png (375.08 KiB) Viewed 2365 times
Screenshot 2023-09-18 at 17.42.06.png
Screenshot 2023-09-18 at 17.42.06.png (459.6 KiB) Viewed 2365 times
siclark
Posts: 1974
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: MQTT Broker

Post by siclark »

This is why I switched to running Mosquitto on my indigo server.
MarcoGT
Posts: 1115
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: MQTT Broker

Post by MarcoGT »

siclark wrote:This is why I switched to running Mosquitto on my indigo server.
Did you install Mosquitto on macOS?

THanks
siclark
Posts: 1974
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: MQTT Broker

Post by siclark »

Yes. Runs on my indigo server Mac mini. But could also run on a raspberry pi.
MarcoGT
Posts: 1115
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: MQTT Broker

Post by MarcoGT »

siclark wrote:Yes. Runs on my indigo server Mac mini. But could also run on a raspberry pi.
I have installed but struggling to get the plugins connected to it.
Could you please paste here your config if possible?

Thanks

EDIT: the port was not defined in the standard config, now it works fine.
SMUSEBY
Posts: 547
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Re: MQTT Broker

Post by SMUSEBY »

My 'solution' to the lack of reliability of MQTT/Shelly controls, is to initiate all commands with a reload of the broker plug-in and delay the commands 1 sec . It works, but it's awkward. I'm hopeful that running the MQTT broker independent of Indigo is a better solution.
I googled 'Mosquito' and found "Eclipse Mosquito". Is this the broker referred to? Could you please provide a little information on how to deploy it with Indigo?
Thanks,
Bob
Locked

Return to “MQTT”