MQTT Client

Questions and comments specific to a particular plugin should go here.
alonmalka
Posts: 27
Joined: Wed Dec 04, 2013 10:07 am

Re: MQTT Client

Post by alonmalka » Tue Apr 10, 2018 10:32 am

Yes you are right.
Any suggestions?

alonmalka
Posts: 27
Joined: Wed Dec 04, 2013 10:07 am

Re: MQTT Client

Post by alonmalka » Tue Apr 10, 2018 10:55 am

Another thing, when I run netstat like you told me to, I don't see the MQTT port in use by the Pi though the MQTT messages does go through without a problem except for the delay I am talking about.

Snowbird
Experienced User
Posts: 287
Joined: Fri Jul 03, 2009 10:04 am

Re: MQTT Client

Post by Snowbird » Tue Apr 10, 2018 2:59 pm

that's not possible, if your broker is installed on your RPi it means it's listening on some port, I gave you the default ones earlier but maybe you have changed them ? what port is set in EG ? Are you sure your broker is installed on your RPi ? it looks like you are using an external broker and that your RPi and EG have subscribed to the same topic and communicate with each other through this external broker. What broker is set in your EG ?

alonmalka
Posts: 27
Joined: Wed Dec 04, 2013 10:07 am

Re: MQTT Client

Post by alonmalka » Wed Apr 11, 2018 8:59 pm

I ran netstat on Raspberry PI and it showed me the port that it is listening to 1883 (default). So I guess this means that the server side is local and os running on the Pi.
EG also seem ok since I run the same settings: Pi's local IP address, default port, username and password, topic and , message.

So why does it take more then 2 seconds? This is driving me crazy. When I use the MQTT.FX as I sayed before, the command is recived almost instantly, although you must be connected to the the server and you can't just send a message and hang up.

Maybe that is because it's faster? because it is always connected?

User avatar
kgschlosser
Site Admin
Posts: 3700
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MQTT Client

Post by kgschlosser » Thu Apr 12, 2018 12:46 am

raspberry pi's are not exactly the fastest thing in the world.

This is what I am understanding

you have EG set up on a PC and you have HomeAssistant set up on a Raspberry Pi.

Now. Raspberry Pi's are pretty handicapped in the resources department. And opening and closing ports does take some effort. HomeAssistant does take some time to do things if it is not a core process. it kind of gets placed on the back burner until i gets to it. so the opening and closing of a port is really going to take more time if you have HomeAssistant doing it. if you have an always open port connection the data being sent through it is going to be processed by HomeAssistant much faster.

Now you can test this and see if the issue lies with EG and the plugin or on the RPi side of things by setting up 2 instances of EG on 2 different PCs and have them send the message back and forth between them. and see if it takes 2 seconds. if it does not then the problem lies on the side of the RPi.
If you like the work I have been doing then feel free to Image

wawa79
Posts: 25
Joined: Fri Nov 02, 2012 11:01 pm

Re: MQTT Client

Post by wawa79 » Sat Apr 14, 2018 10:09 am

kgschlosser wrote:
Sun Apr 01, 2018 1:18 am
I have updated the plugin with exception catching and a little better unicode decoding. I have done this for all places where any decoding was done.

The updated version is attached.
Hi, great ! I will give it a try. Thank you

Post Reply