Fresh install of Raspbian Stretch Lite did update/upgrade/dist-upgrade before installing Mycodo
Errors
2018-04-21 23:17:44,643 - mycodo.inputs.dht22_1 - INFO - Turning on sensor
2018-04-21 23:17:44,650 - mycodo.output - WARNING - Cannot turn on Output with ID 0. It doesn't exist
2018-04-21 23:17:46,655 - mycodo.input_8bed4119 - INFO - Activated in 2148.0 ms
2018-04-21 23:17:46,715 - mycodo.inputs.dht22_1 - ERROR - DHT22Sensor raised an exception when taking a reading: 'NoneType' object has no attribute 'is_on'
Traceback (most recent call last):
File "/var/mycodo-root/mycodo/inputs/dht22.py", line 212, in read
self._temperature) = self.get_measurement()
File "/var/mycodo-root/mycodo/inputs/dht22.py", line 155, in get_measurement
not db_retrieve_table_daemon(Output, unique_id=self.power_output_id).is_on()):
AttributeError: 'NoneType' object has no attribute 'is_on'
Maybe i'm doing something wrong, but if you edit the dht22.py and comment out the lines 154 up to 160 save and restart the backend it will display the data from the sensor without any errors.
Mycodo Issue Report:
Problem Description
Please list:
Read input from DHT22 on GPIO 2
Fresh install of Raspbian Stretch Lite did update/upgrade/dist-upgrade before installing Mycodo
Errors
2018-04-21 23:17:44,643 - mycodo.inputs.dht22_1 - INFO - Turning on sensor 2018-04-21 23:17:44,650 - mycodo.output - WARNING - Cannot turn on Output with ID 0. It doesn't exist 2018-04-21 23:17:46,655 - mycodo.input_8bed4119 - INFO - Activated in 2148.0 ms 2018-04-21 23:17:46,715 - mycodo.inputs.dht22_1 - ERROR - DHT22Sensor raised an exception when taking a reading: 'NoneType' object has no attribute 'is_on' Traceback (most recent call last): File "/var/mycodo-root/mycodo/inputs/dht22.py", line 212, in read self._temperature) = self.get_measurement() File "/var/mycodo-root/mycodo/inputs/dht22.py", line 155, in get_measurement not db_retrieve_table_daemon(Output, unique_id=self.power_output_id).is_on()): AttributeError: 'NoneType' object has no attribute 'is_on'
https://github.com/kizniche/Mycodo/blob/c6b7ae3ba5f5d8a852919d702a5131c594682742/mycodo/inputs/dht22.py#L154
Steps to Reproduce the issue:
How can this issue be reproduced?
Additional Notes
Maybe i'm doing something wrong, but if you edit the dht22.py and comment out the lines 154 up to 160 save and restart the backend it will display the data from the sensor without any errors.