Award
Congratulations ptp, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Mqtt Conecting

Assistance Requested

Help Greg C with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

Product: (click to view product details)

EZ-Builder Control: (click to view manual page)

Greg C claims to have checked these sources:
 
#1

i am trying to use the MQTT plugin with no luck. I have a host on 192.168.2.8 and so far am just hitting the connect button but its timing out with
'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' was thrown.
Then high cpu use and a task kill to get back full operation? This is on a Tiny, if I can get this working I plan on getting a /4 also and a SSC32 to help split the power.
I am 3/4 thru an Inmoov build and want/need MQTT for openhab connection.

Thanks all

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

Certainly, someone can help. However, we'll need more information about your setup. What do you mean by "host"? i.e. what broker is it? What are you subscribing to? Is it a broker?

What plugin are you using? The MQTT Broker or MQTT Client? Did you configure the IP Address in the client? Does the broker require authentication?

Here is the MQTT Client plugin: http://www.ez-robot.com/EZ-Builder/Plugins/view/170

Here is the MQTT Broker plugin: http://www.ez-robot.com/EZ-Builder/Plugins/view/169

Which one are you using?

The SSC-32 is a servo controller, and can be controlled using the SSC-32 control. You can find out more about the SSC-32 by pressing the ? (question mark) on the control and viewing the manual page, or view it here: http://www.ez-robot.com/Tutorials/Help.aspx?id=216

The SSC-32 does not directly communicate with MQTT. Can you provide more information about what you're goal is? It'll be easy to setup once we know Grin

#3

Thank for helping
However, we'll need more information about your setup. What do you mean by "host"? i.e. what broker is it? What are you subscribing to? Is it a broker?

It is a broker at 192.168.2.8:1883 and has been running for a few years.

What plugin are you using? The MQTT Broker or MQTT Client? Did you configure the IP Address in the client? Does the broker require authentication?

Trying the client and IP is in the config.
No authentication on the broker. And there is a RFM69 arduino radio network sending hundreds of msgs thru it.


The SSC-32 does not directly communicate with MQTT. Can you provide more information about what you're goal is? It'll be easy to setup once we know Grin

Smile thanks I know. I am thinking, using a tiny and full/4 with a SSC-32 will let me run a Inmoov as far as power goes. The docs say the SSC-32 will work with the Auto Position panels is this correct?

Thank you

#4

I should add nice GUI, my wife wants to make some scripts Inmoov talking to Alexa and the Auto Position panes will let her do that. It seems like the connect scripts with servo limits are not respected in Auto Position panes unless I am missing something there?

2 days and this
https://www.youtube.com/watch?v=ObOEqBUFkkY

#5

Quote:


It is a broker at 192.168.2.8:1883 and has been running for a few years.



1) What broker software & version ?
2 )operating system you use on the host ?

#6

1) What broker software & version ?

mosquitto Version .15
Running on a PI 2 with Raspbian wheezy

#7

Greg,

Version 0.15 is very old:

User-inserted image

User-inserted image

although is not a big issue (at least for home users) there are some security issues:

User-inserted image

I tried the mqqt client plugin with my mosquito server (1.4.12) and no connection issues.

User-inserted image

try to connect and check your server's log:

Code:


tail -f /var/log/mosquitto/mosquitto.log



next step check EZ-Builder windows's firewall and connectivity to the mosquitto port.

last effort: update the mosquitto version.

#8

Thanks ptp for helping


Looks like the EZ computer can reach the MQTT server

PS C:\Users\greg> Test-NetConnection 192.168.2.8 -port 1883

ComputerName : 192.168.2.8
RemoteAddress : 192.168.2.8
RemotePort : 1883
InterfaceAlias : Wi-Fi
SourceAddress : 192.168.2.54
TcpTestSucceeded : True

And I looked in/var/log/mosquitto/mosquitto.log
but no file there, might be the older version I have. Looking at the log I installed it on 8-15. Looks like I am not one to upgrade when it's working. So I might need to upgrade, but I am getting this so more work to do.

sudo apt-get install mosquitto
Reading package lists... Done
Building dependency tree
Reading state information... Done
mosquitto is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

After some work I get this after a upgrade
pi@raspberrypi ~ $ mosquitto
1497739370: mosquitto version 0.15 (build date 2017-05-29 22:37:10+0000) starting
1497739370: Opening ipv4 listen socket on port 1883.
1497739370: Error: Address already in use

This version does does not match the build date? I might add the latest windows MQTT clients connect with no trouble.

#9

Greg,

you need to do:

Code:


sudo apt-get update



apt-get update downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. This command does not install or upgrade any packages.

Code:


sudo apt-get upgrade


installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed. This is why you first want to do apt-get update.

#10

Success thanks ptp, it was the old version 0.15. Its the one you get from apt you have to add http://repo.mosquitto.org/debian/mosquitto-wheezy.list to get newer versions. Now I get a quick connect in EZ. The Openhab Pi has been up for so long I kind of forget it. I will start a new thread on the SSC-32 questions.

Thanks