Replies: 1 comment 2 replies
-
|
Indeed, you can only have rule triggers when the basis is JSON (the built-in triggers also goes via JSON not shown in the console). Not available for messages in general. With ESP32 and Berry, you'd have a feature where it is possible to handle all log messages (with care), but not with ESP8266. More generally, I'd say that when getting those "Error writing to I2C bus", that's the issue to debug and fix, instead of aiming for workarounds on top. Maybe the driver for SHT4X should be fixed to not report old values when it fails to communicate with the sensor. Sensor values dropping out could also be used by rules to trigger a restart, for users wanting kludgy workarounds.... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to detect I2C bus errors in a Rule? See here for the device/sensors I'm using.
I2C generally works fine, but sometimes it does not 🙃 Not sure, I guess there is some interference on my board. But before I look into the hardware cause, I would like to fix this in Tasmota.
Here is my rule:
And here is the log output when I2C got stuck:
It might be worth mentioning that all commands in the Rule keep triggering, even though none of the sensor values are changing. You can see I tried matching the SGP40#TVOC value to error, but that doesn't work ofc as the reported value is still the last successfully measured value of 100.
Also even though none of the sensor values changes anymore, only the SGP4X driver returns an error. To get the I2C bus unstuck again, I would like to be able to add a event command to that SGP4X error so I can call
i2cdriver82 1to restart the i2c bus. But that doesn't seem to be possible atm?--edit--
Maybe a generic Log trigger for Rule's would be cool to add? Or are Rule's basically deprecated in favor of ESP+berry?
Beta Was this translation helpful? Give feedback.
All reactions