+1

Your cart is empty.

Cozify HAN, Interfaces and Their Importance in Energy Management


The Cozify HAN reader brings the information from the electric meter's HAN/P1 port easily accessible. This enables real-time consumption monitoring, automation, and energy efficiency optimization. Without real-time data, implementing automation is not possible – you cannot automate today's tasks with yesterday's data.


The device features three key interfaces: OpenAPI (Rest API), MQTT, and Modbus TCP. Each has its own role and strengths in different applications.


Why are interfaces important?

Interfaces define how information flows from the HAN reader to other systems. A well-chosen interface makes integration quick, reliable, and scalable. Cozify offers options suited for home automation, cloud services, and industrial BMS systems.


Comparison of Interfaces:


Protocol

Benefits

Typical applications


OpenAPI (RestAPI)


HTTP/JSON


Easy to use, suitable for cloud services and reporting


Web and mobile applications, cloud-based analytics


MQTT


TCP/IP

Lightweight, real-time, IoT-compatible

Smart home integrations, EV charging optimization, load management, connection to energy management systems (EMS)


Modbus (TCP)


TCP/IP

Industry standard, reliable

Building automation, industrial control systems, EV charging optimization, load management, Building Management System (BMS) compatible


More interfaces to come...


OpenAPI / Rest API

A HTTP-based interface that returns data in JSON format. A typical endpoint is /meter, which provides voltages, currents, and power. RestAPI is used, for example, for Home Assistant integration and communication with Shelly devices through the Cozify HAN reader. It works well in the same local network where the reader itself is. The interface is available by default from the reader without separate activation, for commercial use, a license is required.

When point you browser to Cozify HAN IP you'll get answers that these will help you to understand. Try http://YOUR-HAN-IP/meter

Field Descriptions:

  • type: Message type identifier
  • ts: Timestamp in milliseconds (Unix epoch)
  • ic: Active cumulative power imported (kWh)
  • ec: Active cumulative power exported (kWh)
  • ric: Reactive cumulative power imported (kVArh)
  • rec: Reactive cumulative power exported (kVArh)
  • p: Array of active power values (W) [Total, Phase 1, Phase 2, Phase 3]
  • pi: Array of active power consumption values (W) [Total, Phase 1, Phase 2, Phase 3]
  • pe: Array of active power overproduction values (W) [Total, Phase 1, Phase 2, Phase 3]
  • r: Array of reactive power values (VAr) [Total, Phase 1, Phase 2, Phase 3]
  • u: Array of voltage readings (V) [Phase 1, Phase 2, Phase 3]
  • i: Array of current readings (A) [Phase 1, Phase 2, Phase 3]

MQTT

A lightweight messaging protocol that operates on a publish/subscribe model. The Cozify HAN sends data to an MQTT broker in real-time. Since the reader sends the information to the desired IP address, this solution also works well outside the local network. The interface requires activation by Cozify, contact support and provide the HAN reader's serial number.


Parameters (these are exmaples) that are needed from customer and currently set byt Cozify:

  • host:mqtt://192.168.XXX.XXX
  • port:1883
  • username:DEMO.USER
  • password:PASSWORD123
  • topic:Cozify/HAN123/Data

Modbus TCP

An industrial standard widely used in automation systems. The Cozify HAN offers a register map from which phase-specific voltages and total power can be read. It works well in the same local network where the reader itself is. The interface requires activation by Cozify, contact support and provide the HAN reader's serial number.


Pricing, Consumer & Commercial

Consumer

Commercial use


OpenAPI (RestAPI)


Free of Charge


License required for commercial use, 21-day free trial license available


MQTT

Free through the Beta program

License required for commercial use, 21-day free trial license available


Modbus (TCP)

Free through the Beta program

License required for commercial use, 21-day free trial license available



How to choose which interface?

Often the best solution is a combination: MQTT for real-time control and OpenAPI for reporting. Remember that if data needs to be received outside the local network directly from the HAN, then the easiest way is MQTT.


Summary

Cozify HAN offers a flexible platform for energy management and automation needs. By selecting the right interface, you ensure that the integration is efficient and scalable for future needs. If you believe there is an important API interface missing from the reader, please let us know. We are keen to listen to our users and develop the product in a direction that benefits everyone.

 

More about HAN interfaces

Thank you for reading!

Share your experiences and feedback at info@cozify.fi

Jukka Talja

Jukka Talja
Cozify, Head of Sales