Rademacher Homepilot (DuoFern) via http-Binding

Tags: #<Tag:0x00007f832d80c1b0> #<Tag:0x00007f8322317f48> #<Tag:0x00007f8322317e30>

After reading a lot of info about openHAB and Rademacher Homepilot I was able to add my Rademacher “DuoFern” roller shutters, Rademacher closing contacts and Rademacher sun sensors into openHAB.

It was not necessary to use a workaround with FHEM or MQTT.

Maybe you are looking for the same – I try to summarize how I did it:

Prerequisites

  • Rademacher HomePilot (Software Version 5.x)
  • openHAB http-Binding
  • Rademacher DuoFern roller shutter or
  • Rademacher DuoFern closing contact or
  • Rademacher DuoFern sun sensor

First of all you need to find out your Rademacher Device ID (DID).
This device id “DID” need to be used in items (see below).

The “DID” can be found for roller shutters:
http://192.168.1.55/v4/devices
(replace 192.168.1.55 with your HomePilot-IP)

The URL for sensors (closing contact, sun sensor) is:
http://192.168.1.55/v4/devices?devtype=Sensor

Please be aware that we need both URL’s in the http.cfg file, if you have both (shutters and sensors).

My config looks like this:

http.cfg (in directory services)

homepilotCache.url=http://192.168.1.55/v4/devices
homepilotCache.updateInterval=20000

homepilotCache2.url=http://192.168.1.55/v4/devices?devtype=Sensor
homepilotCache2.updateInterval=20000

Sitemap:

Slider item=RollladenZimmer1              icon="rollershutter"
Text item=Tuerkontakt                     icon="door"           valuecolor=["closed"="green", "open"="red"]
Text item=Sonnensensor                    icon="sun"            valuecolor=["false"="green", "true"="red"]

Items:

Rollershutter RollladenZimmer1    "Rollladen Zimmer 1[%d %%]"   (GRollo)       {http="<[homepilotCache:20000:JSONPATH($.devices[?(@.did==5)].statusesMap.Position)] "}
String Tuerkontakt                "Fenster [%s]"                (GTuerkontakt) {http="<[homepilotCache2:20000:JSONPATH($.meters[?(@.did==12)].readings.contact_state)] "}
String Sonnensensor               "Sonnensensor [%s]"           (GTuerkontakt) {http="<[homepilotCache2:20000:JSONPATH($.meters[?(@.did==20)].readings.sun_detected)] "}

rules:

rule "GetRollershutterUpdate"
when
Member of GRollo received command
then
     logDebug("rolershutter","rolershutter " + triggeringItem.name + " recieved update" + receivedCommand )
     var String myUrl = ""
     switch(triggeringItem.name) {
     case "RollladenZimmer1": { myUrl = "http://192.168.1.55/devices/5"}
     case "RollladenZimmer2": { myUrl = "http://192.168.1.55/devices/7"}
     }
}
var String myData = '{"name":"GOTO_POS_CMD","value":"' + receivedCommand + '"}'
logDebug("rolershutter","Sending put "+ myData + " to " + myUrl)
sendHttpPutRequest(myUrl, "application/x-www-form-urlencoded", myData)
end

Hope that helps :grinning:
If you have further ideas or questions, please comment.

2 Likes

Hi,

very cool. Exactly what I was searching for!

Thanks!

You should add “JSONPath Transformation” to the prerequisites.

1 Like