Hi Pat, I think this one may be for you ...
As per the above and below, I get the no module error setting up MQTT. I've sanitised the the username and password to the MQTT service in the extract of weewx.conf below, otherwise hopefully it's all as per your Github instructions.
Aug 26 13:10:14 raspberrypi weewx[3191]: manager: Starting backfill of daily summaries
Aug 26 13:10:14 raspberrypi weewx[3191]: restx: StationRegistry: Registration not requested.
Aug 26 13:10:14 raspberrypi weewx[3191]: restx: Wunderground: Posting not enabled.
Aug 26 13:10:14 raspberrypi weewx[3191]: restx: PWSweather: Posting not enabled.
Aug 26 13:10:14 raspberrypi weewx[3191]: restx: CWOP: Posting not enabled.
Aug 26 13:10:14 raspberrypi weewx[3191]: restx: WOW: Posting not enabled.
Aug 26 13:10:14 raspberrypi weewx[3191]: restx: AWEKAS: Posting not enabled.
Aug 26 13:10:14 raspberrypi weewx[3191]: engine: Caught unrecoverable exception in engine:
Aug 26 13:10:14 raspberrypi weewx[3191]: **** No module named mqtt
Aug 26 13:10:14 raspberrypi weewx[3191]: **** Traceback (most recent call last):
Aug 26 13:10:14 raspberrypi weewx[3191]: **** File "/usr/share/weewx/weewx/engine.py", line 871, in main
Aug 26 13:10:14 raspberrypi weewx[3191]: **** engine = engine_class(config_dict)
Aug 26 13:10:14 raspberrypi weewx[3191]: **** File "/usr/share/weewx/weewx/engine.py", line 78, in __init__
Aug 26 13:10:14 raspberrypi weewx[3191]: **** self.loadServices(config_dict)
Aug 26 13:10:14 raspberrypi weewx[3191]: **** File "/usr/share/weewx/weewx/engine.py", line 142, in loadServices
Aug 26 13:10:14 raspberrypi weewx[3191]: **** self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Aug 26 13:10:14 raspberrypi weewx[3191]: **** File "/usr/share/weewx/weeutil/weeutil.py", line 1132, in _get_object
Aug 26 13:10:14 raspberrypi weewx[3191]: **** mod = __import__(module)
Aug 26 13:10:14 raspberrypi weewx[3191]: **** ImportError: No module named mqtt
Aug 26 13:10:14 raspberrypi weewx[3191]: **** Exiting.
Aug 26 13:10:37 raspberrypi systemd[1]: Stopping LSB: weewx weather system...
Aug 26 13:10:37 raspberrypi weewx[3227]: Stopping weewx weather system: weewx not running....
Aug 26 13:10:37 raspberrypi systemd[1]: Stopped LSB: weewx weather system.
The mqtt.py file is in /usr/share/weewx/ as per below (I'll change the permissions for read-only shortly)
total 192
-rw-r--r-- 1 root root 2886 Aug 17 04:06 daemon.py
-rw-r--r-- 1 root root 2715 Aug 24 16:09 daemon.pyc
-rw-rw-rw- 1 root root 16926 Aug 26 12:14 mqtt.py
drwxr-xr-x 2 root root 4096 Aug 24 16:09 schemas
drwxr-xr-x 3 root root 4096 Aug 24 16:20 user
drwxr-xr-x 2 root root 4096 Aug 24 16:11 weecfg
-rwxr-xr-x 1 root root 5145 Aug 17 04:06 wee_config
-rwxr-xr-x 1 root root 36471 Aug 17 04:06 wee_database
drwxr-xr-x 2 root root 4096 Aug 24 16:09 weedb
-rwxr-xr-x 1 root root 16207 Aug 17 04:06 wee_debug
-rwxr-xr-x 1 root root 1681 Aug 17 04:06 wee_device
-rwxr-xr-x 1 root root 3118 Aug 17 04:06 wee_extension
drwxr-xr-x 2 root root 4096 Aug 24 16:09 weeimport
-rwxr-xr-x 1 root root 31159 Aug 17 04:06 wee_import
drwxr-xr-x 2 root root 4096 Aug 24 16:10 weeplot
-rwxr-xr-x 1 root root 2171 Aug 17 04:06 wee_reports
drwxr-xr-x 2 root root 4096 Aug 24 16:10 weeutil
drwxr-xr-x 3 root root 4096 Aug 24 16:10 weewx
-rwxr-xr-x 1 root root 2565 Aug 17 04:06 weewxd
-rwxr-xr-x 1 root root 20788 Aug 17 04:06 wunderfixer
[StdRESTful] .....
[[MQTT]]
#This section is for the MQTT service setup
server_url = mqtt://user:pass...@m11.cloudmqtt.com:13147/
topic = weather/41south
unit_system = Metric
binding = archive, loop
aggregation = aggregate
[Engine]
[[Services]]
restful_services = ...... weewx.restx.StdAWEKAS, user.mqtt.MQTT
What did I miss??
Thanks
Colin
Aug 26 13:10:14 raspberrypi weewx[3191]: **** ImportError: No module named mqtt
The mqtt.py file is in /usr/share/weewx/ as per below (I'll change the permissions for read-only shortly)
| weather/41south/loop | {"cloudbase_meter": "385.160767033", "outHumidity": "79.9998437932", "pressure_mbar": "1053.16654107", "rain_cm": "0.0", "barometer_mbar": "1053.16654107", "dewpoint_C": "-2.69897261268", "windGust_kph": "5.02780872081e-05", "heatindex_C": "0.341840163469", "dayRain_cm": "0.508", "inDewpoint_C": "-0.511415146209", "altimeter_mbar": "1053.61058559", "windchill_C": "0.341840163469", "appTemp_C": "-2.00597980905", "outTemp_C": "0.341840163469", "windGustDir": "359.999062759", "humidex_C": "0.341840163469", "rain24_cm": "0.508", "inTemp_C": "17.2222800764", "windSpeed_kph": "4.1898406007e-05", "usUnits": "16.0", "UV": "11.4155207049", "rainRate_cm_per_hour": "0.0", "dateTime": "1535247709.0", "windDir": "359.999062759", "inHumidity": "29.9997917248", "radiation_Wpm2": "815.394336067"} |
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
These are the instance settings at CloudMQTT
| Server | m11.cloudmqtt.com |
| User | |
| Password | |
| Port | 13147 |
| SSL Port | 23147 |
| Websockets Port (TLS only) | 33147 |
| Connection limit | 5 |
And here is the skin.conf section .....
# MQTT Defaults
mqtt_enabled = 1
mqtt_host = "m11.cloudmqtt.com"
mqtt_port = 33147
mqtt_ssl = 0
mqtt_topic = "weather/41south/loop"
disconnect_live_website_visitor = 1800000
Not quite sure what is awry - Pat?
I also just realized the MQTT live updates are hard coded for imperial units. Those pesky units have got me again!
On an unrelated note, I have a pull request against your meteostick driver. Anything more I need to do with that?
--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/FQfh0AAJmCA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
sudo apt-get update
sudo apt-get install mosquitto mosquitto-clientspersistence false
allow_anonymous true
# Non-SSL MQTT
listener 1883
protocol mqtt
# Non-SSL Websockets
listener 9001
protocol websocketssudo service mosquitto stop
sudo service mosquitto startmosquitto_sub -h localhost -p 1883 -t "your/topic"