Jump to content
Thank you for the great forum, Safe Driving over the weekend. Sincerely Jason
Sign in to follow this  
Sidewinder

MQTT

Recommended Posts

So I'm trying to get MQTT going on the Pi3. Started with Manie's image, and didn't realise that everything is already in place, and started to install mosquitto, mosquitto-clients & python-mosquitto, as per many help pages on google.

After all that was done, no errors, but as soon as I try to subscribe or check status like "mosquitto_sub -h localhost -v -t "\$SYS/#" ", it reports 

"Error: Connection refused"

Anybody have an idea where i went wrong..or do I just start over with new image?. Don't want to do that, as every time i restart pi, I loose that days info, as I'm not yet able to command pi to do a "save" of the current data - is that even possible? And a restore afterwards. 

Many thanks.

Share this post


Link to post
Share on other sites

I assume you used apt-get to install it? If yes, then it should be as simple as removing the packages again: apt-get --purge remove mosquitto mosquitto-clients.

I'm not sure how Manie starts up the daemon. Back when I was still building a pi-based system (before I decided to stick that effort into Venus instead), I wrote down some instructions on compiling your own, which I had to do because the version that ships with Raspbian Jessie is old and somewhat buggy. Those instructions are here.

There is also a systemd configuration file to start it automatically, here.

Not saying you should do what I did, Manie will know best, but at least that's some instructions you can use if you wanted to do your own.

Share this post


Link to post
Share on other sites

@Sidewinder  I would reinstall @Manie 's image and start with a clean system. That is what I did when I switched to ICC-Pi and all has been working flawlessly. I had the version of Jessie from Raspberry Pi Foundation on my Pi together with the AICC Pi installation which required a number of install steps. I am not in @plonkster 's league IT wise but have been using Ubuntu as my main operating system for about 10 years and the Pi since it became generally available. At least you won't have any unforeseen gremlins lurking in the depths of the software and getting MQTT going will be the proverbial piece of cake. It is a small price to pay in lost records in exchange for peace of mind and a working system. Or if you have a spare SD card available, install on that, see how it works and then make a decision.

Share this post


Link to post
Share on other sites
On 2017/02/17 at 1:33 PM, Sidewinder said:

I had a look in the mosquitto log, and looks like ICC does a few things there already.

If the Broker is receiving data you could try and connect to the Broker with # as the topic. If there is any info coming through to the broker you will catch it in the payload.

You will need to Broker IP and User / Password , if it has one, and a client to connect to the broker. I prefer Node red as you can then follow the data but mqtt lens (Chrome) should also do the trick.
This should show if the broker is working there else follow erbsa's advice...

Share this post


Link to post
Share on other sites

OMW this is a Very OLD post - apologies I didn't look at the dates! 

Admin - if this does not add value please remove ......

Edited by PaulF007

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

Topics

Contact Us - Power Forum South Africa

×
×
  • Create New...