MQTT Broker

Posted on
Sun Sep 17, 2023 10:51 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

MQTT Broker

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?

Posted on
Sun Sep 17, 2023 10:59 am
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: MQTT Broker

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.

Posted on
Sun Sep 17, 2023 11:07 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: MQTT Broker

Once I updated it to “Stopped” it works fine. Problem was I was tracking an incorrect status as I see it.

Posted on
Sun Sep 17, 2023 11:31 am
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: MQTT Broker

That’s interesting. I have never seen a status. “stopped“. Was this for the connector device or something else?

Posted on
Sun Sep 17, 2023 11:57 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: MQTT Broker

That is the status of the broker.

Posted on
Sun Sep 17, 2023 1:07 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: MQTT Broker

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?

Posted on
Mon Sep 18, 2023 12:04 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Broker

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

Posted on
Mon Sep 18, 2023 11:00 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: MQTT Broker

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

Posted on
Mon Sep 18, 2023 11:06 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: MQTT Broker

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 1673 times

Posted on
Mon Sep 18, 2023 6:52 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: MQTT Broker

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 1633 times
Screenshot 2023-09-18 at 17.42.06.png
Screenshot 2023-09-18 at 17.42.06.png (459.6 KiB) Viewed 1633 times

Posted on
Tue Sep 19, 2023 3:58 am
siclark offline
Posts: 1963
Joined: Jun 13, 2017
Location: UK

Re: MQTT Broker

This is why I switched to running Mosquitto on my indigo server.

Posted on
Wed Feb 28, 2024 12:33 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: MQTT Broker

siclark wrote:
This is why I switched to running Mosquitto on my indigo server.


Did you install Mosquitto on macOS?

THanks

Posted on
Wed Feb 28, 2024 12:41 am
siclark offline
Posts: 1963
Joined: Jun 13, 2017
Location: UK

Re: MQTT Broker

Yes. Runs on my indigo server Mac mini. But could also run on a raspberry pi.

Posted on
Wed Feb 28, 2024 1:14 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: MQTT Broker

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.

Posted on
Wed Feb 28, 2024 11:31 am
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: MQTT Broker

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

Who is online

Users browsing this forum: No registered users and 8 guests