Legal Removal Request This form is for reporting content posted on the AB Electronics UK forums that you believe violates your personal legal rights or applicable local laws for your country. Post: Hi I hope this post founds you well. I'm struggling to get IO PI Plus up and running with home assistant. I'm able to get it running independently, but wi hass some library issue apears that freezes i2c interface. Any hints on troubleshooting libraries would be great. Here is how to reproduce: I’m using the homes assistant configuration below. [pre][code]switch: - platform: mcp23017 i2c_address: 0x20 pins: 1: Light1 3: Light3 5: Light5 7: Light7 9: Light9 11: Light11 13: Light13 15: Light15[/code][/pre] Environment used: RPI 3 B+ IO PI Plus expander HomeAssitant 0.110.70 - installed into venv I2C configured After a fresh start i can found I2C addresses (displayed instantly <1s) (homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: – -- – -- – -- – -- – -- – -- – 10: – -- – -- – -- – -- – -- – -- – -- – -- 20: 20 21 – -- – -- – -- – -- – -- – -- – -- 30: – -- – -- – -- – -- – -- – -- – -- – -- 40: – -- – -- – -- – -- – -- – -- – -- – -- 50: – -- – -- – -- – -- – -- – -- – -- – -- 60: – -- – -- – -- – -- – - can also successfully run my test python script controlling IO PI Plus with a relay board. After starting ./hass from I2c pins are not detected and I get an error in the log. [pre][code]> Logger: homeassistant.components.switch > Source: components/mcp23017/switch.py:42 > Integration: Switch ([documentation](https://www.home-assistant.io/integrations/switch), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+switch%22)) > First occurred: 10:32:47 AM (1 occurrences) > Last logged: 10:32:47 AM > > Error while setting up mcp23017 platform for switch > > Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 184, in __probe_for_device self.i2c.writeto(self.device_address, b"") File "/usr/local/lib/python3.7/site-packages/busio.py", line 86, in writeto return self._i2c.writeto(address, buffer, stop=stop) File "/usr/local/lib/python3.7/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 38, in writeto self._i2c_bus.write_bytes(address, buffer[start:end]) File "/usr/local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 308, in write_bytes self._device.write(buf) TimeoutError: [Errno 110] Operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 190, in __probe_for_device self.i2c.readfrom_into(self.device_address, result) File "/usr/local/lib/python3.7/site-packages/busio.py", line 76, in readfrom_into return self._i2c.readfrom_into(address, buffer, stop=stop) File "/usr/local/lib/python3.7/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 44, in readfrom_into readin = self._i2c_bus.read_bytes(address, end-start) File "/usr/local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 179, in read_bytes return self._device.read(number) TimeoutError: [Errno 110] Operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/mcp23017/switch.py", line 42, in setup_platform mcp = MCP23017(i2c, address=i2c_address) File "/usr/local/lib/python3.7/site-packages/adafruit_mcp230xx/mcp23017.py", line 64, in __init__ super().__init__(i2c, address) File "/usr/local/lib/python3.7/site-packages/adafruit_mcp230xx/mcp230xx.py", line 48, in __init__ self._device = i2c_device.I2CDevice(i2c, address) File "/usr/local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 69, in __init__ self.__probe_for_device() File "/usr/local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 192, in __probe_for_device raise ValueError("No I2C device at address: %x" % self.device_address) ValueError: No I2C device at address: 20 [/code][/pre] [b]After that momentI2C[/b] [b]interface also gets stuck[/b] even when when homeassistant is shutdown (now discovery takes >10s) homeassistant@raspberrypi:/srv/homeassistant $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: – -- – -- – -- – -- – -- – -- – 10: – -- – -- – -- – -- – -- – -- – -- – -- 20: – -- – -- – -- – -- – -- – -- – -- – -- 30: – -- – -- – -- – -- – -- – -- – -- – -- 40: – -- – -- – -- – -- – -- – -- – -- – -- 50: – -- – -- – -- – -- – -- – -- – -- – -- 60: – -- – -- – -- – -- – -- – -- – -- – -- 70: – -- – -- – -- – -- Also a tutorial that worked before, stops working… [pre][code](homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ python3 /home/pi/src/tutorial/tutorial2.py Traceback (most recent call last): File "/home/pi/src/tutorial/tutorial2.py", line 4, in bus = IOPi(0x20) File "/srv/homeassistant/lib/python3.7/site-packages/IOPi/IOPi.py", line 110, in __init__ self.__bus.write_byte_data(self.__ioaddress, self.IOCON, self.__conf) File "/srv/homeassistant/lib/python3.7/site-packages/smbus2/smbus2.py", line 434, in write_byte_data ioctl(self.fd, I2C_SMBUS, msg) OSError: [Errno 121] Remote I/O error [/code][/pre] Obvioulsy there is some library conflict issue. Any hints for troubleshooting? thank you Select the country where you are claiming legal rights. Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Aruba Australia Austria Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia And Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory British Virgin Islands Brunei Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Canary Islands Cape Verde Cayman Islands Central African Republic Chad Channel Islands Chile Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Cook Islands Costa Rica Croatia Cuba Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic East Timor Ecuador Egypt El Salvador Equatorial Guinea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Federated States of Micronesia Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guyana Haiti Heard Island and McDonald Islands Honduras Hong Kong Hungary Iceland India Indonesia Ireland Israel Italy Jamaica Japan Jordan Kazakhstan Kenya Kiribati Kuwait Kyrgyzstan Laos Latvia Lesotho Liechtenstein Lithuania Luxembourg Macau Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States Of Moldova, Republic Of Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niue Norfolk Island Northern Mariana Islands Norway Oman Palau Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Reunion Romania Russia Rwanda Samoa San Marino Sao Tome and Principe Saudi Arabia Serbia Seychelles Singapore Slovakia Slovenia Solomon Islands South Africa South Georgia and the South Sandwich Islands South Korea Spain Sri Lanka St. Helena St. Kitts and Nevis St. Lucia St. Pierre and Miquelon St. Vincent and the Grenadines Suriname Svalbard and Jan Mayen Islands Swaziland Sweden Switzerland Syria Taiwan Tajikistan Tanzania Thailand Togo Tokelau Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu U.S. Virgin Islands Uganda Ukraine United Arab Emirates United Kingdom United States United States Minor Outlying Islands Uruguay Uzbekistan Vanuatu Vatican City Venezuela Vietnam Wallis and Futuna Islands Western Sahara Yemen Yugoslavia Zambia What legal issue or problem do you wish to report? Please select Privacy / Erasure under GDPR Defamation Intellectual Property Hate Speech Other Please enter the following information so we can process your report. Contact Name: Contact Email: Details of complaint: Submit Complaint