feature-requests
feature-requests copied to clipboard
Support for Sonoff MS01
Describe the problem you have/What new integration you would like Support for Sonoff MS01 moisture sensor
Please describe your use case for this integration and alternatives you've tried: Sonoff TH10/16 now has support for new sensor - MS01 https://sonoff.tech/product/accessories/ms01/ It is already supported in Tasmota https://github.com/arendst/Tasmota/pull/15335/files But not sure how to port it to esphome. Would be great to have support for MS01 is esphome too.
Additional context
I'm using the Tasmota software successfully but would appreciate support in ESP home as well.
Trying to add this through PR#3901 and I'm stuck. I'm getting output, but it doesn't match Tasmota. I'm getting small neg ative values (-3.1) instead of positive values. Other values seem to be close.
Hi @Zebble, I fixed negative values. Tasmota's computations can be negative also. But then we've got this:
if (humidity < 0) humidity = 0.1f;
so I've just added this to your code
if (*humidity < 0) *humidity = 0.1f;
and it works.
Hi, Can u send me your yaml, i have the entity but no data. Thx
Here is my fork https://github.com/emes30/esphome/tree/components-dht-ms01 Check it out. If you have entity then your yaml seems ok, check pins and connections.
Hi,
external_components:
- source: type: git url: https://github.com/emes30/esphome/ ref: components-dht-ms01 components: [dht]
switch:
- platform: gpio name: "THR316 Relay" pin: GPIO21 id: relay
- platform: gpio pin: GPIO27 id: sensor_power restore_mode: ALWAYS_ON
sensor:
- platform: dht pin: 25 model: MS01 humidity: name: "Soil Moisture" update_interval: 60s
Here is my yaml, i use ur fork, but i don't have data, just error
What error ? Can you paste your logs here ?
[10:57:17][C][dht:042]: DHT: [10:57:17][C][dht:043]: Pin: GPIO25 [10:57:17][C][dht:049]: Model: DHT22 (or equivalent) [10:57:17][C][dht:052]: Update Interval: 15.0s [10:57:17][C][dht:054]: Temperature 'esphome10 Temperature' [10:57:17][C][dht:054]: Device Class: 'temperature' [10:57:17][C][dht:054]: State Class: 'measurement' [10:57:17][C][dht:054]: Unit of Measurement: '°C' [10:57:17][C][dht:054]: Accuracy Decimals: 1 [10:57:17][C][dht:055]: Humidity 'esphome10 Soil Moisture' [10:57:17][C][dht:055]: Device Class: 'humidity' [10:57:17][C][dht:055]: State Class: 'measurement' [10:57:17][C][dht:055]: Unit of Measurement: '%' [10:57:17][C][dht:055]: Accuracy Decimals: 0
[10:57:27][W][dht:198]: Requesting data from DHT failed! [10:57:27][W][dht:085]: Invalid readings! Please check your wiring (pull-up resistor, pin number).
YAML: sensor:
- platform: dht model: MS01 pin: GPIO25 humidity: name: ${node_name} Soil Moisture temperature: name: ${node_name} Temperature update_interval: 15s