Skip to content
Domoticz plugin for the EMS Wi-Fi Gateway with Proddy's EMS-ESP firmware
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images Add files via upload Sep 3, 2019
.gitignore Create .gitignore Aug 27, 2019
LICENSE Initial commit Aug 27, 2019
README.md Update README.md Sep 3, 2019
mqtt.py Rename ems-gateway/mqtt.py to mqtt.py Aug 27, 2019
plugin.py Initially uploaded the wrong file here. Aug 28, 2019

README.md

ems-esp-domoticz-plugin

Domoticz plugin for the EMS Wi-Fi Gateway with Proddy's EMS-ESP firmware.

When do you need this?

If you are using the EMS Wi-Fi Gateway (or another setup with) with Proddy's EMS-ESP firmware in combination with Domoticz.
The EMS-ESP firmware communicates via MQTT. Although MQTT is an open format, the required message contents is specific to each home automation system.
The EMS-ESP firmware was intented for integration with Home Assistant.
To communicate with Domoticz you need this plugin that will listen to the topics the Gateway publishes and listens to.
The plugin will translate the Home Assistant format to Domoticz format.

Compatibility

The plugin works with all versions of EMS-ESP. So the old versions with the Telnet interface are supported but also the new versions with the web interface (1.9.0).

Installation and configuration

Check if you have a MQTT broker/server

The Gateway communicates via MQTT. For this you need a MQTT broker installed on your machine. Usually this is Mosquitto.
You can check if your machine has it installed by typing f.i. mosquitto_pub in a terminal.
If it says 'command not found' you need to install Mosquitto first. If you get a list of option Mosquitto is installed and you can continue installing the plugin directly.

Installing the plugin

Stop the Domoticz service (by typing sudo systemctl stop domoticz in the shell).
Now do one of the following actions:
If you have Git installed (preferred method):
Go to the domoticz/plugins directory and run git clone https://github.com/bbqkees/ems-esp-domoticz-plugin.git.

Or as an alternative you can do:
Create a new directory 'ems-gateway' in the folder domoticz/plugins.
Copy the files mqtt.py and plugin.py to this new domoticz/plugins/ems-gateway directory.

Make sure that 'Accept new Hardware Devices' is enabled in settings/system.
Now start the domoticz service (by typing sudo systemctl start domoticz in the shell).
Create a new hardware of the type "EMS bus Wi-Fi Gateway" (Do not create a hardware of the type 'MQTT Client Gateway', this is something different). See the image below.


Set the MQTT server and port. Usually the MQTT server is running on the same machine as Domoticz. If so, you can leave the IP and port to its default setting.

Setting the correct topics

The plugin listens to the topics preceded by "home/ems-esp/". In the latest EMS-ESP firmware versions the default topic is "ems-esp". To change this go to the Gateway web interface and to the MQTT settings. Now set the Base parameter to "home".

Also make sure you don't change the host name of the Gateway otherwise the topic will change as well!

Set the right MQTT update frequency

By default the Gateway will publish the set of MQTT messages every 120 seconds.
For temperature and general logging this is a good update frequency. However, this is too slow if you also want to capture short events like turning on the warm water for 30 seconds.
If needed you can change the frequency in the web interface in 'Custom Settings' -> 'Publish Time'. Don't set it too low as it will bombard Domoticz with messages.

Using the plugin

On the first run the plugin will create several devices and sensors in Domoticz.
The plugin then subscribes and publishes to the default MQTT topics of the Gateway.
The plugin captures the messages and updates the Domoticz devices and sensors automatically.
Go to the 'Devices' tab in Domoticz and search for the devices that are created. You can now add each device to Domoticz by clicking on the small green arrow with 'Add Device'.

Updating the plugin

To update the plugin, stop the Domoticz service (by typing sudo systemctl stop domoticz in the shell).
Then copy the new plugin.py file to the plugin folder and overwrite the existing file.
Or if you used the git clone command to initially install the plugin just run git pull
Now start the domoticz service (by typing sudo systemctl start domoticz in the shell).
On first run of the plugin additional devices will be created automatically. Existing devices will not change.

Issues

If you find a problem with the plugin, just open an issue here.
As I do not have an EMS thermostat myself, I would like to know if this works as intended.

To Do List

  • Add the solar/mixer module devices.
  • Add support for the DS18B20 temperature sensors.
  • Add the additional topics for controlling thermostat night/day settings.
  • Make the topics configurable.

Credits

This plugin was based on the beta version version created by Gert05

You can’t perform that action at this time.