Welcome to Smart Home Forum by FIBARO
Search the Community
Showing results for tags 'mosquitto'.
I had a few problems to get it right and maybe this post helps others to NOT make so many mistakes than I did I am running the currently latest Dietpi Version 7.3.x Installing MQTT Broker: "Mosquitto" log on to your dietpi via ssh. run: pyhon3 -V result : Python 3.7.x Should be somewhere @ 3.7.x or higher Install software via "dietpi-software" - search for: "pip" - should find package n#130 "influx" - should find package n#74 = InfluxDB "mosquitto" - should find package n#123 Important: I also installed "paho-mqtt" via: sudo pip3 install paho-mqtt # if you forget this step - like I did first - the listener will not publish to the MQTT Broker but still works!! WITHOUT any ERROR message # You will only notice that the when you run listen.py from the command prompt that the line: # "publishing to" will be missing # It took me a while to figure this out Next I changed the "mosquitto.conf" file located in /etc/mosquitto I installed Midnight Commander via dietpi-software and started "mc" from here Then opened "mosquitto.conf" for editing via "Edit F4" and added a line: allow_anonymous true # obviously to allow connection without user & password and changed the listener line to: listener 1833 0.0.0.0 #otherwise mosquitto starts in "local ONLY"mode I then restarted the mosquitto server: systemctrl restart mosquitt.service and checked systemctrl status mosquitto service I then changed directory to: cd /usr/local/bin/ Create a new text file via: touch listen.py - or by any other means Then go to: https://github.com/vinceskahan/weatherflow-udp-listener click on "listen.py" and then on "raw" "ctrl-a" > ctrl-c" - copy I then started "mc" and opened "listen.py" for editing and pasted the content from the above via "shift-ctrl-v" then quit via F10 and save the file. Then I started: python3 /usr/local/bin/listen.py -b 127.0.0.1 -m -d This should produce some output like: rapid_wind => ts = 1624942363 mps = 2.07 dir = 131 publishing to mqtt://127.0.0.1/wf/rapid_wind I then edited the dietpi "custom.sh" file @ /var/lib/dietpi-autostart/ and added the line nohup python3 /usr/local/bin/listen.py -b 127.0.0.1 -m I then run dietpi-config and changed Autostart options to n#14: Custom This should start the listener.py automatically after a reboot. NI then checked that the MQTT Broker "mosquitto" is running and reachable! I use "MQTT Explorer" which is free and available for all major plattforms: Can be found here: http://mqtt-explorer.com/ Install on any machine on your network. When you are connected to your MQTT server you should find the topi "wf" and now all should be good to go and run the QuickApp You might also want to publish to InfluxDB for later use with grafana or so by adding the options to the listen.py command line. for options look at: https://github.com/vinceskahan/weatherflow-udp-listener ....and last but not least again thanks to: vinceskahan for the brilliant "listener" -- THANKS afendikov for providing the QuickApp -- THANKS and Bodyart @ for providing an alternate way of reading out the WeatherFlow data ..and of course anybody else I might have forgotten to mention here. THANK you very much Cheers Jürgen PS: Please report if you spot anything wrong here!
Hi2Uall! I configured a (working) Raspberry Pi 3 Raspbian with Node-Red and MQTT (see this excellent YouTube video for explanation). Now on working, and learning (a lot) how to implement this. So far it is very useful to connect several IoT services. Did anyone have an idea how to connect the HC2 to an MQTT server?