Description
When using the WSEN-HIDS driver in one-shot mode, performing a power_off() / power_on() cycle between measurements leads to a timeout on the next read_one_shot() call.
The first measurement after initialization works correctly, but subsequent measurements after a power cycle fail with a WSENHIDSTimeoutError.
This suggests that power_on() does not fully restore the internal state of the sensor after power_off(). The driver initialization (init) configures the sensor (averaging, BDU, calibration), but this configuration is not reapplied after a power cycle.
As a result, the sensor appears to be powered on electrically but not fully operational for triggering a new one-shot measurement.
Steps to reproduce
while True:
sensor.power_on()
humidity, temperature = sensor.read_one_shot()
sensor.power_off()
Driver / Component
wsen-hids
Environment
power_on()
power_off()
read_one_shot()
sensor initialization (init)
Logs / Output
Local directory lib/wsen-hids is mounted at /remote
Humidity: 53.51 %RH
Temperature: 22.67 °C
Free RAM: 138864 bytes
Elapsed: 7 ms
Traceback (most recent call last):
File "<stdin>", line 19, in <module>
File "wsen_hids/device.py", line 364, in read_one_shot
WSENHIDSTimeoutError: One-shot measurement timeout
Description
When using the WSEN-HIDS driver in one-shot mode, performing a power_off() / power_on() cycle between measurements leads to a timeout on the next read_one_shot() call.
The first measurement after initialization works correctly, but subsequent measurements after a power cycle fail with a WSENHIDSTimeoutError.
This suggests that power_on() does not fully restore the internal state of the sensor after power_off(). The driver initialization (init) configures the sensor (averaging, BDU, calibration), but this configuration is not reapplied after a power cycle.
As a result, the sensor appears to be powered on electrically but not fully operational for triggering a new one-shot measurement.
Steps to reproduce
Driver / Component
wsen-hids
Environment
power_on()
power_off()
read_one_shot()
sensor initialization (init)
Logs / Output