Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on raspbian buster #36

Open
laimerIT opened this issue Feb 6, 2021 · 3 comments
Open

Error on raspbian buster #36

laimerIT opened this issue Feb 6, 2021 · 3 comments

Comments

@laimerIT
Copy link

laimerIT commented Feb 6, 2021

Hello,

i made a fresh install with RaspberryPi B+ and my AirPi PCB 1.4 and get the following error. On Debian Jessie it runs great.
All configs checkt, no sensor problem

DEBUG:main: ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:10:00
DEBUG:main: ERROR: Exception during output: Unknown format code 'f' for object of type 'str'
DEBUG:main: ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
ERROR: Failed to obtain data from these sensors: DHT22-hum, DHT22-temp
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': None, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:10:20
DEBUG:main: ERROR: Exception during output: Unknown format code 'f' for object of type 'str'

It is the third sensor i have tested, sumtimes its ok

Time : 2021-02-06 14:45:01
DEBUG:main: ERROR: Exception during output: Unknown format code 'f' for object of type 'str'
INFO:main: Success: Data successfully obtained from all sensors.
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': 45.400001525878906, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': 22.700000762939453, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:45:21
Relative Humidity : 45.40 % (sample)
Temperature-DHT : 22.70 C (sample)

INFO:main: Success: Data output in all requested formats.
INFO:main: Success: Data successfully obtained from all sensors.
DEBUG:main: Dataset to output to <outputs.print.Print object at 0xb62eeaf0>:
DEBUG:main: [{'description': 'A combined temperature and humidity sensor.', 'symbol': '%', 'value': 45.400001525878906, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-hum', 'unit': '% Relative Humidity', 'name': 'Relative_Humidity'}, {'description': 'A combined temperature and humidity sensor.', 'symbol': 'C', 'value': 22.700000762939453, 'breach': False, 'readingtype': 'sample', 'sensor': 'DHT22-temp', 'unit': 'Celsius', 'name': 'Temperature-DHT'}]
Time : 2021-02-06 14:45:41

Greetings from Bavaria

@tvoverbeek
Copy link

When the sensor read cannot get a value it returns 'None'. Hence the formatting error.
Have you updated the Adafruit-DHT python library? Last version is 1.4.0 from 2018.
Adafruit has frozen the Adafriuit_DHT python library, since now they use circuit-python for all their platforms.

@laimerIT
Copy link
Author

laimerIT commented Feb 7, 2021

i think it uses the "import dhtreader" dhtreader.so
Can i change to circuit-python ?

@laimerIT
Copy link
Author

laimerIT commented Feb 7, 2021

sampling is running over night, an now the values printed out. Last days wenn i stop an start, value could not read from the sensor.
I changed the sensor 3 times, i run the nest days an write the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants