Skip to content
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Community Forum

  1. Home
  2. Categories
  3. Téléinfo
  4. Denky D4
  5. Compilation ESP Home pour avoir la TIC sur cet ESP

Compilation ESP Home pour avoir la TIC sur cet ESP

Scheduled Pinned Locked Moved Denky D4
9 Posts 3 Posters 5.6k Views 2 Watching
  • 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
    M Offline
    mikebzh44
    wrote on last edited by
    #1

    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
    • M mikebzh44

      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 Offline
      CharlesC Offline
      Charles
      wrote on last edited by
      #2

      @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
      • CharlesC Charles

        @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 Offline
        M Offline
        mikebzh44
        wrote on last edited by
        #3

        @Charles Merci, je vais tester ça ce WE

        M 1 Reply Last reply
        • M mikebzh44

          @Charles Merci, je vais tester ça ce WE

          M Offline
          M Offline
          mikebzh44
          wrote on last edited by
          #4

          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
          • M mikebzh44

            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 Offline
            M Offline
            mikebzh44
            wrote on last edited by
            #5

            @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
            • M mikebzh44

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

              ch_2iC Offline
              ch_2iC Offline
              ch_2i
              wrote on last edited by
              #6

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

              M 1 Reply Last reply
              • ch_2iC ch_2i

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

                M Offline
                M Offline
                mikebzh44
                wrote on last edited by
                #7

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

                CharlesC 1 Reply Last reply
                • M mikebzh44

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

                  CharlesC Offline
                  CharlesC Offline
                  Charles
                  wrote on last edited by
                  #8

                  @mikebzh44 C'est fait 🙂

                  M 1 Reply Last reply
                  • CharlesC Charles

                    @mikebzh44 C'est fait 🙂

                    M Offline
                    M Offline
                    mikebzh44
                    wrote on last edited by
                    #9

                    @Charles Top, merci !

                    1 Reply Last reply

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    2

                    Online

                    5.8k

                    Users

                    565

                    Topics

                    5.3k

                    Posts

                    Top Topics

                    Popular Tags

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

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Blog
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups