Wind Direction Integration with Wemos D1 Mini and Tasmota

I wanted to share my recent project integrating a wind direction sensor using a Wemos D1 Mini and Tasmota firmware with OpenHAB. After some experimentation, I managed to create a functional setup that automatically adjusts my blinds based on wind conditions. Here’s how I did it:

  1. Hardware Setup: I connected my Sparkfun Weather Meter to the Wemos D1 Mini using a 10K resistor for voltage regulation. The setup was straightforward, with the analog pin connected to A0 and the other pin grounded.

  2. Firmware Configuration: I flashed the device with Tasmota firmware, which provided the necessary MQTT integration. The sensors.bin file was crucial for enabling analog input readings.

  3. OpenHAB Integration: I created two items—one for the raw sensor data and another for the wind direction in letters. Using a scale transformation, I mapped the analog values to compass directions. Here’s the scale configuration I used:

[0…135]=E
[135…227]=SE
[227…360]=S
[360…521]=NE
[521…672]=SW
[672…792]=N
[792…865]=NW
[865…1020]=W

This setup allows me to automate my blinds based on wind direction, ensuring optimal light and privacy. I’d love to hear if anyone has similar projects or suggestions for improvement!

Happy tinkering! :rocket: