KAIFA Smart Meter, Meter Extension #1 Cuculus HOWTO:

KAIFA Smart Meter, Meter Extension #1 Cuculus HOWTO:

I want to share my findings integrating the
Meter Extension #1 Cuculus for the KAIFA Smart Meter.

The KAIFA Smart Meter is used in this parts of Austria:
Netz Niederösterreich
Innsbrucker Kommunalbetriebe
Salzburg Netz
TINETZ Tiroler Netze
Vorarlberger Energienetze

I don’t know if the Meter Extension #1 Cuculus is sold by all Providers.

It was alot of hassle to get it running because of no documentation and nearly no help from the manufacturer.

NOTE: Use a fixed IP Address for your device via DHCP Mac Address.

Meter Extension #1 Cuculus


KAIFA Smart Meter

Method #1: HTTP REST API
Use this config and fill in the IP of your Device in the resource URL:

sensor:
  - platform: rest
    name: Power Meter  Load
    resource: http://YOUR-DEVICE-IP/api
    headers:
      content-type: application/json
    method: "POST"
    payload: '{"cmd": "meter_reading","id": 0}'
    unit_of_measurement: 'W'
    device_class: 'power'
    value_template: "{{ value_json['meter'].0.data.2.entry.0.val }}"
    unique_id: 300
  - platform: rest
    name: Power Meter Consumption
    resource: http://YOUR-DEVICE-IP/api
    headers:
      content-type: application/json
    method: "POST"
    payload: '{"cmd": "meter_reading","id": 0}'
    unit_of_measurement: 'Wh'
    device_class: 'energy'
    state_class: total_increasing
    value_template: "{{ value_json['meter'].0.data.4.entry.0.val }}"
    unique_id: 301

Method #2: MQTT
This method is a bit more complicated.
You have to setup a MQTT Broker with SSL/TLS.
I won’t cover a MQTT broker installation here.

But i give a quick overview what the way is:
Install mosquitto.
Create CA Certificate.
Create Server Certificate.
Convert CA Certificate CRT FIle to PEM File as mqtt.pem
Edit your mosquitto.conf file to use SSL on port 8883 and link the Certificates.

Go to http://YOUR-DEVICE-IP in a browser.
click on delete for the file mqtt.pem
choose file mqtt.pem file that you created previosly
click upload

Replace MQTTBROKER-IP/MQTTBROKER-USERNAME/MQTTBROKER-PASSWORD/YOUR-DEVICE-IP in the following curl command and then send it:

curl -i -X POST -d "{\"cmd\":\"mqtt_config\",\"host\":\"mqtts://MQTTBROKER-IP\",\"user\":\"MQTTBROKER-USERNAME\",\"password\":\"MQTTBROKER-PASSWORD\",\"port\":\"8883\"}" YOUR-DEVICE-IP/api

So now MQTT should be running and the device will log into your broker with the topic of your meter number.
If you want to see it you can use MQTT Explorer for example.

Use this config and fill in the Topic number of your Device in the state_topic and json_attributes_topic:

  sensor:
    - name: Power Meter Load
      unit_of_measurement: 'W'
      device_class: 'power'
      unique_id: 170 
      state_topic: "1KFM0100123456/MeterReading"
      json_attributes_topic: "1KFM0100123456/MeterReading"
      value_template: "{{ value_json['meter'].0.data.2.entry.0.val }}"
    - name: Power Meter Consumption
      unit_of_measurement: 'Wh'
      device_class: 'energy'
      state_class: total_increasing
      unique_id: 171
      state_topic: "1KFM0100123456/MeterReading"
      json_attributes_topic: "1KFM0100123456/MeterReading"
      value_template: "{{ value_json['meter'].0.data.4.entry.0.val }}"

Extra Notes:
REST API is at http://YOUR-DEVICE-IP/api
Known commands:

{"cmd": "meter_reading","id": 0}
{"cmd": "log_get_month","id": 1}
{"cmd": "system_status","id": 123}
{"cmd": "mqtt_config","host": "mqtts://MQTTBROKER-IP","user": "MQTTBROKER-USERNAME","password": "MQTTBROKER-PASSWORD","port": "8883"}

Thats it, hope this helps someone out there.

3 Likes

Hi sharonna51,
Thx for this discricption!
I wrote an email to tinetz if the adapter is available for tinetz customers too.
If i get any information i will write it here.
Have a nice weekend
Bergstern

Thanks for the write up, I managed to get my home assistant working with KAIFA via MBUS and a raspberry pi. Its a bit more involved than your solution but it works just the same.

For anyone interested: https://burgstaller.dev/blog/2023-08-26-reading-energy-data-from-kaifa/

Hi, thanks for sharing this. I tried it with REST-API and it works fine. It shows Total Consumption and current Load.

But wondering if can do more with it? For example, Show Price, Forecast and so on. In the App EnergyRadar wich comes with the Smart Meter Extension it should also be possible to display Efficiency Analytics

Hello

thanks for the description.
I would like to get one of these, but over the Internet i didn’t find any sources to buy one. I even tried to contact the manufacturer, but got no answer.
Do you know of any sources to get one?
I am living in DACH. My power-provider doesn’t offer these Power Meter Extension.

This is an English language forum.

Hi sharonna511

sorry i wrote everything in german and now it got hidden, sorry for that.

I got the Smartmeter Extension and maybe you can help me to set up that i can use everything in iobroker.

I am probably not really familiar with this type of transfering data.
I just got mqtt broker on ioboker from “sonoff” to get MQTT entrys from my tasmota smart plugs.

Maybe i can use this mqtt broker to get the data from cuculus?