I/O Channels

The device offers several I/O channels for communication, each suited for different use cases.

HTTP

A standard, synchronous channel for simple request/response interactions.

HTTP Server-Sent Events (SSE)

Provides a one-way stream of real-time, JSON-serialized events from the device.

WebSocket

A high-performance, bi-directional channel for low-latency, real-time communication.

MQTT

An asynchronous channel based on the publish/subscribe pattern, ideal for IoT integrations. The device includes a built-in broker.

Serial Port

A direct, wired connection for debugging and initial setup.

Modules and API

HomeGenie Mini API is a subset of HomeGenie Server API which makes of it a "minified" instance of HomeGenie Server specifically designed for microcontrollers.

Regardless the channel used to send API commands they will keep the same syntax:

<domain>/<address>/<command>/<option_1>/.../<option_n>

Commands issued via HTTP or Terminal are prefixed with the base url /api/.

Automation module

Domain / Address

HomeAutomation.HomeGenie/Automation

Commands

Config module

Domain / Address

HomeAutomation.HomeGenie/Config

Commands

<GPIO> module

Domain / Address

HomeAutomation.HomeGenie/<module_address>

Commands

Where <module_address> is the GPIO number. So to set HIGH the GPIO5 the API command will be:

  HomeAutomation.HomeGenie/5/Control.On

To configure GPIO modules the following firmware parameters are available:

KeyDescriptionDefault
io-typ01I/O Ch.1 type
io-pin01I/O Ch.1 GPIO#-1 (-1=not used)
io-typ02I/O Ch.2 type
io-pin02I/O Ch.2 GPIO#-1 (-1=not used)
...(channels 3 through 8 follow the same pattern)...

These parameters allow configuring up to 8 I/O modules.

IO Channel Type (io-typ0*) can be one of the following: 'Switch','Light' or 'Dimmer'.

Example

#SET:io-typ01 Dimmer
#SET:io-pin01 5
#SET:io-typ02 Dimmer
#SET:io-pin02 6

Besides the built-in GPIO modules, you can create custom modules to control more complex hardware. The Smart Light example demonstrates this by defining a C1 module that is mapped to an RGB LED for full color control.

mini module

Builtin sensor module.

Domain / Address

HomeAutomation.HomeGenie/mini

Properties

Example

Getting the mini module by calling the API method Modules.Get of the Config module:

HTTP

http://<hg_mini_ip>/api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie/mini

Serial Port

/api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie/mini

Response

{
  "Name": "HG-Mini",
  "Description": "HomeGenie Mini node",
  "DeviceType": "Sensor",
  "Domain": "HomeAutomation.HomeGenie",
  "Address": "mini",
  "Properties": [{
    "Name": "Sensor.Luminance",
    "Value": "114",
    "UpdateTime": "2019-01-30T13:34:02.293Z"
  },{
    "Name": "Sensor.Temperature",
    "Value": "18.25",
    "UpdateTime": "2019-01-30T13:34:02.293Z"
  },{
    "Name": "System.BytesFree",
    "Value": "2243167",
    "UpdateTime": "2024-03-13T18:06:08.730Z"
  }]
}
menu_open Content index
forum Q & A discussion forum
HomeGenie
MINI 1.2 — Documentation