|
Post by justin on Aug 24, 2018 17:47:56 GMT -8
I have been noticing that every once in awhile the AM2315 crc goes to -1. When it does this the temp and humidity goes to 0. What exactly is "crc"? It usually reads "1", but also sometimes "0". But only when it says "-1" do I get a bad reading. Thanks.
|
|
|
Post by justin on Aug 25, 2018 6:31:40 GMT -8
To add more to the issue I posted up above- This morning I decided to put the whole system together and run it on battery/solar for awhile to see how things would run. So previously the sunairplus board was not hooked up. Now with the sunairplus board hooked up everytime the am2315 goes -1 I receive the error posted below. There doesnt seem to be any rhyme or reason to it. When the am2315 goes 0 or 1 the sunairplus board displays proper data.
AM2315 Temperature/Humidity Sensor ----------------- outsideTemperature: 0.0 C outsideHumidity: 0.0 % crc: -1 ----------------- ----------------- ----------------- ----------------- SunAirPlus Currents / Voltage ----------------- ERROR:apscheduler.executors.default:Job "sampleAndDisplay (trigger: interval[0:00:10], next run at: 2018-08-25 09:25:04 CDT)" raised an exception Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "GroveWeatherPi.py", line 1399, in sampleAndDisplay shuntvoltage1 = sunAirPlus.getShuntVoltage_mV(LIPO_BATTERY_CHANNEL) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 156, in getShuntVoltage_mV value = self._getShuntVoltage_raw(channel) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 139, in _getShuntVoltage_raw value = self._read_register_little_endian(INA3221_REG_SHUNTVOLTAGE_1+(channel -1) *2) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 108, in _read_register_little_endian result = self._bus.read_word_data(self._addr,register) & 0xFFFF IOError: [Errno 121] Remote I/O error [Errno 121] Remote I/O error File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "GroveWeatherPi.py", line 1399, in sampleAndDisplay shuntvoltage1 = sunAirPlus.getShuntVoltage_mV(LIPO_BATTERY_CHANNEL) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 156, in getShuntVoltage_mV value = self._getShuntVoltage_raw(channel) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 139, in _getShuntVoltage_raw value = self._read_register_little_endian(INA3221_REG_SHUNTVOLTAGE_1+(channel -1) *2) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 108, in _read_register_little_endian result = self._bus.read_word_data(self._addr,register) & 0xFFFF
|
|
|
Post by SDL on Aug 25, 2018 15:32:06 GMT -8
Justin,
Does the SunAirPlus always work with the AM2315 unconnected?
These are interesting symptoms. It looks like the AM2315 is locking the bus. Noise on the power lines? How long is your cable to the AM2315?
BP
|
|
|
Post by justin on Aug 25, 2018 18:25:55 GMT -8
I tried unhooking the AM2315 and booting it up but it would never come up. Watching the CPU usage, it would spike to 100% then drop down to 1-2%. So after running sudo python GroveWeatherPi.py nothing would happen at all. I plugged in the AM2315 and it booted up just fine like always, but with the crc -1 problem still.
So next I unplugged the AM2315 and plugged in the HDC1080 temp/humidity sensor. I had previously been running the system without it. I had it plugged into the 6 port I2C Expander, but this time after running sudo python GroveWeatherPi.py it returned "deviceID= 0x1050" but nothing else would load.
Plugged the AM2315 and the HDC1080 both in and it boots up just fine again.
As far as noise on the power line I have no idea how to even check for that. And the cable for the AM2315 is roughly 3ft. Its the stock cable that it shipped with.
The last thing I should mention is I found a thread on this forum that mentioned the exact same thing I'm seeing with the crc -1. He had a work though with a code change in the Groveweatherpi.py. So, following that thread, I deleted and replaced with his modified code, making sure to keep the indentation format correct like he mentioned. After doing the code change I cant say it made any difference at all.
|
|
|
Post by SDL on Aug 25, 2018 20:28:45 GMT -8
Please give us the printouts from running the software with the AM2315 installed.
It's supposed to work just fine without the AM2315, So I'm a bit mystified.
Also, go down in the TCA directory and run the test on the I2C Mux.
BP
|
|
|
Post by justin on Aug 26, 2018 14:52:25 GMT -8
Ok, so I hope I might have figured out what was going on. I booted up again this morning and it was still giving the same error sporadically. So I went to the box and I noticed that when I touched the the JP6-JP7 jumper wires on the Mux board, a white led would illuminate or not on the Pi2Grover(I2C Activity) by how I moved them around (they were plugged all the way in but felt loose). I replaced those 4 jumpers with new female to female jumpers and booted it up. I've been watching it for 10 min. or so and it hasn't error-ed yet. So we will see but I'm hopeful that was it. I might start a new thread but now I'm seeing an error when it tries to push data out to Weather Underground. I'll keep watching it but if it persists I will likely start a new thread.
|
|
|
Post by SDL on Aug 26, 2018 17:49:25 GMT -8
Justin,
That would explain everything! The I2C bus segments would have been floating and that would screw everything up. And placing different I2C devices on the bus would cause different results!
Woohoo!
BP
|
|