Spiacenti, il tuo browser non supporta JavaScript!
Accedi

Fai un semplice esperimento in Home Assistant

Aggiornato il 12 gennaio 2025: IAMMETER è in continua evoluzione e offre più modi per integrarsi con Home Assistant. Il metodo più semplice è attraverso l'MQTT discovery in Home Assistant. Per i dettagli, consulta l'articolo: Enable MQTT Discovery in Home Assistant with the Latest IAMMETER Firmware (i.76.058.8).

Inoltre, consulta questo articolo per un confronto delle opzioni di integrazione: Five Options to Integrate IAMMETER's Energy Meter into Home Assistant (Core Integration, HACS, MQTT, Modbus/TCP, MQTT Discovery).


Controlla i relè Sonoff in tempo reale in base al valore di potenza del contatore energetico

Abstract: questo esperimento illustra come richiedere il valore di potenza del contatore energetico Wi-Fi (IAMMETER) dal sensore modbus tcp (Home Assistant) a 1 campione/secondo e utilizzare questa lettura come valore di feedback per controllare il relè SONOFF in tempo reale.

Richiedi i dati del contatore energetico in Home Assistant (Modbus/TCP) a 1 campione/secondo e attiva il Sonoff in tempo reale.

welcome to discuss this topic here

The video tutorial of this document

The basic wiring,include wifi energy meter(sensor), sonoff smart socket(Actuator),load,

Home Assistant`s Dashboard effect of this experiment

Impostazione di Home Assistant

  1. Configura il contatore energetico IAMMETER in Home Assistant

    Contatore energetico monofase WEM3080: [modbusTCP in Home Assistant](https://github.com/lewei50/Solar-PV-Monitoring/blob/master/Yaml in Home Assistant/ModbusTCP/modbus1.yaml)

    Contatore energetico trifase WEM3080T: [modbusTCP in Home Assistant](https://github.com/lewei50/Solar-PV-Monitoring/blob/master/Yaml in Home Assistant/ModbusTCP/modbus.yaml)

    Per utilizzare questo sensore nella tua installazione, aggiungi quanto segue al tuo file configuration.yaml (ad esempio per WEM3080):

    Ricorda di aggiungere 'scan_interval: 1' dopo ' name: Modbus_Power' per fare in modo che Home Assistant aggiorni la lettura della potenza ogni secondo.

    # Example configuration.yaml entry for multiple TCP connections
    modbus:
      - name: hub11
        type: tcp
        host: 192.168.1.6
        port: 502
        sensors:
          - name: Modbus_Voltage
            slave: 1
            address: 0
            input_type: holding
            unit_of_measurement: V
            device_class: voltage
            state_class: measurement
            count: 1
            scale: 0.01
            offset: 0
            precision: 1
            data_type: uint16
          - name: Modbus_Current
            slave: 1
            address: 1
            input_type: holding
            unit_of_measurement: A
            device_class: current
            state_class: measurement
            count: 1
            scale: 0.01
            offset: 0
            precision: 1
            data_type: uint16
          - name: Modbus_Power
            slave: 1
            address: 2
            input_type: holding
            unit_of_measurement: W
            device_class: power
            state_class: measurement
            count: 2
            scale: 1
            offset: 0
            precision: 0
            data_type: int32
            scan_interval: 1
          - name: Modbus_ImportEnergy
            slave: 1
            address: 4
            input_type: holding
            unit_of_measurement: kWh
            device_class: energy
            state_class: total_increasing
            count: 2
            scale: 0.0003125
            offset: 0
            precision: 3
            data_type: uint32
          - name: Modbus_ExportGrid
            slave: 1
            address: 6
            input_type: holding
            unit_of_measurement: kWh
            device_class: energy
            state_class: total_increasing
            count: 2
            scale: 0.0003125
            offset: 0
            precision: 3
            data_type: uint32
    

    Configuration.Yaml in Home Assistant

    add a Sonoff relay in Home Assistant

  2. Aggiungi il relè open source o la smart socket (Esphome, Tasmota, ecc...) supportata in Home Assistant. Quello che abbiamo utilizzato in questo esperimento è il Sonoff (S26).

    select the device in Home Assistant step by step

    select the SonOff(tasmota) product in this experiment

  3. Aggiungi le automazioni in Home Assistant:

    Add the automation operation in Home Assistant

    quando la potenza è maggiore di 1000, accendi Sonoff S26:

    Create automation

    Add a trigger condition in the automation of home assistant

    Name this automation

    select the power reading from the modbus/tcp sensor as the trigger source

    image-20220715151504004

    Potenza<500 quindi spegni Sonoff S26:

    add another trigger source in this automation

    If the power is less than 500W, than do the corresponding operation

    Turn off the sonoff relay when the power reading is less than 50w

    Turn on the automation in Home Assistant

L'effetto dell'esperimento

Utilizza un bollitore elettrico per produrre la potenza di carico.

do this experiment in the home assistant

All'inizio, il bollitore elettrico è spento, la potenza di carico è 0W, anche la smart socket Sonoff è spenta.

the sonoff is off when the load power is less than 500w

accendi il bollitore elettrico, Modbus_Power=1596W > 1000W, quindi il relè Sonoff S26 si accende.

the sonoff is turned on when the load power is greater than 1000w

Pronto per spegnere il bollitore.

do the automation experiment in home assistant

Il bollitore elettrico è spento, Modbus_Power=64W < 500W, il relè Sonoff S26 si spegne.

the sonoff is off when the load power is less than 500w

L'effetto completo dell'esperimento è mostrato in questo video (gli ultimi 30 secondi del video)

Request the data of energy meter in Home Assistant(modbus/tcp), trigger the Sonoff in realtime. - YouTube

Utilizza i prodotti IAMMETER in Home Assistant

  1. Four methods available for integrating IAMMETER's energy meter into Home Assistant
  2. Summary: How to use IAMMETER`s energy meter in Home assistant
  3. Integrate the IAMMETER Wi-Fi energy meter(single phase and three-phase) into home assistant
  4. IAMMETER energy meter support Modbus TCP

Sistema e Prodotti e Soluzioni

Four ways to integrate the Electricity Usage Monitor (IAMMETER) into the home assistant

Monitor your solar PV system in Home Assistant

Control the EV charging power with regard to the solar PV output and grid power reading

In alto