Community Forum
    • Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Compilation ESP Home pour avoir la TIC sur cet ESP

    Scheduled Pinned Locked Moved Denky D4
    9 Posts 3 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mikebzh44
      last edited by

      Bonjour.

      Je viens de recevoir ma carte Denky D4 et je n'arrive pas à compiler un fichier YAML pour Home Assistant

      J'ai cette erreur :

      INFO ESPHome 2024.6.6
      INFO Reading configuration /config/esphome/esphome-web-f5bfa8.yaml...
      Failed config
      
      uart: [source /config/esphome/esphome-web-f5bfa8.yaml:77]
        - id: uart_bus
          
          This pin cannot be used on ESP32s and is already used by the flash interface (function: Flash Data 1).
          rx_pin: GPIO8
          baud_rate: 1200
          parity: EVEN
          data_bits: 7
      

      Et voici mon code YAML :

      substitutions:
        name: esp-tic-feyree
        friendly_name: esp-tic-feyree
        device_description: Infos TIC Recharge VE
      
      esphome:
        name: ${name}
        friendly_name: ${friendly_name}
        comment: ${device_description}
        min_version: 2024.6.0
        name_add_mac_suffix: false
        project:
          name: esphome.web
          version: '1.0'
      
      esp32:
      #  board: adafruit_qtpy_esp32
        board: denky_d4
        framework:
          type: esp-idf
      
      # Enable logging
      logger:
      
      # Enable Home Assistant API
      api:
      
      # Allow Over-The-Air updates
      ota:
      - platform: esphome
      
      # Allow provisioning Wi-Fi via serial
      improv_serial:
      
      wifi:
        # Set up a wifi access point
        ap: {}
      
      # In combination with the `ap` this allows the user
      # to provision wifi credentials to the device via WiFi AP.
      captive_portal:
      
      dashboard_import:
        package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
        import_full_config: true
      
      # Sets up Bluetooth LE (Only on ESP32) to allow the user
      # to provision wifi credentials to the device.
      esp32_improv:
        authorizer: none
      
      # To have a "next url" for improv serial
      web_server:
        local: true
        port: 80
      #  auth:
      #    username: !secret esphome_web_server_username
      #    password: !secret esphome_web_server_password
      
      # Time: https://esphome.io/components/time.html
      time:
        - platform: homeassistant
          timezone: "Europe/Paris"
          id: homeassistant_time
      
      # Status Binary Sensor: https://esphome.io/components/binary_sensor/status.html
      binary_sensor:
        - platform: status
          name: "Sagem Status"
      
      # Restart Button: https://esphome.io/components/button/restart.html
      button:
        - platform: restart
          name: "Sagem Restart"
      
      # https://esphome.io/custom/uart.html
      uart:
        id: uart_bus
        rx_pin: GPIO8 # Pin Rx2
        baud_rate: 1200
        parity: EVEN
        data_bits: 7
        #rx_buffer_size: 512
        
      # https://esphome.io/components/sensor/teleinfo.html
      teleinfo:
          update_interval: 60s
          historical_mode: true
      
      # https://esphome.io/components/sensor/index.html
      sensor:
        # WiFi
        - platform: wifi_signal
          name: "WiFi Signal Sensor"
          update_interval: 60s
          unit_of_measurement: dB
          accuracy_decimals: 0
          force_update: false
          icon: mdi:wifi
        # Uptime
        - platform: uptime
          id: uptime_seconds
          name: "Uptime Sensor"
          update_interval: 60s
          unit_of_measurement: s
          accuracy_decimals: 0
          force_update: false
          icon: mdi:clock-start
        # Production
        - platform: teleinfo
          tag_name: "BASE"
          name: "Recharge VE"
          unit_of_measurement: kWh
          device_class: energy
          state_class: total_increasing
          icon: mdi:flash
          accuracy_decimals: 2
          filters:
            - multiply: 0.001
            - filter_out: 0
      
      text_sensor:
        - platform: template
          name: Uptime
          update_interval: 60s
          icon: mdi:clock-start
          lambda: |-
            int seconds = (id(uptime_seconds).state);
            int days = seconds / (24 * 3600);
            seconds = seconds % (24 * 3600);
            int hours = seconds / 3600;
            seconds = seconds % 3600;
            int minutes = seconds /  60;
            seconds = seconds % 60;
            if ( days ) {
              return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
            } else if ( hours ) {
              return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
            } else if ( minutes ) {
              return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
            } else {
              return { (String(seconds) +"s").c_str() };
            }
      

      Quand j'ai initialisé la carte avec ESPHome, elle était vu comme :

      esp32:
        board: esp32dev
        framework:
          type: arduino
      

      Mais même avec cette définition, la compilation donne la même erreur.

      CharlesC 1 Reply Last reply Reply Quote
      • CharlesC Offline
        Charles @mikebzh44
        last edited by

        @mikebzh44

        La solution doit se trouver dans ce post https://github.com/esphome/issues/issues/5932 (no testé de mon coté) mais ça devrait fonctionner

        
        esphome:
          name: linky
          friendly_name: Linky
        
        esp32:
          board: denky_d4
          framework:
            type: esp-idf
        
        uart:
          rx_pin: GPIO8
          ignore_pin_validation_error: true
          baud_rate: 9600
          parity: EVEN
          data_bits: 7
          stop_bits: 1
        
        
        M 1 Reply Last reply Reply Quote
        • M Offline
          mikebzh44 @Charles
          last edited by

          @Charles Merci, je vais tester ça ce WE

          M 1 Reply Last reply Reply Quote
          • M Offline
            mikebzh44 @mikebzh44
            last edited by

            Je confirme, ça marche nickel !!

            Mon YAML au complet :

            substitutions:
              devicename: esp-tic-feyree
              friendly_name: esp-tic-feyree
              device_description: Infos TIC chargeur VE
            
            esphome:
              name: $devicename
              friendly_name: $friendly_name
              comment: ${device_description}
              min_version: 2024.6.0
              name_add_mac_suffix: false
              project:
                name: esphome.web
                version: '1.0'
            
            esp32:
              board: denky_d4
              framework:
                type: arduino
              
            # Enable logging
            logger:
              baud_rate: 0
              level: INFO 
              #esp8266_store_log_strings_in_flash: False
            
            # Enable Home Assistant API
            api:
            
            ota:
              platform: esphome
              password: "472f4e3996e22b5cc959fefe4f46d54e"
            
            wifi:
              #ssid: !secret wifi_ssid
              #password: !secret wifi_password
              # Enable fallback hotspot (captive portal) in case wifi connection fails
              ap: {}
            
            # Web Server: https://esphome.io/components/web_server.html
            web_server:
              local: true
              port: 80
            #  auth:
            #    username: !secret esphome_web_server_username
            #    password: !secret esphome_web_server_password
            
            # Time: https://esphome.io/components/time.html
            time:
              - platform: homeassistant
                timezone: "Europe/Paris"
                id: homeassistant_time
            
            captive_portal:
            
            # Status Binary Sensor: https://esphome.io/components/binary_sensor/status.html
            binary_sensor:
              - platform: status
                name: "Sagem EV Status"
            
            # Restart Button: https://esphome.io/components/button/restart.html
            button:
              - platform: restart
                name: "Sagem EV Restart"
            
            # https://esphome.io/custom/uart.html
            uart:
              rx_pin:
                number: GPIO8 # Pin Rx2
                ignore_pin_validation_error: true
              baud_rate: 1200
              parity: EVEN
              data_bits: 7
              #rx_buffer_size: 512
              
            # https://esphome.io/components/sensor/teleinfo.html
            teleinfo:
                update_interval: 60s
                historical_mode: true
            
            # https://esphome.io/components/sensor/index.html
            sensor:
              # WiFi
              - platform: wifi_signal
                name: "WiFi Signal Sensor"
                update_interval: 60s
                unit_of_measurement: dB
                accuracy_decimals: 0
                force_update: false
                icon: mdi:wifi
              # Uptime
              - platform: uptime
                id: uptime_seconds
                name: "Uptime Sensor"
                update_interval: 60s
                unit_of_measurement: s
                accuracy_decimals: 0
                force_update: false
                icon: mdi:clock-start
              # Production
              - platform: teleinfo
                tag_name: "BASE"
                name: "Recharge VE"
                unit_of_measurement: kWh
                device_class: energy
                state_class: total_increasing
                icon: mdi:flash
                accuracy_decimals: 2
                filters:
                  - multiply: 0.001
                  - filter_out: 0
            
            text_sensor:
              - platform: template
                name: Uptime
                update_interval: 60s
                icon: mdi:clock-start
                lambda: |-
                  int seconds = (id(uptime_seconds).state);
                  int days = seconds / (24 * 3600);
                  seconds = seconds % (24 * 3600);
                  int hours = seconds / 3600;
                  seconds = seconds % 3600;
                  int minutes = seconds /  60;
                  seconds = seconds % 60;
                  if ( days ) {
                    return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
                  } else if ( hours ) {
                    return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
                  } else if ( minutes ) {
                    return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
                  } else {
                    return { (String(seconds) +"s").c_str() };
                  }
            
            M 1 Reply Last reply Reply Quote
            • M Offline
              mikebzh44 @mikebzh44
              last edited by

              @Charles Du coup, je garde la carte et je trouverai bien une utilité pour le PiTInfo que j'ai commandé 😉

              ch_2iC 1 Reply Last reply Reply Quote
              • ch_2iC Offline
                ch_2i @mikebzh44
                last edited by

                @mikebzh44 je peux annuler ta commande du Pitinfo si tu veux ?

                M 1 Reply Last reply Reply Quote
                • M Offline
                  mikebzh44 @ch_2i
                  last edited by

                  @ch_2i Si tu peux le faire, je veux bien, merci.

                  CharlesC 1 Reply Last reply Reply Quote
                  • CharlesC Offline
                    Charles @mikebzh44
                    last edited by

                    @mikebzh44 C'est fait 🙂

                    M 1 Reply Last reply Reply Quote
                    • M Offline
                      mikebzh44 @Charles
                      last edited by

                      @Charles Top, merci !

                      1 Reply Last reply Reply Quote
                      • First post
                        Last post

                      5

                      Online

                      5.7k

                      Users

                      534

                      Topics

                      5.0k

                      Posts

                      Top Topics

                      • Bonjour Nicolas
                        Nicolas BernaertsN
                        Nicolas Bernaerts
                        0
                        19
                        312

                      • Denky 4 - Domoticz - Triphasé -
                        Nicolas BernaertsN
                        Nicolas Bernaerts
                        0
                        7
                        69

                      • Denky D4 et Linky Standard TInfo Rx Non Configuré
                        CharlesC
                        Charles
                        0
                        5
                        136

                      • CC1101 mini shield pour raspberry
                        CharlesC
                        Charles
                        0
                        5
                        151

                      • CC1101
                        CharlesC
                        Charles
                        0
                        2
                        66

                      Popular Tags

                      teleinfo
                      24 topics
                      arduino
                      19 topics
                      remora
                      16 topics
                      esp8266
                      10 topics
                      arduipi
                      10 topics
                      wifinfo
                      7 topics
                      raspberry
                      7 topics
                      broadcast
                      7 topics
                      Copyright © 2022 Charles-Henri Hallard | Return to blog page | Powered by NodeBB