Comments (6)
There should be warnings when TP starts up about not able to login into the MQTT server. So grep for to MQTT Broker
in the logfile. Maybe there is some more information when TP starts up.
Also, when you edit the notification settings, it is all still correct values?
from terrariumpi.
There should be warnings when TP starts up about not able to login into the MQTT server. So grep for
to MQTT Broker
in the logfile. Maybe there is some more information when TP starts up.Also, when you edit the notification settings, it is all still correct values?
All is Ok in the configuration file here is the part of the log where the new TP starts, looks like something is not correct?
May 14 16:19:58 terrariumpi python[496]: 2024-05-14 16:19:58,648 - INFO - OpenWeatherMap - Using Openweathermap One Call API 2.5
May 14 16:19:58 terrariumpi systemd[1]: systemd-fsckd.service: Succeeded.
May 14 16:19:59 terrariumpi python[496]: 2024-05-14 16:19:59,847 - INFO - OpenWeatherMap - Loaded new historical weather data (40 measurements) from 2024-05-13 12:00:00 till 2024-05-15 03:00:00 in 1.20 seconds.
May 14 16:19:59 terrariumpi python[496]: 2024-05-14 16:19:59,849 - INFO - terrariumWeather - Loaded weather data from source https://api.openweathermap.org/data/2.5/weather?q=Noumea,NC&appid=144d3f645a94f10491acb972422f3036 in 1.74 seconds
May 14 16:19:59 terrariumpi python[496]: Exception ignored in: <function Client.del at 0xf64aeb68>
May 14 16:19:59 terrariumpi python[496]: Traceback (most recent call last):
May 14 16:19:59 terrariumpi python[496]: File "/home/pi/TerrariumPI/venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 874, in del
May 14 16:19:59 terrariumpi python[496]: self._reset_sockets()
May 14 16:19:59 terrariumpi python[496]: File "/home/pi/TerrariumPI/venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 1133, in _reset_sockets
May 14 16:19:59 terrariumpi python[496]: self._sock_close()
May 14 16:19:59 terrariumpi python[496]: File "/home/pi/TerrariumPI/venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 1119, in _sock_close
May 14 16:19:59 terrariumpi python[496]: if not self._sock:
May 14 16:19:59 terrariumpi python[496]: AttributeError: 'Client' object has no attribute '_sock'
May 14 16:19:59 terrariumpi python[496]: 2024-05-14 16:19:59,945 - WARNING - terrariumNotification - Failed connecting to MQTT Broker at address: 192.168.1.22:1883: init() missing 1 required positional argument: 'callback_api_version'
May 14 16:20:01 terrariumpi python[496]: 2024-05-14 16:20:01,631 - ERROR - terrariumNotification - Could not send message Starting up TerrariumPI 4.9.0 on a Raspberry Pi 4 Model B Rev 1.5 ... to topic terrariumpi/system/broadcast as we are not connected to the MQTT broker at address: 192.168.1.22:1883
May 14 16:20:02 terrariumpi python[496]: 2024-05-14 16:20:02,200 - INFO - terrariumEngine - Start loading total power and water usage
May 14 16:20:09 terrariumpi systemd[1]: systemd-hostnamed.service: Succeeded.
May 14 16:20:14 terrariumpi python[496]: 2024-05-14 16:20:14,664 - INFO - terrariumEngine - Loaded total power and water usage in 12.46 seconds.
May 14 16:20:14 terrariumpi python[496]: 2024-05-14 16:20:14,664 - INFO - terrariumEngine - Loading existing sensors from database.
For reference here is startup prior to upgrade to 4.9.0...
May 14 13:18:06 terrariumpi systemd[1]: Started watchdog daemon.
May 14 13:18:06 terrariumpi systemd[1]: Startup finished in 3.490s (kernel) + 1min 19.411s (userspace) = 1min 22.902s.
May 14 13:18:06 terrariumpi python[495]: 2024-05-14 13:18:06,977 - INFO - terrariumEngine - Loaded 30 settings in 0.18 seconds.
May 14 13:18:07 terrariumpi python[495]: 2024-05-14 13:18:07,365 - INFO - terrariumEngine - Loading weather data from source https://api.openweathermap.org/data/2.5/weather?q=Noumea,NC&appid=144d3f645a94f10491acb972422f3036
May 14 13:18:09 terrariumpi python[495]: 2024-05-14 13:18:09,338 - INFO - weather.openweathermap_org_weather - Using Openweathermap One Call API 2.5
May 14 13:18:10 terrariumpi python[495]: 2024-05-14 13:18:10,178 - INFO - weather.openweathermap_org_weather - Loaded new historical weather data (48 measurements) from 2024-05-12 12:00:00 till 2024-05-14 11:00:00 in 0.84 seconds.
May 14 13:18:10 terrariumpi python[495]: 2024-05-14 13:18:10,180 - INFO - weather - Loaded new weather data in 2.811 seconds.
May 14 13:18:11 terrariumpi python[495]: 2024-05-14 13:18:11,148 - INFO - terrariumNotification - Connecting to MQTT Broker at address: 192.168.1.22:1883 ...
May 14 13:18:11 terrariumpi python[495]: 2024-05-14 13:18:11,407 - INFO - terrariumNotification - Logged in to MQTT Broker at address: 192.168.1.22:1883.
May 14 13:18:15 terrariumpi python[495]: 2024-05-14 13:18:15,687 - INFO - terrariumEngine - Loading existing sensors from database.
May 14 13:18:15 terrariumpi python[495]: 2024-05-14 13:18:15,817 - INFO - terrariumEngine - Loaded sensor SI7021 sensor humidity named 'Humidity Mid Cage Centre' at address '0x40,1' with value 69.49% in 0.12 seconds.
May 14 13:18:15 terrariumpi python[495]: 2024-05-14 13:18:15,822 - INFO - terrariumEngine - Loaded sensor SI7021 sensor temperature named 'Temperature Mid Cage Centre' at address '0x40,1' with value 21.37C in 0.00 seconds.
May 14 13:18:15 terrariumpi python[495]: 2024-05-14 13:18:15,926 - INFO - terrariumEngine - Loaded sensor SI7021 sensor humidity named 'Humidity Mid Cage Left' at address '0x40,3' with value 69.98% in 0.10 seconds.
May 14 13:18:15 terrariumpi python[495]: 20
Rgds - Clive
from terrariumpi.
There should be warnings when TP starts up about not able to login into the MQTT server. So grep for
to MQTT Broker
in the logfile. Maybe there is some more information when TP starts up.Also, when you edit the notification settings, it is all still correct values?
Looks like it might be something to do with this..?
paho-mqtt 2.0, released on Feb, 10th, now requires an additional argument to mqtt.Client(), see their migration notes.
from terrariumpi.
If you add the following code mqtt.CallbackAPIVersion.VERSION1
on line in the file terrariumNotification.py
TerrariumPI/terrariumNotification.py
Line 2327 in 9644049
self.connection = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, client_id=f"TerrariumPI {self.setup['version']}")
And restart TerrariumPI. This should make it work again.
from terrariumpi.
If you add the following code
mqtt.CallbackAPIVersion.VERSION1
on line in the fileterrariumNotification.py
TerrariumPI/terrariumNotification.py
Line 2327 in 9644049
so that the line will become:
self.connection = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, client_id=f"TerrariumPI {self.setup['version']}")
And restart TerrariumPI. This should make it work again.
🤙 Yep that has fixed it. Thank you!
from terrariumpi.
Nice! Fix is also pushed to Github. Thanks for testing!
from terrariumpi.
Related Issues (20)
- [BUG]: Low/High alarm deviation values not showing HOT 4
- [BUG]: Kasa relay not shutting off HOT 22
- Not an issue just some help needed! HOT 2
- [BUG]: Relays toggle off and immediately on, despite of Settle Time HOT 6
- [BUG]: Missing Sensirion SHTxx Sensors? HOT 17
- [BUG]: Dimming not working as expected HOT 18
- [FEATURE]: Obfuscate password attempts in logs HOT 4
- [FEATURE]:PWM Fan Control HOT 2
- [BUG]: Lights turn on and off unexpectedly, outside schedule HOT 9
- [BUG]: No Startup after Upgrade HOT 20
- [BUG]: Camera and Relays not working after Upgrade and Titles of Sensors erased HOT 19
- [BUG]: Clear the screen between messages for 20x4 LCD display HOT 14
- [FEATURE]: Modify "mail_from" via GUI settings HOT 8
- [FEATURE]: support for Meross MS100FH HOT 5
- [BUG]: Invalid configuration of calendar.ics HOT 11
- Is this a typo? Should it read increase OR decrease rather than OF? HOT 1
- [BUG]: Emails being sent twice HOT 2
- [BUG]: Missing Sensirion SHTxx Sensor HOT 3
- DISignore Relay HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terrariumpi.