Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. IOBroker mit ESPHome und MODBUS Wind Anemometer

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    IOBroker mit ESPHome und MODBUS Wind Anemometer

    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      leonundjulie last edited by leonundjulie

      Diesmal geht es um die Idee mit entsprechenden Sensoren alle möglichen Wetterdaten einzusammeln - unter anderem Windrichtung und Windgeschwindigkeiten.

      Ich nutze einen PI 4 auf dem ich iOBroker nutze mit diversen Adaptern und möchte in meinem Szenario Wind Speed & direction via ESPHome und Modus abgreifen.

      Eckdaten zu den Sensoren:

      • Wind speed transmitter (485type) SN-3000-FSJT-N01 https://robu.in/wp-content/uploads/2024/10/12-R183268-SN-3000-FSJT-N01-485-type.pdf

      • list itemWind Direction Transmitter (485type) SN-3000-FXJT-N01 https://robu.in/wp-content/uploads/2024/11/1-R183257-SN-3000-FXJT-N01.pdf

      Das folgende Bild ist nur zur Info:
      IMG_1626.jpeg

      Also habe ich den ESPHome Adapter in iOBroker integriert, mir eine nodemmcu v3 gekauft, die Windsensoren und mein erstes YAML aufgesetzt. Es wird alles ohne Fehler kompiliert und der ESPHome arbeitet grundsätzlich. Da ich aber keine Kommunikation mit meinen Wind-Devices hinbekomme bin ich jetzt auf der Fehlersuche.

      Das log des ESPHome zeigt folgendes und da irritieren mich die Warnungen - muss ich da was machen? Oder kann ich das ignorieren. Letztlich sehe ich an der flackernden LED des TTL-RS485, dass mein YAML arbeitet, etwas an den Konverter gesendet wird
      IMG_1625.jpeg

      Habe ich ein iOBroker unabhängiges Problem? Also ein Problem meiner ESPHome Umgebung? Im ESPHome-Forum habe ich kaum Feedback erhalten außer “*das Thema sollte auf Grund der Fehlermeldung eher in der iOBroker Welt besprochen werden”*italicised text

      Hat jemand eine Idee?

      W 1 Reply Last reply Reply Quote 0
      • W
        WolfgangFB @leonundjulie last edited by

        @leonundjulie
        Poste doch bitte mal die relevanten Teile des YAML

        L 1 Reply Last reply Reply Quote 0
        • L
          leonundjulie @WolfgangFB last edited by

          @wolfgangfb Copy der YAML:

          esphome:

          name: weather

          friendly_name: Weather

          esp8266:

          board: nodemcuv2

          # Enable logging

          logger:

          # Enable Home Assistant API

          api:

          encryption:

          key: "V8pXnULJ5OswQhdoEOT+by4DqN/1aoc5bwtUOOIVjv4="

          ota:

          • platform: esphome

          password: "413a8bdefb6108e1f06649a7ad415c13"

          wifi:

          ssid: !secret wifi_ssid

          password: !secret wifi_password

          # Enable fallback hotspot (captive portal) in case wifi connection fails

          ap:

          ssid: "Weather Fallback Hotspot"

          password: "zo88Vm8sO4Rv"

          captive_portal:

          web_server:

          uart:

          rx_pin: GPIO03

          tx_pin: GPIO01

          baud_rate: 4800

          parity: NONE

          stop_bits: 1

          modbus:

          id: modbus1

          modbus_controller:

          - id: wind_speed_meter

          address: 0x1

          modbus_id: modbus1

          setup_priority: -10

          command_throttle: 200ms

          update_interval: 30s #or whatever you need

          - id: wind_direction_meter

          address: 0x2

          modbus_id: modbus1

          setup_priority: -10

          command_throttle: 200ms

          update_interval: 30s #or whatever you need

          sensor:

          - platform: modbus_controller

          modbus_controller_id: wind_speed_meter

          name: "Wind Speed"

          device_class: wind_speed

          id: wind_speed

          register_type: holding

          address: 0x0000

          unit_of_measurement: "m/s"

          value_type: U_WORD

          accuracy_decimals: 1

          filters:

          - multiply: 0.1
          
          - max:
          

          window_size: 5

          send_every: 5

          - exponential_moving_average:
          

          alpha: 0.1

          send_every: 12

          - platform: modbus_controller

          modbus_controller_id: wind_direction_meter

          name: "Wind direction gear"

          internal: true

          register_type: holding

          address: 0x0000

          value_type: U_WORD

          accuracy_decimals: 0

          on_value:

            - lambda: |-
          
                switch (int(x)) {
          
                  case 0:
          
                    id(wind_direction_cardinal).publish_state("N");  //North
          
                    break;
          
                  case 1:
          
                    id(wind_direction_cardinal).publish_state("NE"); //North-East
          
                    break;
          
                  case 2:
          
                    id(wind_direction_cardinal).publish_state("E");  //East
          
                    break;
          
                  case 3:
          
                    id(wind_direction_cardinal).publish_state("SE"); //South-East
          
                    break;
          
                  case 4:
          
                    id(wind_direction_cardinal).publish_state("S");  //South
          
                    break;
          
                  case 5:
          
                    id(wind_direction_cardinal).publish_state("SW"); //South-West
          
                    break;
          
                  case 6:
          
                    id(wind_direction_cardinal).publish_state("W");  //West
          
                    break;
          
                  case 7:
          
                    id(wind_direction_cardinal).publish_state("NW"); //North-West
          
                    break;
          
                  default:
          
                    id(wind_direction_cardinal).publish_state("");   //invalid
          
                }
          

          - platform: modbus_controller

          modbus_controller_id: wind_direction_meter

          name: "Wind direction degree"

          icon: mdi:compass-rose

          register_type: read

          address: 0x0001

          value_type: U_WORD

          accuracy_decimals: 0

          state_class: measurement

          unit_of_measurement: "°"

          text_sensor:

          • platform: template

          name: "Wind direction cardinal"

          id: wind_direction_cardinal

          icon: mdi:compass-rose

          Homoran 1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @leonundjulie last edited by

            @leonundjulie bitte in code-tags setzen, nicht als Zitat!

            L 1 Reply Last reply Reply Quote 0
            • L
              leonundjulie @Homoran last edited by

              @homoran

              
              esphome:
                name: weather
                friendly_name: Weather
              
              esp8266:
                board: nodemcuv2
              
              # Enable logging
              logger:
              
              # Enable Home Assistant API
              api:
                encryption:
                  key: "V8pXnULJ5OswQhdoEOT+by4DqN/1aoc5bwtUOOIVjv4="
              
              ota:
                - platform: esphome
                  password: "413a8bdefb6108e1f06649a7ad415c13"
              
              wifi:
                ssid: !secret wifi_ssid
                password: !secret wifi_password
              
                # Enable fallback hotspot (captive portal) in case wifi connection fails
                ap:
                  ssid: "Weather Fallback Hotspot"
                  password: "zo88Vm8sO4Rv"
              
              captive_portal:
              
              web_server:
              
              uart:
                rx_pin: GPIO3
                tx_pin: GPIO1
                baud_rate: 4800
                parity: NONE
                stop_bits: 1
                data_bits: 8
              
              modbus:
                id: modbus1
              
              modbus_controller:
              - id: wind_speed_meter
                address: 0x01
                modbus_id: modbus1
                setup_priority: -10
                command_throttle: 200ms
                update_interval: 30s #or whatever you need
              
              - id: wind_direction_meter
                address: 0x02
                modbus_id: modbus1
                setup_priority: -10
                command_throttle: 200ms
                update_interval: 30s #or whatever you need
              
              sensor:
              - platform: modbus_controller
                modbus_controller_id: wind_speed_meter
                name: "Wind Speed"
                device_class: wind_speed
                id: wind_speed
                register_type: read
                address: 0x0000
                unit_of_measurement: "m/s"
                value_type: U_WORD
                accuracy_decimals: 1
                filters:
                  - multiply: 0.1
                  - max:
                      window_size: 5
                      send_every: 5
                  - exponential_moving_average:
                      alpha: 0.1
                      send_every: 12
              
              - platform: modbus_controller
                modbus_controller_id: wind_direction_meter
                name: "Wind direction gear"
                internal: true
                register_type: read
                address: 0x0000
                value_type: U_WORD
                accuracy_decimals: 0
                on_value:
                    - lambda: |-
                        switch (int(x)) {
                          case 0:
                            id(wind_direction_cardinal).publish_state("N");  //North
                            break;
                          case 1:
                            id(wind_direction_cardinal).publish_state("NE"); //North-East
                            break;
                          case 2:
                            id(wind_direction_cardinal).publish_state("E");  //East
                            break;
                          case 3:
                            id(wind_direction_cardinal).publish_state("SE"); //South-East
                            break;
                          case 4:
                            id(wind_direction_cardinal).publish_state("S");  //South
                            break;
                          case 5:
                            id(wind_direction_cardinal).publish_state("SW"); //South-West
                            break;
                          case 6:
                            id(wind_direction_cardinal).publish_state("W");  //West
                            break;
                          case 7:
                            id(wind_direction_cardinal).publish_state("NW"); //North-West
                            break;
                          default:
                            id(wind_direction_cardinal).publish_state("");   //invalid
                        }
              
              - platform: modbus_controller
                modbus_controller_id: wind_direction_meter
                name: "Wind direction degree"
                icon: mdi:compass-rose
                register_type: read
                address: 0x0001
                value_type: U_WORD
                accuracy_decimals: 0
                state_class: measurement
                unit_of_measurement: "°"
              
              text_sensor:
                - platform: template
                  name: "Wind direction cardinal"
                  id: wind_direction_cardinal
                  icon: mdi:compass-rose
              
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Support us

              ioBroker
              Community Adapters
              Donate
              FAQ Cloud / IOT
              HowTo: Node.js-Update
              HowTo: Backup/Restore
              Downloads
              BLOG

              909
              Online

              32.1k
              Users

              80.7k
              Topics

              1.3m
              Posts

              3
              5
              83
              Loading More Posts
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes
              Reply
              • Reply as topic
              Log in to reply
              Community
              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
              The ioBroker Community 2014-2023
              logo