Skip to content

Instantly share code, notes, and snippets.

@CyberLine
Last active March 4, 2019 20:06
Show Gist options
  • Save CyberLine/aef93e89756ee6b572c30ae74db7beeb to your computer and use it in GitHub Desktop.
Save CyberLine/aef93e89756ee6b572c30ae74db7beeb to your computer and use it in GitHub Desktop.
Sample for integrate Shelly1 Units in Openhab 2.3 via MQTT binding
# place in "services" subfolder
mosquitto.url=tcp://localhost:1883
mosquitto.qos=2
# place in "items" subfolder
Switch shelly1_4FFBFE "Küche [MAP(shelly.map):%s]" <light> ["Lighting"] { autoupdate="false", mqtt=">[mosquitto:shellies/shelly1-4FFBFE/relay/0/command:command:*:MAP(shelly.map)],<[mosquitto:shellies/shelly1-4FFBFE/relay/0:state:MAP(shelly.map)]" }
Switch shelly1_1D90F0 "Schlafzimmer [MAP(shelly.map):%s]" <light> ["Lighting"] { autoupdate="false", mqtt=">[mosquitto:shellies/shelly1-1D90F0/relay/0/command:command:*:MAP(shelly.map)],<[mosquitto:shellies/shelly1-1D90F0/relay/0:state:MAP(shelly.map)]" }
Switch shelly1_500B3C "Flur2OG [MAP(shelly.map):%s]" <light> ["Lighting"] { autoupdate="false", mqtt=">[mosquitto:shellies/shelly1-500B3C/relay/0/command:command:*:MAP(shelly.map)],<[mosquitto:shellies/shelly1-500B3C/relay/0:state:MAP(shelly.map)]" }
Switch shelly1_2C731F "Einfahrt [MAP(shelly.map):%s]" <light> ["Lighting"] { autoupdate="false", mqtt=">[mosquitto:shellies/shelly1-2C731F/relay/0/command:command:*:MAP(shelly.map)],<[mosquitto:shellies/shelly1-2C731F/relay/0:state:MAP(shelly.map)]" }
Switch shelly1_2BD7E6 "Garten [MAP(shelly.map):%s]" <light> ["Lighting"] { autoupdate="false", mqtt=">[mosquitto:shellies/shelly1-2BD7E6/relay/0/command:command:*:MAP(shelly.map)],<[mosquitto:shellies/shelly1-2BD7E6/relay/0:state:MAP(shelly.map)]" }
Switch shelly1_2BE146 "Garagentor [MAP(shelly.map):%s]" <garagedoor> { autoupdate="false", mqtt=">[mosquitto:shellies/shelly1-2BE146/relay/0/command:command:*:MAP(shelly.map)],<[mosquitto:shellies/shelly1-2BE146/relay/0:state:MAP(shelly.map)]" }
# place in "transform" subfolder
ON=on
OFF=off
off=OFF
on=ON
-=UNDEFINED
NULL=UNDEFINED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment