Page 12 of 17
Re: MQTT Client
Posted: Mon Aug 14, 2017 2:52 pm
by ToxMox
krambriw wrote:I suspect I made a bug
I was not able to reproduce the error but I think I found what could cause the problem. I have modified the plugin (new version 1.2.1)
It no longer hangs EG anymore. I couldn't get my cert for beebotte to work in brief testing. You mentioned moving the paho folder to the lib27/site-packages folder. On EG 4.x it should be the lib26/site-packages folder right? Or do I need to create a lib27 folder?
Re: MQTT Client
Posted: Mon Aug 14, 2017 3:00 pm
by krambriw
On EG 4.x it should be the lib26/site-packages folder right?
Correct (and you obviously have to change the port to the one used by beebotte as well)
How many certificates are you using? If one, add it as the CA-cert. Does it require username and password as well?
Re: MQTT Client
Posted: Mon Aug 14, 2017 4:15 pm
by krambriw
it works fine with beebotte, as example below using the token. You could instead use the secret key. It's described pretty well here:
https://beebotte.com/docs/mqtt
When I publish something to EG/EG it is shown in the EG log
It seems not possible to upload files to the forum anylonger so here is a link instead
http://krambriw.net/BB.png
Re: MQTT Client
Posted: Mon Aug 14, 2017 4:17 pm
by ToxMox
krambriw wrote:On EG 4.x it should be the lib26/site-packages folder right?
Correct (and you obviously have to change the port to the one used by beebotte as well)
How many certificates are you using? If one, add it as the CA-cert. Does it require username and password as well?
Yup changed the port to 8883. And yes added as a CA cert. It requires a username but not a password. I'm passing my secret key as a username. Here is the info on their end if you are curious:
https://beebotte.com/docs/mqtt
In the EG log I just get
Code: Select all
MQTT Client: Trying to reconnect with..<my topic> mqtt.beebotte.com
over and over again.
I have successfully connected using the cert with node-red btw. Not sure if that helps at all but thought I'd mention it.
Re: MQTT Client
Posted: Mon Aug 14, 2017 4:21 pm
by ToxMox
I see you posted while I was writing my post above. I'm going to try EG 5.x again as maybe this is an EG 4.x issue?
Re: MQTT Client
Posted: Mon Aug 14, 2017 4:35 pm
by ToxMox
Ok works fine with EG 0.5.0-rc4. Thanks for fixing this!
Re: MQTT Client
Posted: Mon Aug 28, 2017 7:20 pm
by Saxtus
Hello,
When starting a new MQTT subscription, how can I change the client ID?
I see that it's got a random one assigned, but if I copy/paste the EG action, so I can modify only the subscription topic, the client ID gets preserved, and that is causing conflict to the broker.
Thank you for the great plugin!
Re: MQTT Client
Posted: Tue Aug 29, 2017 5:55 am
by krambriw
Hello Saxtus, thank You,
Currently there is no input field for client id as you have seen. A work around for your use case is not to copy and paste directly, instead paste to a text editor in between and make the change, then copy and paste the html into the EG tree
1) For each action, copy the action from the EG tree
2) Paste into a text editor, change the client id in the html text
3) Copy the html text and paste into EG tree
Alternatively you could directly edit the whole EG tree file when you have copy & pasted all your actions
Re: MQTT Client
Posted: Wed Sep 06, 2017 8:03 am
by Snowbird
Hi krambriw,
I just want to let you know that the mqtt dialog boxes are too big to fit on small resolution screen (1280x800), I know it's not today's standard but they still exist for some people !
Here's a screen shot of how it looks like, look at the black bar at the very bottom, it's my Windows 10 tasks bar, and as you can see I'm not able to see all the fields (others are located below the black bar) :
I have checked the code, and was able to rearrange things to fit everything inside but in case of a plugin upgrade I have to redo it all over again, do you think you can rearrange the fields so the dialog box takes less place in height (less than 700px for example ) ? If you want, I can do the modification on my end and I will send it to you so you can include it in the source code, this way in case of an upgrade this part won't change. Let me know.
Thank you.
Re: MQTT Client
Posted: Fri Sep 08, 2017 4:27 am
by krambriw
Hello Snowbird,
Yes, agree, this can be (or is) a problem. I would like to accept your suggestion, are your modifications based on the latest version (1.2.1)?
Best regards, Walter
Re: MQTT Client
Posted: Fri Sep 08, 2017 6:24 am
by Snowbird
Hi,
Yes I'm using your latest version 1.2.1 and I made the modification on it. I have just modified this file :
%ProgramData%\EventGhost\plugins\MQTT Client\__init__.py
I did my best to make it look pretty but it's not easy when you don't have much room

Feel free to readjusted a little bit if needed.
Thank you again for this great plugin !!
Re: MQTT Client
Posted: Sat Sep 09, 2017 2:15 pm
by krambriw
Hello, so now I have re-arranged the gui parts accordingly, should be fine and fit most screens
Version 1.2.2
Re: MQTT Client
Posted: Sat Sep 09, 2017 3:22 pm
by Snowbird
Thank you Walter ! it looks amazing now, much better than what I did ! and most of all it fits my screen perfectly now

you're the man !
Re: MQTT Client
Posted: Wed Oct 18, 2017 6:26 pm
by Septik
I'm having a few issues with this plugin. Mainly, I am unable to subscribe to more than one broker. I was hoping to be able to subscribe to several specific topics from Home Assistant's
MQTT Statestream component. The broker publishes all state changes in a topic with this format:
Since there are several domains and countless entities in my configuration, I don't want to subscribe to "homeassistant/#". That gives me probably 60 events immediately, most of which I don't want. Therefore it's more practical for me to subscribe to a few individual topics, like so:
Code: Select all
homeassistant/sensor/temp_inside/state
homeassistant/sensor/temp_outside/state
homeassistant/climate/thermostat/temperature
homeassistant/lights/light_living_room/state
...and so on. However, once I add a second broker to my configuration in EventGhost, it overwrites the previous one. I also tried adding a public broker to see if it had to do with the IP being identical, but that too overwrote my previous subscription.
Any ideas?
In short: I can't subscribe to more than a single topic.
Re: MQTT Client
Posted: Thu Oct 19, 2017 5:29 pm
by krambriw
Hi there, yeah it is easy to forget minor details,
I think it will work for you but you have to give each subscription a unique name. Like in this example, they are simply named 1,2,3,4 and all are connected to an external broker
Hope this helps,
Kind regards, Walter