Home

Awesome

eno2mqtt

Written and (C) 2015 Oliver Wagner owagner@tellerulam.com

Provided under the terms of the MIT license.

Overview

eno2mqtt is a gateway between a Enocean ESP3-capable gateway module (e.g. a TCM310, USB300 or Enocean PI) and MQTT. It receives Enocean ERP1 telegrams and publishes them as MQTT topics.

It's intended as a building block in heterogenous smart home environments where an MQTT message broker is used as the centralized message bus. See https://github.com/mqtt-smarthome for a rationale and architectural overview.

Dependencies

Build Status Automatically built jars can be downloaded from the release page on GitHub at https://github.com/owagner/eno2mqtt/releases

Connection

The connection to the ESP3 device can either be made locally through a serial port (the USB300 stick is just a TCM310 with a FTDI USB<->Serial converter) or remotely via network via some remote serial service. The latter is useful if you want to put the USB300 stick in the most efficient position RF-wise, but have the actual processing running elsewhere. Some very low grade hardware (e.g. a TP-LINK WR703N with OpenWRT) can then be used as a remserial server for the stick.

DeviceList file

In order to know what type an Encoean device is and how to interpret it's messages, eno2mqtt needs a device list file. It's a simple text file with three columns:

Enocean_ID	EEP		Symbolic_Name

The Enocean_ID is the ID of the given device in hex notation, without a 0x prefix.

The EEP is the Enocean Equipment Profile ID, in the form RORG-FUNC-TYPE. A list of all EEPs is available on the Enocean web site at https://www.enocean.com/en/knowledge-base/

The Symbolic_Name is used as the topic prefix when publishing status reports from the given device. Depending on the EEP, this may be suffixed further.

Topics

A special topic is prefix/connected. It holds an enum value which denotes whether the adapter is currently running (1) and connected to the ESP3 devices (2). It's set to 0 on disconnect using a MQTT will.

MQTT Message format

The message format generated is a JSON encoded object with the following members:

EEP specifics

Rocker switches. Publishes state to subtopics "AI", "AO" etc. as either 1 for pressed or 0 for released. The published messages are not retained, as those are one-shot events. Dual-button presses are reported on the respective dual-button topic, e.g. "AIBI".

Window handle: val=0 down, val=1 left/right, val=2 up

Usage

Configuration options can either be specified on the command line, or as system properties with the prefix "eno2mqtt". Examples:

java -jar eno2mqtt.jar eno.esp3=/dev/ttyUSB0 eno.deviceList=devicelist.txt

java -Deno.esp3=/dev/ttyUSB0 -jar eno2mqtt.jar

Available options:

When running eno2mqtt on a server class machine, it makes sense to limit the memory usage to 64MB using the java options

-Xmx64M

See also

Changelog