Skip to content

Latest commit

 

History

262 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ism7mqtt

Get all statistics and values from your Wolf ISM7 and send them to an mqtt server without using the smartset cloud or scraping the smartset UI. It connects directly to your ism7.

How?

Create a parameter.json file which is needed for ism7mqtt by running the ism7config tool on any machine which can connect to your ism7. This only needs to be done once (or after you changed your your Wolf setup):

ism7config -i <ism7 ip/host> -p <ism7 password>

Run ism7mqtt on any machine which can connect to your ism7 and an mqtt server.

ism7mqtt -m <mqttserver> -i <ism7 ip/host> -p <ism7 password>

Do not forget to put the generated parameter.json next to ism7mqtt or specify the path with -t .../parameter.json.

Docker

If you want to run this via docker, use:

docker run -d --restart=unless-stopped -v ./parameter.json:/app/parameter.json -e ISM7_MQTTHOST=<mqttserver> -e ISM7_IP=<ism7 ip/host> -e ISM7_PASSWORD=<ism7 password> zivillian/ism7mqtt:latest

Configuration options

Every option can be set as a CLI flag (when running the binary/dotnet run directly) or as an environment variable (typically used with Docker). If both are set, the CLI flag wins.

Connection (required)

Flag Env var Description
-m, --mqttServer=<host> ISM7_MQTTHOST MQTT broker host
-i, --ipAddress=<host> ISM7_IP ISM7 hostname or IP
-p, --password=<pwd> ISM7_PASSWORD ISM7 password

MQTT

Flag Env var Default Description
--mqttuser=<user> ISM7_MQTTUSERNAME MQTT username
--mqttpass=<pwd> ISM7_MQTTPASSWORD MQTT password
--mqttport=<port> ISM7_MQTTPORT 1883 MQTT broker port
--mqttqos=<0-2> ISM7_MQTTQOS 0 MQTT QoS level
-s, --separate ISM7_SEPARATE false One topic per value instead of one JSON payload per device (also disables the JSON payload)
--retain ISM7_RETAIN false Set the MQTT retain flag

Behavior

Flag Env var Default Description
--interval=<seconds> ISM7_INTERVAL 60 Push interval for polled values
-l, --lang=<code> ISM7_LANGUAGE DEU Language for HA localization (DEU,CHN,GRC,EST,HRV,LVA,LTU,ROU,ITA,ESP,FRA,POL,CZE,SVK,RUS,DNK,HUN,GBR,TUR,NLD,BUL,POR)
-d, --debug ISM7_DEBUG false Dump raw protocol XML (includes your password)
--hass-id=<prefix> ISM7_HOMEASSISTANT_ID Enable Home Assistant discovery; implies --separate and --retain

Files & templates

Flag Env var Default Description
-t, --parameter=<path> (none — Docker: mount to /app/parameter.json) parameter.json Path to the generated parameter.json
--startup-timeout=<seconds> ISM7_STARTUP_TIMEOUT 90 Per-request startup timeout — see below
--parameter-xml-override=<path> ISM7_PARAMETER_XML_OVERRIDE Replace the built-in parameter template — see Advanced below

ISM7_STARTUP_TIMEOUT (in seconds, defaults to 90, also available as --startup-timeout) only applies to the initial startup phase, where ism7mqtt requests all configured values from the ism7 one pull request at a time. It is not a timeout for the whole startup phase - it resets for every single pull request. If the ism7 does not answer one particular request within this time, ism7mqtt assumes the connection is stuck, logs the problem and exits so it can be restarted (e.g. by Docker's restart policy). Increase this value if your setup regularly needs more time to answer a single request; decrease it if you want ism7mqtt to fail faster on a stuck connection.

Advanced: overriding the built-in parameter.xml

ism7mqtt ships with a built-in parameter.xml describing every known Wolf parameter (name, min/max, selectable values, ...). If your installation exposes values that are missing from it (e.g. an incomplete KeyValueList for a select parameter), you can point ism7mqtt at your own local copy instead, via --parameter-xml-override <path> or ISM7_PARAMETER_XML_OVERRIDE. This is opt-in only - if unset, behaviour is unchanged and the built-in file is used as before.

Warning

This replaces the entire built-in template, it does not merge with it. Start from a copy of the current parameter.xml in this repo, edit only what you need, and keep it in sync when this file changes in later releases - there is no drift detection.

For Docker, mount your edited file additionally to the existing parameter.json mount and point the new environment variable at it:

docker run -d --restart=unless-stopped \
  -v ./parameter.json:/app/parameter.json \
  -v ./parameter.xml:/app/parameter.xml \
  -e ISM7_MQTTHOST=<mqttserver> -e ISM7_IP=<ism7 ip/host> -e ISM7_PASSWORD=<ism7 password> \
  -e ISM7_PARAMETER_XML_OVERRIDE=/app/parameter.xml \
  zivillian/ism7mqtt:latest

HomeAssistant

There is a HomeAssistant integration available at b3nn0/hassio-addon-ism7mqtt.

Firmware < 200

The old firmware (Software < 200) uses a different port (9091). ism7config tries to automatically detect and save the port in the parameter.json.

Cons

The ism7 accepts only a single connection, so you cannot use the Smartset application or mobile app while ism7mqtt is running.

Configuration

The parameter.json contains all devices and the corresponding properties for the installation extracted from your setup. You can remove any property which is not needed.

MQTT

ism7mqtt initially fetches all properties declared in parameter.json and afterwards subscribes to changes with an intervall of 60 seconds. Whenever new values are received from ism7 a json update with all those properties is published to mqtt. Please be aware that an update contains only the changed properties - so only the initial message may contain all properties.

You can also enable separate topics (--separate), which will report each value in its own nested topic and disable the JSON payload.

Each device on the bus (and present in the parameter.json) is reported via its own topic. The format is

Wolf/<ism7 ip address>/<device type>_<device bus address>

For each property of type ListParameter (basically all comboboxes) nested values are reported - the original numerical value (value) and the german text representation (text).

Duplicate properties are reported as a sub property or topic with their numerical identifier (property id) to make them unique.

Writing MQTT

Sending MQTT messages in order to set values involves using a general structure to publish messages.

Note

Please be aware that not all properties are writable. The ism7mqtt software attempts to validate whether a property can be set, but this may not always be accurate.

Use this topic to send JSON data:

Wolf/<ism7 ip address>/<device type>_<device bus address>/set

Use this topic to send single values:

Wolf/<ism7 ip address>/<device type>_<device bus address>/set/<property name>/...

Example

Goal: Switching heating mode on or off.

Observing the MQTT output published via topic Wolf/192.168.1.27/MK_BM-2_0x85 reveals the following structure:

{
    "Programmwahl": {
        "360051": {
            "value": 0,
            "text": "Standby"
        },
        "360058": 0
    }
}

You can now pick either property value or text to set a new heating mode. To do so you publish the following JSON payload to topic Wolf/192.168.1.27/MK_BM-2_0x85/set

{
    "Programmwahl": {
        "360051": {
            "value": 0
        }
    }
}

or

{
    "Programmwahl": {
        "360051": {
            "text": "Standby"
        }
    }
}

If done correctly ism7mqtt should greet you with the following messages (-d debug enables additional xml output):

received mqtt with topic 'Wolf/192.168.1.27/MK_BM-2_0x85/set' '{"Programmwahl":{"360051":{"text":"Auto"}}}'
> <?xml version="1.0" encoding="utf-16"?><tbreq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" bn="11" gw="1" ae="true" ty="write"><iwr se="" ba="0x85" in="10100" dl="0x01" dh="0x00" /></tbreq>
< ?<?xml version="1.0" encoding="utf-8"?><tbres bn="11" gw="" st="OK" ts="2024-04-19T22:09:22" emsg=""><iac se="0" ba="0x85" in="10100" dl="0x1" dh="0x0" st="OK"/></tbres>
publishing mqtt with topic 'Wolf/192.168.1.27/MK_BM-2_0x85' '{"Programmwahl":{"360051":{"value":1,"text":"Auto"},"360058":1}}'

Publishing Single Values

For single value updates instead of JSON, publish directly to the corresponding MQTT topic.

Append each part of a nested JSON property to the topic path:

Wolf/<ism7 ip address>/<device type>_<device bus address>/set/<property name>/...

Example topics to update single properties:

Wolf/<ism7 ip address>/WWSystem_BM-2_0x35/set/Programmwahl/35012/value
Wolf/<ism7 ip address>/WWSystem_BM-2_0x35/set/Programmwahl/35012/text

Bugs / Missing Features

If something is not working in your setup, you can get more output by using the debug switch -d. This will dump the communication with the ism7 (including your password). Please include a redacted version of this dump when opening an issue and also attach your parameter.json.

Protocol

See PROTOCOL.md

About

No description or website provided.

Topics

Resources

Stars

105 stars

Watchers

13 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages