templogger | power Micropython MQTT temperature logger
kandi X-RAY | templogger Summary
kandi X-RAY | templogger Summary
Low-power Micropython MQTT temperature logger for DS18B20 and ESP8266 (Banggood ESP12E) running on 18650 Lipo.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Print sensor temperatures in MQTT format
- Send values to broker
- Wait for the WLAN to connect
- Return a dictionary of all romors
- Sleep the machine
- Reads the voltage
- Convert rom to hex
templogger Key Features
templogger Examples and Code Snippets
Community Discussions
Trending Discussions on templogger
QUESTION
I have two raspberry pi with almost identical setup. On both I have a systemctl service and a timer which run every 15 seconds. The job calls a go script, which reads out the system temperature and creates a log entry in my mariadb database. The database is running on one of the raspberries. Therefore the only difference in the two go scripts are the hostname of the database and an identifier variable so I can see in the database from which the database entry is coming from. The rest is identical.
The problem is that raspberry1 produces more database entries than raspberry2. When I start with a fresh database with zero entries. Then 1 have about 120 entries from raspberry1 and about 70 entries from raspberrie two. The error continues. After more time I get for example 1000 entries and 700 entries.
Does anyone know where the differences could coming from? Maybe when both jobs want to create a new entry in the mariadb at the same time? But I'm almost sure that this is handled somehow by mariadb.
Here are the details:
FanLog.service
...ANSWER
Answered 2021-Sep-22 at 23:45I have found the solution:
One of these two options made it work:
QUESTION
I have this script that runs continuously on a raspbery Zero to capture the temperatures and send them to grafana the problem is that when the grafana server is stopped for backup or something, the script falls in error and does not automatically resume so I’m looking for a way to create a connection test loop prealable to sending data and if the grafana server is off-service the continuous script worked until the grafana server was up and running and therefore resumed sending the temperature data to the grafana server.
Because current I end up with the script in error with in the message
requests.exceptions.ConnectionError: HTTPConnectionPool
To use script
python templogger.py -db=influx_db_temperature -sn=temperature -rn=RUN
My script :
...ANSWER
Answered 2020-Oct-15 at 22:34Thank you @AbhinavMathur for forcing me to stay on adding a try-except because in the end it’s just that I wasn’t positioning correctly in the script
This is the modif allowing the script to not crash with a connection error.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install templogger
Micropython installed (tested with 1.8.6) https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/intro.html#intro
Is configured for Wifi https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html#configuration-of-the-wifi
Has Webrepl enabled https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/repl.html#webrepl-a-prompt-over-wifi
Has ADC switched to battery input (see below)
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page