Rekuperator Thessla, problem z modbusem

Podłącze się pod temat, bo u mnie cała komunikacja z Teslą działała pięknie zrobiona według przykładu przez ponad rok. Po którejś aktualizacji HA przestało działać w ogóle. Zmieniłem konfigurację modbusa według nowych standardów i cały odczyt wrócił, ale mam problemy z zapisem z wysyłaniem wartości. I to nie tak, że w ogóle nie działa, tylko raz zadziała po minucie, drugi raz po pół godzinie a kolejny raz klikam n awieczór i dopiero rano widze efekt :rofl:
Nie wiem gdzie szukać.

Ja też nie wiem jak Ci pomóc z Modbusem bo o Twojej konfiguracji nic nie wiem.

Już spieszę z opisem. Łącze się przez RS485. Konfiguracja wygląda tak:

 - name: reku
    type: serial
    port: /dev/ttyUSB0
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: N
    stopbits: 1

    delay: 2
    message_wait_milliseconds: 500
    timeout: 5
 

Podam przykładowy odczyt, który działa

    sensors:
      - name: "Rekuperator Temperatura Czerpnia"
        slave: 10
        address: 16
        input_type: input
        scan_interval: 15
        data_type: int16
        unit_of_measurement: °C
        scale: 0.1
        precision: 1

I tutaj jeden przykładowy zapis:

   switches:
      - name: "Rekuperator Wietrzenie" 
        slave: 10
        address: 4224
        command_on: 7
        command_off: 0
        verify:

Warstwa graficzna jest niezmieniona z przykładu :

ui.yaml (14,2 KB)

Aaaa jeszcze może dodam, że jak stworzyłem przykładowy zapis w Node-Red to działa od razu więc to nie wina hardwaru lub kabelkologi.

Cześć,
od kilku dni mam probobrem z rekuperatorem z poziomu HA(działał sprawnie od dłuższego czasu), jak sprawdziłem, żadne dane nie są wysyłane/ładowane, wyłączyłem rekuperator by wszystko zrestartować i nadal nic. Spotkał się ktoś z czymś takim? Może wiecie, co mogę jeszcze sprawdzić?

Na obrazku brak jakiejkolwiek komunikacji.
Sprawdź więc tak samo jak testowałeś jeszcze przed podłączeniem do HA.

Może jakąś aktualizację ostatnio robiłeś z bardzo starej wersji?
Aby potwierdzić lub wykluczyć uszkodzenie sprzętu spróbuj się połączy z reku innym programem typu modbus master.

Dzięki za podpowiedź, nie znałem tego toola. Połączył się, ale są jakieś błedy.

15:44:37.000 ModbusRunner started
15:44:37.007 Tx DeviceAddr: 1 FC: 3 Start: 0 Length: 10
15:44:37.022 TX: 00 01 00 00 00 06 01 03 00 00 00 0A
15:44:38.034 Block with function 3 gives an IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond..
15:44:38.239 Tx DeviceAddr: 1 FC: 3 Start: 0 Length: 10
15:44:38.239 TX: 00 02 00 00 00 06 01 03 00 00 00 0A
15:44:39.259 Block with function 3 gives an IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond..

EDIT:
problem rozwiązany, z poziomu strony (others-reload/restart → restart), zrestartowałem i jak za dotknięciem boskiej ręki :wink: działa.

Cześć,
mam problem z ustawieniem przycisków manualnego ustawiania prędkości na karcie UI - nie mogę dojść do tego dlaczego pojawia mi się błąd: “Encja niedostępna: input_boolean.test”
Pomoże ktoś?

Jak ktoś ma Ci pomóc jak nie dołączyłeś yaml’a
?

Racja,
configuration.yaml

# REKUPERATOR MODBUS
 
modbus:
  - type: tcp
    host: 192.168.68.103
    port: 9999
    name: reku
    timeout: 5
    delay: 2
    sensors:
      - name: "Rekuperator Temperatura Czerpnia"
        slave: 10
        address: 16
        input_type: input
        scan_interval: 29
        data_type: int16
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
      - name: "Rekuperator Temperatura Nawiew"
        slave: 10
        address: 17
        input_type: input
        scan_interval: 29
        data_type: int16
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
      - name: "Rekuperator Temperatura Wywiew"
        slave: 10
        address: 18
        input_type: input
        scan_interval: 29
        data_type: int16
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
      - name: "Rekuperator Temperatura za FPX"
        slave: 10
        address: 19
        input_type: input
        scan_interval: 29
        data_type: int16
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
      - name: "Rekuperator Temperatura PCB"
        slave: 10
        address: 22
        input_type: input
        data_type: int16
        scan_interval: 59
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
      - name: "Rekuperator Strumień nawiew"
        slave: 10
        address: 256
        input_type: holding
        scan_interval: 2
        data_type: int16
        unit_of_measurement: m3/h
        scale: 1
        precision: 1
      - name: "Rekuperator Strumień wywiew"
        slave: 10
        address: 257
        input_type: holding
        scan_interval: 2
        data_type: int16
        unit_of_measurement: m3/h
        scale: 1
        precision: 1
      - name: "Rekuperator lato zima"
        scan_interval: 11
        data_type: int16
        slave: 10
        address: 4209
        input_type: holding
      - name: "Rekuperator Bypass"
        scan_interval: 11
        data_type: int16
        slave: 10
        address: 4320
        input_type: holding
      - name: "Rekuperator tryb pracy"
        scan_interval: 6
        data_type: int16
        slave: 10
        address: 4208
        input_type: holding
      - name: "Rekuperator speedmanual"
        scan_interval: 5
        data_type: int16
        unit_of_measurement: "%"
        slave: 10
        address: 4210
        input_type: holding
      - name: "Rekuperator fpx flaga"
        scan_interval: 29
        data_type: int16
        unit_of_measurement: ""
        slave: 10
        address: 4192
        input_type: holding
      - name: "Rekuperator FPX tryb"
        scan_interval: 29
        data_type: int16
        unit_of_measurement: ""
        slave: 10
        address: 4198
        input_type: holding
      - name: "Rekuperator Alarm"
        scan_interval: 63
        slave: 10
        data_type: int16
        address: 8192
        input_type: holding
        unit_of_measurement: ""
      - name: "Rekuperator Error"
        scan_interval: 63
        slave: 10
        address: 8193
        data_type: int16
        input_type: holding
        unit_of_measurement: ""
      - name: "Rekuperator FPX zabezpieczenie termiczne"
        scan_interval: 63
        slave: 10
        address: 8208
        data_type: int16
        input_type: holding
        unit_of_measurement: ""
      - name: "Rekuperator Awaria Wentylatora Nawiewu"
        scan_interval: 63
        slave: 10
        address: 8222
        data_type: int16
        input_type: holding
        unit_of_measurement: ""
      - name: "Rekuperator Awaria Wentylatora Wywiewu"
        scan_interval: 63
        slave: 10
        address: 8223
        data_type: int16
        input_type: holding
        unit_of_measurement: ""
      - name: "Rekuperator Awaria CF Nawiewu"
        scan_interval: 63
        slave: 10
        address: 8330
        data_type: int16
        input_type: holding
        unit_of_measurement: ""
      - name: "Rekuperator Awaria CF Wywiewu"
        scan_interval: 63
        slave: 10
        address: 8331
        data_type: int16
        input_type: holding
        unit_of_measurement: ""
      - name: "Rekuperator Wymiana Filtrów"
        scan_interval: 63
        slave: 10
        address: 8444
        data_type: int16
        input_type: holding
        unit_of_measurement: ""
    binary_sensors:
      - name: "Rekuperator Silownik bypassu"
        scan_interval: 21
        slave: 10
        address: 9
      - name: "Rekuperator Potwierdzenie pracy"
        scan_interval: 1
        slave: 10
        address: 11
    switches:
      - name: "Rekuperator Wietrzenie"
        scan_interval: 1
        slave: 10
        address: 4224
        command_on: 7
        command_off: 0
        verify:
      - name: "Rekuperator Pusty Dom"
        scan_interval: 5
        slave: 10
        address: 4224
        command_on: 11
        command_off: 0
        verify:
      - name: "Rekuperator bypass"
        scan_interval: 7
        slave: 10
        address: 4320
        command_on: 0
        command_off: 1
        verify:
      - name: "Rekuperator Kominek"
        scan_interval: 5
        slave: 10
        address: 4224
        command_on: 2
        command_off: 0
        verify:
      - name: "Rekuperator Okna"
        scan_interval: 5
        slave: 10
        address: 4224
        command_on: 10
        command_off: 0
        verify:
      - name: "Rekuperator ON/OFF"
        scan_interval: 5
        slave: 10
        address: 4387
        command_on: 1
        command_off: 0
        verify:
      - name: "Rekuperator mode"
        scan_interval: 1
        slave: 10
        address: 4208
        command_on: 0
        command_off: 1
        verify:
      - name: "Rekuperator zima"
        scan_interval: 7
        slave: 10
        address: 4209
        command_on: 1
        command_off: 0
        verify:

utility_meter:
  rekuperator_odzysk_energii_godzina:
    source: sensor.rekuperator_odzyskana_energia
    cycle: hourly
  rekuperator_odzysk_energii_dzien:
    source: sensor.rekuperator_odzyskana_energia
    cycle: daily
  rekuperator_odzysk_energii_miesiac:
    source: sensor.rekuperator_odzyskana_energia
    cycle: monthly
  rekuperator_odzysk_energii_rok:
    source: sensor.rekuperator_odzyskana_energia
    cycle: yearly
 
template:
  sensor:
    - name: "Rekuperator Sprawność"
      unique_id: "sensor.rekuperator_sprawnosc"
      icon: "mdi:percent"
      unit_of_measurement: "%"
      state: >-
        {% if is_state('binary_sensor.rekuperator_silownik_bypassu', 'off') %}
          {% set t1 = states('sensor.rekuperator_temperatura_czerpnia') | float %}
          {% set t2 = states('sensor.rekuperator_temperatura_nawiew') | float %}
          {% set t3 = states('sensor.rekuperator_temperatura_wywiew') | float %}
          {{ (((t2 - t1) / (t3 - t1)) * 100|float) | round(2, default=0) }}
        {% else %}
          0
        {% endif %}
    - name: "Rekuperator Wysterowanie Nawiew"
      unique_id: "sensor.rekuperator_wysterowanie_nawiew"
      icon: "mdi:percent"
      unit_of_measurement: "%"
      state: >
        {% set flowN = states('sensor.rekuperator_strumien_nawiew') | float %}
        {{ ((flowN * 100) / 490 |float) | round(2, default=0) }}
    - name: "Rekuperator Wysterowanie wywiew"
      unique_id: "sensor.rekuperator_wysterowanie_wywiew"
      icon: "mdi:percent"
      unit_of_measurement: "%"
      state: >
        {% set flowW = states('sensor.rekuperator_strumien_wywiew') | float %}
        {{ ((flowW * 100) / 490|float) | round(2, default=0) }}
    - name: "Rekuperator Odzyskana Moc"
      unique_id: "sensor.rekuperator_odzyskana_moc"
      icon: "mdi:counter"
      unit_of_measurement: "W"
      state: >-
        {% if is_state('binary_sensor.rekuperator_silownik_bypassu', 'off') %}
          {% set strumienN = states('sensor.rekuperator_strumien_nawiew') | float %}
          {% set tcz = states('sensor.rekuperator_temperatura_czerpnia') | float %}
          {% set tn = states('sensor.rekuperator_temperatura_nawiew') | float %}
          {% if states('sensor.rekuperator_temperatura_czerpnia')|float < states('sensor.rekuperator_strumien_nawiew')|float %}
              {{ ((((tn - tcz) * strumienN * 1200) / 3600)|float) | round(2, default=0) }}
          {% else %}
              {{ (((((tn - tcz) * strumienN * 1200) / 3600) * -1)|float) | round(2, default=0) }}
          {% endif %}
        {% else %}
          0
        {% endif %}
sensor:
  - platform: integration
    source: sensor.rekuperator_odzyskana_moc
    name: rekuperator_odzyskana_energia
    unit_prefix: k
    round: 3

kod karty:

title: Home
cards:
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.rekuperator_on_off
        name: Praca
        show_state: true
        icon: mdi:air-filter
        show_name: true
        show_icon: true
      - type: button
        tap_action:
          action: more-info
        entity: binary_sensor.rekuperator_silownik_bypassu
        name: Bypass
        show_state: true
        icon: mdi:arrow-decision
      - type: conditional
        conditions:
          - entity: switch.rekuperator_zima
            state: "on"
        card:
          type: button
          tap_action:
            action: toggle
          entity: switch.rekuperator_zima
          name: Zima
          icon: mdi:snowflake
      - type: conditional
        conditions:
          - entity: switch.rekuperator_zima
            state: "off"
        card:
          type: button
          tap_action:
            action: toggle
          entity: switch.rekuperator_zima
          name: Lato
          icon: mdi:sun-snowflake
      - type: button
        tap_action:
          action: toggle
        entity: switch.rekuperator_mode
        name: Auto
        show_state: true
        icon: mdi:home-floor-a
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 10
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 10%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 20
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 20%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 30
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 30%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 40
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 40%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 50
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 50%
  - type: picture-elements
    elements:
      - type: state-label
        entity: sensor.rekuperator_temperatura_czerpnia
        style:
          top: 27%
          left: 7%
          color: black
      - type: state-label
        entity: sensor.rekuperator_temperatura_za_fpx
        style:
          top: 14%
          left: 19%
      - type: state-label
        entity: sensor.rekuperator_temperatura_nawiew
        style:
          top: 54%
          left: 94%
          color: black
      - type: state-label
        entity: sensor.rekuperator_strumien_nawiew
        style:
          top: 72%
          left: 93%
      - type: state-label
        entity: sensor.rekuperator_wysterowanie_nawiew
        style:
          top: 65%
          left: 94%
      - type: state-label
        entity: sensor.rekuperator_temperatura_wywiew
        style:
          top: 27%
          left: 94%
          color: black
      - type: state-label
        entity: sensor.rekuperator_strumien_wywiew
        style:
          top: 10%
          left: 92%
      - type: state-label
        entity: sensor.rekuperator_wysterowanie_wywiew
        style:
          top: 18%
          left: 94%
      - type: state-label
        entity: sensor.rekuperator_sprawnosc
        style:
          top: 80%
          left: 50%
      - type: state-label
        entity: sensor.rekuperator_temperatura_pcb
        style:
          top: 72%
          left: 35%
      - type: state-label
        entity: sensor.rekuperator_odzyskana_moc
        style:
          top: 90%
          left: 50%
      - type: state-label
        entity: sensor.rekuperator_speedmanual
        style:
          top: 85%
          left: 12%
          border: 1px solid white
          border-radius: 5%
      - type: image
        entity: binary_sensor.rekuperator_silownik_bypassu
        state_image:
          "on": /local/reku_bypass3.png
          "off": /local/reku_empty.png
        style:
          top: 41%
          left: 51%
          width: 25%
      - type: image
        entity: sensor.rekuperator_fpx_flaga
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_fpx.png
        style:
          top: 8%
          left: 52.5%
          width: 10%
      - type: image
        entity: sensor.rekuperator_fpx_tryb
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_1.png
          "2": /local/reku_2.png
        style:
          top: 8%
          left: 60%
          width: 3.5%
      - type: image
        entity: sensor.rekuperator_alarm
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
      - type: image
        entity: sensor.rekuperator_error
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
      - type: image
        entity: sensor.rekuperator_awaria_cf_nawiewu
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
      - type: image
        entity: sensor.rekuperator_awaria_cf_wywiewu
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
      - type: image
        entity: sensor.rekuperator_awaria_wentylatora_nawiewu
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
      - type: image
        entity: sensor.rekuperator_awaria_wentylatora_wywiewu
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
      - type: image
        entity: sensor.rekuperator_fpx_zabezpieczenie_termiczne
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
      - type: image
        entity: sensor.rekuperator_wymiana_filtrow
        state_image:
          "0": /local/reku_empty.png
          "1": /local/reku_alarm.png
        style:
          top: 8%
          left: 20%
          width: 15%
    image: /local/reku_nobypass3.png
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 60
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 60%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 70
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 70%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 80
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 80%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 90
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 90%
      - type: button
        tap_action:
          action: call-service
          service: modbus.write_register
          service_data:
            address: 4210
            unit: 10
            value: 100
            hub: reku
        target: {}
        entity: input_boolean.test
        show_icon: false
        name: 100%
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.rekuperator_pusty_dom
        name: Pusty dom
        icon: mdi:home-account
        show_state: true
      - type: button
        tap_action:
          action: toggle
        entity: switch.rekuperator_wietrzenie
        name: Wietrzenie
        show_state: true
        icon: mdi:fan
      - type: button
        tap_action:
          action: toggle
        entity: switch.rekuperator_okna
        name: Otwarte okna
        show_state: true
        icon: mdi:window-open-variant
      - type: button
        tap_action:
          action: toggle
        entity: switch.rekuperator_kominek
        name: Kominek
        show_state: true
        icon: mdi:fireplace

Trzeba taką encje (input_boolean.test) utworzyć w Urządzenia oraz usługi Pomocnicy

8 postów zostało podzielonych na nowy temat: Problemy z ręcznym utworzeniem karty