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


Impostazione di Home Assistant
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

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).


Aggiungi le automazioni in Home Assistant:

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





Potenza<500 quindi spegni Sonoff S26:




L'effetto dell'esperimento
Utilizza un bollitore elettrico per produrre la potenza di carico.

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

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

Pronto per spegnere il bollitore.

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

L'effetto completo dell'esperimento è mostrato in questo video (gli ultimi 30 secondi del video)
Utilizza i prodotti IAMMETER in Home Assistant
- Four methods available for integrating IAMMETER's energy meter into Home Assistant
- Summary: How to use IAMMETER`s energy meter in Home assistant
- Integrate the IAMMETER Wi-Fi energy meter(single phase and three-phase) into home assistant
- 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