|
Post by triggerfish on Aug 31, 2018 8:27:39 GMT -8
Hi,
Not sure if this is the right place. There is another SunAir area, but I'll start here.
I am working on my GroveWeatherPi system, which is running for about 80% right now  In all the output, I get erros on a regular base. They all seem to be related to a INA3221 module, which would be the SunAir driver. In the SDL_Pi_INA3221dirctory is a tst script, which gives me a similar error when I run it:
pi@IBADHOEV14:~/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221 $ sudo python testSDL_Pi_INA3221.py
Test SDL_Pi_INA3221 Version 1.0 - SwitchDoc Labs
Sample uses 0x40 and SunAirPlus board INA3221 Will work with the INA3221 SwitchDoc Labs Breakout Board Program Started at:2018-08-31 18:20:07
Traceback (most recent call last): File "testSDL_Pi_INA3221.py", line 30, in <module> ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=0x40) File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 91, in __init__ self._write_register_little_endian(INA3221_REG_CONFIG, config) File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 123, in _write_register_little_endian self._bus.write_word_data(self._addr, register, switchdata) IOError: [Errno 121] Remote I/O error pi@IBADHOEV14:~/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221 $
So there seems to be a problem with something SunAir related. Any suggestions based on the error?
|
|
|
Post by SDL on Sept 1, 2018 10:54:32 GMT -8
Peter,
This is a well known problem that we still haven't solved. It has to do with the threading system and conflict for using the I2C bus. We have it our our next BugWeek list.
Since you have the INA3221 on a different I2C Mux bus segment, you need to modify the code for it to select the Mux segment (see the GroveWeather Pi code and the TCA directory).
BP
|
|
|
Post by triggerfish on Sept 7, 2018 6:27:48 GMT -8
Peter, Since you have the INA3221 on a different I2C Mux bus segment, you need to modify the code for it to select the Mux segment (see the GroveWeather Pi code and the TCA directory). BP I'll have a look. But I am not a python programmer, so I am not sure if I can work it out.
|
|
|
Post by triggerfish on Sept 10, 2018 0:00:05 GMT -8
Since you have the INA3221 on a different I2C Mux bus segment, you need to modify the code for it to select the Mux segment (see the GroveWeather Pi code and the TCA directory). As far as I can see, all is configured correctly: # switch to BUS2 - SunAirPlus is on Bus2 tca9545.write_control_register(TCA9545_CONFIG_BUS2)
sunAirPlus = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=0x40)
So, Bus2 is selected, which is where the SunAir is... I am just not sure that the addr 0x40 is correct, since in the TCA file another address is used: TCA9545_ADDRESS = (0x73) # 1110011 (A0+A1=VDD)
|
|
|
Post by SDL on Sept 12, 2018 7:25:25 GMT -8
Peter,
0x73 is the address of the I2C Mux itself. 0x40 is the address of SunAirPlus.
BP
|
|
|
Post by triggerfish on Sept 15, 2018 6:09:33 GMT -8
Peter, 0x73 is the address of the I2C Mux itself. 0x40 is the address of SunAirPlus. BP Yes, thank you, was obvious when I looked at it again
|
|