I am having an issue all of a sudden when my sensor boots up on one of my air quality monitors with the following error. I have tried rebooting the device, and with the device booted dis and reconnecting the sensor.
sensor ================ Starting Balena Sense ================
sensor Traceback (most recent call last):
sensor File “/usr/src/app/scripts/sensor.py”, line 131, in
sensor balenasense = balenaSense()
sensor File “/usr/src/app/scripts/sensor.py”, line 28, in init
sensor self.sensor = ENVIROPLUS()
sensor File “/usr/src/app/scripts/enviroplushat.py”, line 24, in init
sensor self.ltr559 = LTR559()
sensor File “/usr/local/lib/python3.5/site-packages/ltr559/init.py”, line 220, in init
sensor raise RuntimeError(“LTR559 not found”)
sensor RuntimeError: LTR559 not found
1 Like
Hey there,
Welcome to the forums!
Are you able to answer a couple of questions for me?
- Has this been working for you previously or is this the first time you’ve used this sensor?
- Are you on the latest version of master for the Balena sense project? Currently version v1.9.3
Thanks!
Lucy-Jane
Hi Lucy-Jane,
Thank you for the quick reply. I have had the sensor running once before.
I have had it running once at my desk and then once I moved it to the location in the house I wanted the sensor has been giving that error.
Sorry this is the first I have done any Balena projects. Where can I find the project version?
Hi @AdamE416
Is there anything else that changed apart from the physical location, for example connection type or power supply?
Within the folder you cloned from our Github repository (most likely it’s called balena-sense
), there should be a VERSION
file that will contain the version you’re running.
Thank you, and kind regards
Alida
Thank you! I have v1.9.3 currently.
Location did change I moved it from my desk in the basement of the house to the kitchen area upstairs. Still connected to the same wifi and everything. Power supply is the same as well.
Interestingly, it says that it can’t find the Sensor – “LTR559 not found”
Can you detach and then re-attach the HAT and Sensor, and try again? I wonder if it’s just not connected well.
Thanks!
It looks like your script is failing to initialize the LTR559 sensor, which is part of the Enviro+ HAT or a similar sensor module. Here’s a step-by-step guide to troubleshoot this issue:
- Check Sensor Connections: Ensure that all connections between the BME680 sensor and the Pi Zero W are secure. If you’re using a HAT or an add-on board, make sure it’s seated properly on the GPIO pins.
- Verify Sensor Detection:
- Run
i2cdetect -y 1
to see if the LTR559 sensor is detected on the I2C bus. Look for its address (usually 0x23
or 0x39
).
- If you don’t see the address, there might be a connection issue or the sensor might be faulty.
- Check for I2C Issues:
- Ensure that I2C is enabled on your Raspberry Pi. You can enable it using
raspi-config
or by checking /boot/config.txt
for the line dtparam=i2c_arm=on
.
- Update and Upgrade Software:
- Ensure that your system and libraries are up to date. Run:
sudo apt-get update
sudo apt-get upgrade
- Reinstall the required Python packages if necessary.
- Check for Library Issues:
- Make sure that the
ltr559
Python package is installed correctly. You can try reinstalling it:
pip install --upgrade ltr559
- Test Sensor Independently:
- If possible, test the LTR559 sensor with another script or another Raspberry Pi to rule out hardware issues.
- Review Power Supply:
- Sometimes, insufficient power supply can cause sensor issues. Make sure your power supply provides adequate power for all connected peripherals.
If after these steps the issue persists, the sensor might be defective, or there could be an issue with the HAT or board it’s mounted on.
1 Like