[SLOVED] Octoprint-Enclosure SI7021 sensor not working

Hi all,

i have a little problem with the SI7021 sensor, in the Enclosure plugin it don't work it display only 0 deg.
I have enabled the i2C interface and works great with other examples.
In the plugin I have set the address to 0x40 get from i2cdetect -y 1 the sensor type SI7021.

I have installed this sensor https://www.amazon.it/gp/product/B07XDQW8NN/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

Connections:
Rpi - Sensor
1 - VCC
3 - SDA
5 - SCL
9 - GND

Can anyone help me please?
Thanks

The script work well:

pi@octopi:~/oprint/lib/python3.7/site-packages/octoprint_enclosure $ sudo python3 SI7021.py
15.9 | 59.0

It read correctly the temp end hum.

Have you setup passwordless sudo? Or can your script run without sudo?

When you run a sudo command by default on OctoPi, it asks for the password, but the enclosure plugin can't provide this.

Thx for your reply,

no, when i do sudo in CLI it ask me the password

In the Enclosure Plugin you can activate sudo commands:

grafik

It's already checked

1 Like

This is the reason it doesn't work, you need to configure passwordless sudo, since enclosure can't send the password for you. You can do this using a sudoers file - I can't remember where this is, but the internet should be able to tell you or someone with access to an OctoPi install at the moment :slightly_smiling_face:

ok thanks i will try

Hi @Ewald_Ikemann and @Charlie_Powell,

Thanks a lot for your help! Now it WORKS perfectly!

Best regards
M

2 Likes