0

temp_humidity example
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

temp_humidity example

by Antennas on Mon Jun 24, 2019 4:49 pm

I went through your tutorial for the temp humidity example. Couldn't get it working and gave up. Came back to it and when I ran it, it worked. Nice so I edited my rc.local to make it run on boot. Re-booted now it is the same as before , I cannot get it to work again.
It gives me,
Traceback (most recent call last):
File "temp_humidity.py", line 25, in <module>
from Adafruit_IO import Client, Feed
ImportError: No module named 'Adafruit_IO'


So it worked for a bit then stopped. I searched and can't find anything relevant to this issue.
Can someone please tell me why it wont work? I can run simpletest after changing the pin to 7 which is where I have it. Also the AdafruitDHT works as well when I use 2302 7

Any assistance would be great. Thanks.

Antennas
 
Posts: 3
Joined: Thu Jul 31, 2014 6:02 pm

Re: temp_humidity example

by Antennas on Mon Jun 24, 2019 9:18 pm

Ok I got this working. I tried a manual install and it seemed to work. I set up rc.local to run it at boot. It does do it. But it seems to stop after about 10 mins and won't update the data anymore. Is there something else I need to set to make it continuously work?

Antennas
 
Posts: 3
Joined: Thu Jul 31, 2014 6:02 pm

Re: temp_humidity example

by adafruit_support_mike on Tue Jun 25, 2019 2:49 am

What microcontroller are you using, and where exactly is the problem happening? Is the board hanging, losing connection to the sensor, losing its connection to the computer, is the computer losing its connection to the internet, or something else?

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: temp_humidity example

by Antennas on Tue Jun 25, 2019 1:27 pm

I am using a raspberry Pi like the tutorial. I don't know where it's stopping. I don't know of a way to check what is happening. Be nice to know if the Pi stopped sending or if it broke in between somewhere to the IO server.
Any ideas?

Antennas
 
Posts: 3
Joined: Thu Jul 31, 2014 6:02 pm

Re: temp_humidity example

by adafruit_support_mike on Tue Jun 25, 2019 11:11 pm

Post a link to the code or project you're using please, along with a photo showing your hardware and connections. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: temp_humidity example

by abachman on Wed Jun 26, 2019 1:37 pm

hi Antennas,


Can you also post your code (without the Adafruit IO credentials)?

Your original issue:
Code: Select all | TOGGLE FULL SIZE
File "temp_humidity.py", line 25, in <module>
from Adafruit_IO import Client, Feed
ImportError: No module named 'Adafruit_IO'
probably means the Adafruit IO python package was installed in a different environment than the rc.local task is running in. Linux does not make this easy :/

Running fine and stopping after 10 minutes sounds like a problem in code, not the network connection. Are you also seeing all the data that is being sent from the device?

You might also check your /var/log/syslog file to see if your script is printing any output while it's running.


- adam

abachman
 
Posts: 327
Joined: Mon Feb 01, 2010 12:48 pm

Please be positive and constructive with your questions and comments.