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

Support for wind sensor (Eltako WS) #50

Closed
hanzoh opened this issue Jun 11, 2018 · 3 comments
Closed

Support for wind sensor (Eltako WS) #50

hanzoh opened this issue Jun 11, 2018 · 3 comments

Comments

@hanzoh
Copy link

hanzoh commented Jun 11, 2018

While trying to build a weather station with several sensors,
I found this one to be a worthy addition: https://www.amazon.de/Eltako-Windsensor-WS/dp/B0018LBFG8

There is also a ready .ino file in this repo: https://github.com/sbiermann/esp8266-anemometer/blob/master/esp8266-anemometer.ino

Would this be possible to add to esphomelib/esphomeyaml?

@OttoWinter
Copy link
Member

Already possible with the pulse counter sensor: https://esphomelib.com/esphomeyaml/components/sensor/pulse_counter.html (which will even be backported to the ESP8266 in 1.7.0)

The only thing that would need to be done is a conversion from the pulse count to the wind speed. In the code I see this formula that should work: wind = 1.761 / (1 + rps) + 3.013 * rps;. See the TEMT6000 example for inspiration.

A formula could for example be:

sensor:
  - platform: pulse_counter
    pin: GPIOx
    # ...
    filters:
      - lambda: >-
          return 1.761 / (1 + x) + 3.013 * x;

@hanzoh
Copy link
Author

hanzoh commented Jun 12, 2018

Cool, I currently only have ESP8266 boards, but I have ordered a ESP32 and will definitely try the pulse counter. Thanks!
The code I have linked to also uses a debounce value of 5ms, would you recommend that as well (via filters - debouncing)?

@OttoWinter
Copy link
Member

Yes, definitely. I myself am using a similar wind sensor and a single turn can create many hundred pulses without any filtering.

@esphome esphome locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants