i2c timeout errors galore after upgrade to UPSplus f/w v.8 ??
ArjenR49 opened this issue · 2 comments
Upgraded this afternoon to f/w v.8. The update went fine, as always before.
I also copied some python scripts from one SSD drive without HA to the other with HA etc.
I have no clue about the reason, but if the Pi runs on the SSD with HA, no i2c operations are possible. All cause timeout errors, the journalctl -f window is full of them (since fanShutDownUps.py is running all the time. That script doesn't crash, but it cannot be useful, either, as it cannot read or write to i2c ...
Even this small piece of code just reading two bytes ends with i2c timeout errors and produces no result.
# adapted from UPSPlus script by frtz13@github.com
import os
import sys
import smbus2
# Define I2C bus
DEVICE_BUS = 1
# Define device i2c slave address.
DEVICE_ADDR = 0x17
print("-"*60)
print("Modify battery protection voltage in UPS Plus")
print("-"*60)
PV_Mini_mV = 2500
PV_Maxi_mV = 4000
# Raspberry Pi Communicates with MCU via i2c protocol.
bus = smbus2.SMBus(DEVICE_BUS)
currentProtectionVoltage_mV = bus.read_byte_data(DEVICE_ADDR, 0x12) << 8 | bus.read_byte_data(DEVICE_ADDR, 0x11)
print("Current value: %d mV" % currentProtectionVoltage_mV)
What could be going on?
When running on the original SSD installation with MotionEye, but no HA, there is no problem.
hmmm. SSD = USB3.0 port ,right? Exists some changes on Raspbian+HA+SSD need do some extra configuration (not covered on this scripts.... yet ;) )
This scripts are to run OS inn SDCard device.
try enable this on config.txt file
#dtparam=i2s=on
#dtparam=spi=on
This maybe not script issue
#dtparam=i2s=on
#dtparam=spi=on
have you tryed? i have read somewhere rpi forums about that