Closed alexbergsland closed 5 years ago
Oops! You're right @alexbergsland - the README.md is just outdated I think.
so you need to specify which ones are connected in your config.py file (see below).
should be instead:
so you need to specify which ones are connected in your
Devices
database table (see step 3 below).
Step 3 shows how to add DHT sensors to Atmospi by adding a record for them in the Devices
table like so:
INSERT INTO Devices (DeviceID, Type, SerialID, Label) VALUES (NULL, 'dht22', '22', 'Upstairs DHT22');
Hope that helps!
Do you want to update the README.md and create a pull request?
Oh, so I can rewove my edits in the config? I have done the insert into the db but I get no readings on the atmos page, not from the DHT22 at least.
I have never done a pull request but I can try.
Seems I found my error, I used:
INSERT INTO Devices (DeviceID, Type, SerialID, Label) VALUES (NULL, 'dht22', '22', 'Varm');
to add my sensor to the database.
I should have used:
INSERT INTO Devices (DeviceID, Type, SerialID, Label) VALUES (NULL, 'dht22', '17', 'Varm');
It's working now.
Maybe Ill clarify that in the readme as well.
Great! Yes - you figured it out. The pin column needs to be set to the pin you are plugged into. :-)
Pull requests are easy: click "Fork" in the top right, edit the file and commit it to your fork, then Github will give you a link to create a pull request from that.
Thanks!
First of all I found no info on how to add a new sensor into config.py. I read ".. so you need to specify which ones are connected in your config.py file (see below)." and then I found no example of that, but I did find the answer to that in another issue here. so my default_setting.py looks like:
With that I get an error:
And I googled it and found that there was an import missing, so I added
from arcpy.sa import Con
to measure-dht.py. That gives me another error:I changed to Farenheit in the config but that gave the same error. I am sure this has something to do with a typo error on my side. I can get a reading from the Adafruit example using:
I also have a DS1820 that was showing reading on the Flask site until I changed the default_setting.py.
Kind Regards Alex