Jump to content

MQTT


Sidewinder

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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 2 years later...
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...

Link to comment
Share on other sites

  • 2 years later...
On 2019/02/24 at 6:55 PM, PaulF007 said:

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

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

The thread was very old when you posted but your post helped me yesterday.  .

I have been running ICC for a while but am now starting to dabble in Home Assistant and was looking for info to get me going on using MQTT to get info regarding my inverters from ICC into HA.

Your statement "If the Broker is receiving data you could try and connect to the Broker with # as the topic" was exactly what I needed.  I had no clue what topics there were. Thanks!

Link to comment
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.

×
×
  • Create New...