diff --git a/config/seeed-studio.yaml b/config/seeed-studio.yaml index e61789a..4871f47 100644 --- a/config/seeed-studio.yaml +++ b/config/seeed-studio.yaml @@ -1,9 +1,6 @@ esphome: name: seeed-studio friendly_name: seeed studio - on_boot: - then: - - output.turn_on: DE_RE esp32: board: esp32-s3-devkitc-1 @@ -12,6 +9,7 @@ esp32: # Enable logging logger: + level: DEBUG # Enable Home Assistant API api: @@ -26,26 +24,18 @@ wifi: ssid: !secret wifi_ssid password: !secret wifi_password -output: - - platform: gpio - pin: GPIO21 # Led de la carte - id: led_output - - platform: gpio - pin: GPIO3 # le pin connecté à DE/RE - id: DE_RE - uart: id: mod_bus_id tx_pin: GPIO44 # Il faut les inverser !!!! rx_pin: GPIO43 baud_rate: 4800 - debug: - direction: BOTH - dummy_receiver: false - after: - delimiter: "\n" - sequence: - - lambda: UARTDebug::log_string(direction, bytes); + # debug: + # direction: BOTH + # dummy_receiver: false + # after: + # delimiter: "\n" + # sequence: + # - lambda: UARTDebug::log_string(direction, bytes); modbus: id: modbus1 @@ -70,36 +60,36 @@ sensor: id: sensor1 modbus_controller_id: modbus_controller1 name: "Wind speed" - device_class: wind_speed - register_type: holding + register_type: read address: 0 - unit_of_measurement: "m/s" value_type: U_WORD - accuracy_decimals: 1 + accuracy_decimals: 0 filters: - - multiply: 0.1 - max: window_size: 1 send_every: 1 - min: window_size: 1 send_every: 1 - # - exponential_moving_average: - # alpha: 0.1 - # send_every: 12 on_value: then: - mqtt.publish: topic: "rbo2" - payload: !lambda 'return "Vent --> " + to_string(x);' + payload: !lambda 'return "Vent (x 10 en m/s) --> " + to_string(x);' - platform: modbus_controller modbus_controller_id: modbus_controller2 name: "Wind direction gear" - internal: true register_type: read address: 0 value_type: U_WORD accuracy_decimals: 0 + filters: + - max: + window_size: 1 + send_every: 1 + - min: + window_size: 1 + send_every: 1 on_value: then: - mqtt.publish: @@ -109,7 +99,7 @@ sensor: mqtt: broker: "pc-raymond.home" id: mqtt1 - log_topic: rbo + log_topic: null birth_message: - topic: rbo2 - payload: 'Nouvelle connexion...' \ No newline at end of file + topic: rbo + payload: 'Nouvelle connexion MQTT...' \ No newline at end of file