Optimize your Home Energy Consumption with an ESP8266 Siemens AMIS Reader and Home Assistant

In my recent blog on Open Source Home Energy Management with Home Assistant I wrote about how Home Assistant helps you to monitor and optimize your own home energy consumption.

Within this blog post I will show how an ESP8266 Wifi enabled Siemens AMIS reader can be used to monitor the energy that your home receives from and sends to the energy grid. 

As the Siemens AMIS ESP8266 reader captures the data in realtime, it is extremely useful to build automations on top of it.

A DIY ESP8266 Reader for the Siemens AMIS Smart Energy Meter

The energy grid provider in my region (NetzOÖ, Upper Austria) did change the old three-phase meter (Drehstromzähler) to use a Siemens AMIS Smart Meter instead.

The Siemens AMIS Smart Meter is able to measure the ingoing and outgoing 3 phase energy and provides an optical maintenance interface.

After a while of searching and asking around, I stumbled across a genius little optical reader device that was built by Gottfried Prandstetter and is distributed by Gerhard Mitterbaur through his webpage.

The AMIS reader is built on top of a ESP8266 controller board which offers out-of-the-box Wifi connectivity, through which the creator offers a convenient Web configuration server.

The reader’s firmware implements direct MQTT support along with a REST API interface to receive and integrate the measured data with any kind of home control system.

See below the nice Web interface that the AMIS reader offers.

AMIS ESP32 Reader Web Interface

Switching to the reader’s MQTT configuration page, I am able to configure my own Mosquitto MQTT server as the destination for the energy sensors data.

Attach the AMIS ESP8266 reader directly on top of the maintenance optical interface of your smart meter, as it is shown below. The three attached magnets do hold the reader in place while it constantly reads the smart meter sensor values and sends those values towards your MQTT server.

Attach the AMIS reader to my Home Assistant Server

In order to visualize the energy consumption and to trigger automations, I attached the AMIS sensor directly into my Home Assistant system through MQTT.

As most Home Assistant sensors use MQTT, it just needed the belows configuration to get the measurements directly integrated into my home automation system and into my energy management dashboard.

sensor:
 - platform: mqtt
   name: "AMIS SmartMeter Power Received (Wh)"
   state_topic: "amis/out"
   value_template: "{{ value_json['1.8.0'] }}"
   unit_of_measurement: Wh
   device_class: energy
 - platform: mqtt
   name: "AMIS SmartMeter Power Returned (Wh)"
   state_topic: "amis/out"
   value_template: "{{ value_json['2.8.0'] }}"
   unit_of_measurement: Wh
   device_class: energy

As a result, I am able to view my daily energy consumption within my Home Assistant dashboard, as it is shown below:

Optimize your energy consumption

On top of the data gathered by the AMIS smart meter I am now able to optimize some of my home’s energy consumers to dynamically react according to my current solar gains.

One of the most beneficial automations is to dynamically enable my pool filter pump (700W) based on the energy my solar panels are currently sending into the grid.

Once the amount of sent energy is above 1000W I am enabling my filter pump, while the pump is automatically disabled if the grid contribution drops to below 500W.

In this scenario, the automation is turning the pump off if the solar gain drops or if another energy consumer is temporarily enabled (e.g.: washing machine or the stove).

To avoid constant toggling of the pool pump, the automation is configured to check every 5 minutes and to check the off condition only every 15 min to further avoid hysteresis.

See below my Home Assistant configuration:

- id: poolpumpesonneein
 alias: Turn pool pump on, if power returned to energy grid is greater that 1000 W
 trigger:
   platform: time_pattern
   minutes: "/5"
 condition:
 - condition: numeric_state
   entity_id: sensor.amis_smartmeter_power_returned_w
   above: 1000
 action:
 - data:
     entity_id: switch.poolpumpe
   service: switch.turn_on
- id: poolpumpesonneaus
 alias: Turn pool pump off, if power received by energy grid is greater than 500 W
 trigger:
   platform: time_pattern
   minutes: "/15"
 condition:
 - condition: numeric_state
   entity_id: sensor.amis_smartmeter_power_received_w
   above: 500
 action:
 - data:
     entity_id: switch.poolpumpe
   service: switch.turn_off

Conclusion

The genius work of Gottfried Prandstetter and the nice help of Gerhard Mitterbaur enabled me to observe my home’s energy consumption in real time.

Monitoring and closely investigating my own energy consumption did show a lot of optimization potential and the integration with Home Automation gives me the necessary framework to implement all those automations in reality and to save a lot of energy over time.

In case you need more inspiration on what to automate with Home Assistant, read my ebook on Amazon.