Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your module apparently causes the i2c scan to slow down signficantly if the sensor disappears or another sensor is added after the bme280 sensor disappears? #6

Open
dachshund-digital opened this issue Jun 27, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dachshund-digital
Copy link

dachshund-digital commented Jun 27, 2020

Your module appears to cause the i2c scan to slow down significantly if the sensor was found, but later is not found. This should not happen, if the sensor is missing or disappears, the scan should still be quick. You can recreate this issue by adding a different sensor to the i2c bus, in place of the bme280, say a SHT3X sensor, but leave the BME280 flow in node red as is. Then run i2cdetect -y 1 and the detect scan will be horribly slow. Removing all sensors, i.e. SHT3X sensor, the scan returns to normal speed. This again can be illustrated by direct i2cdetect -y 1 from the command line. As long as your module is in an active flow, the slow down occurs, when the bme280 disappears or another sensor is on the bus other than the bme280.

@dachshund-digital dachshund-digital changed the title You module causes the i2c scan to slow down signficantly if the sensor is not found. Your module apparently causes the i2c scan to slow down signficantly if the sensor disappears or another sensor is added after the bme280 sensor disappears? Jun 27, 2020
@ludiazv
Copy link
Owner

ludiazv commented Jun 29, 2020

I have to test this scenario. Possible is due constant retries to contact with the missing sensor. At some point it should stop retrying and inactivate the node until new deployment.

@ludiazv ludiazv added the bug Something isn't working label Jun 29, 2020
@ludiazv ludiazv self-assigned this Jun 29, 2020
@dachshund-digital
Copy link
Author

Yes, I only discovered it, because I happen to be changing sensors in and out, and discovered this odd slow down side-effect. I changed my flow, adding a gate, so that the bme280 node never receives a message, unless I enable said flow. What I want to do, is somehow scan the i2c bus and only open the gate if a bmp280 or bme280 is present. Maybe your solution could be enhanced to try to initialize the sensor only if the sensor is present on the bus? Log error if sensor not found type of thing? I have 8 different sensors, across 12 devices, that report temperature, pressure, humidity, so in my python scripting I validate which sensor is present before attempt to use same. A good method for BMP/BME sensors is to query for the serial number of the sensor, if BMP do X, of BME do Y, for other sensors, search for device at the appropriate address, if MCP9808 do A, if Si702 do B, if SHT3X do C, etc., etc., if none of the above report no ambient sensor found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants