Rademacher Homepilot (DuoFern) via http-Binding

This is my working configuration in OH3:

UID: http:url:9426f71b91
label: Rademacher Rollershutter - Wohnzimmer Terrassentür
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: true
  baseURL: http://192.168.1.30
  delay: 0
  stateMethod: GET
  refresh: 10
  commandMethod: PUT
  contentType: application/json
  timeout: 3000
  bufferSize: 2048
location: Wohnzimmer
channels:
  - id: rollershutter
    channelTypeUID: http:rollershutter
    label: Rollershutter
    description: ""
    configuration:
      mode: WRITEONLY
      commandExtension: /devices/1
      stopValue: '{"name":"STOP_CMD"}'
      downValue: '{"name":"POS_DOWN_CMD"}'
      upValue: '{"name":"POS_UP_CMD"}'
  - id: rollershutter_position
    channelTypeUID: http:number
    label: Position
    description: ""
    configuration:
      commandTransformation: JS:RollershutterPositionJSON.js
      stateExtension: /v4/devices/1
      stateTransformation: JSONPATH:$.device.statusesMap.Position
      commandExtension: /devices/1

this is my RollerShutterPositionJSON.js:

(function(position){
    try{
        var obj = {name: "GOTO_POS_CMD", value: parseInt(position)};
        return (JSON.stringify(obj));
    } catch(e) {
        return null;
    }
})(input)

Hope it helps…

2 Likes

Yes, this helped very much. Now it is working again. Thanks! :+1:t2: :+1:t2: :+1:t2:

Hi @danil ,

do you currently get this error on each update in the openhab.log, too?

[WARN ] [ttp.internal.http.RefreshingUrlCache] - Failed processing result for URL http://192.168.0.23/v4/devices/4: Value must be between 0 and 100

I’m using this:

stateExtension: /v4/devices/1
stateTransformation: JSONPATH:$.device.statusesMap.Position

Response looks correct:

"statusesMap":{"Manuellbetrieb":0,"Position":100}

So in my opinion 100 is between 0 and 100 :wink:

When I configured that, I didn’t have that message.

Do you have it currently?

I have profile “Standard” as the value is returned directly…
If I change to JSONPATH there, I get:

Could not transform state '100' with function 'JSONPATH:$' and format '%s'

which shows me, that it really returns 100.

Any ideas?

My HomePilot used FW 5.4.9.

The channel in the device can also be read out directly as status feedback.

stateExtension: /devices/1
stateTransformation: JSONPATH:$..capabilities[2].value

The number indicates the sequence of properties. Value false = off, value true = on,… or value (number) = position.

You can evaluate all properties of the device.

example my config.

UID: http:url:xxxxxxxxxxxxx
label: Rademacher Rollo Stubenfenster
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: true
  baseURL: http://xxx.xxx.xxxx.xxx
  delay: 0
  stateMethod: GET
  refresh: 10
  commandMethod: PUT
  contentType: application/json
  timeout: 3000
  bufferSize: 2048
location: Wohnzimmer
channels:
  - id: rollershutter
    channelTypeUID: http:rollershutter
    label: Rollershutter
    description: null
    configuration:
      mode: WRITEONLY
      commandExtension: /devices/33
      stopValue: '{"name":"STOP_CMD"}'
      downValue: '{"name":"POS_DOWN_CMD"}'
      upValue: '{"name":"POS_UP_CMD"}'
  - id: PROTOCOL_ID_CFG
    channelTypeUID: http:string
    label: Funkcode ID
    description: null
    configuration:
      stateExtension: /devices/33
      stateTransformation: JSONPATH:$..capabilities[28].value
      commandExtension: /devices/33
  - id: VERSION_CFG
    channelTypeUID: http:string
    label: Geräte-Version
    description: null
    configuration:
      stateExtension: /devices/33
      commandExtension: /devices/33
      stateTransformation: JSONPATH:$..capabilities[2].value
  - id: PROD_CODE_DEVICE_LOC
    channelTypeUID: http:string
    label: Produktname
    description: null
    configuration:
      stateExtension: /devices/33
      commandExtension: PROD_CODE_DEVICE_LOC
      stateTransformation: JSONPATH:$..capabilities[4].value
  - id: NAME_DEVICE_LOC
    channelTypeUID: http:string
    label: Gerätename
    description: null
    configuration:
      stateExtension: /devices/33
      commandExtension: /devices/33
      stateTransformation: JSONPATH:$..capabilities[8].value
  - id: TIME_AUTO_CFG
    channelTypeUID: http:switch
    label: Zeitautomatik
    description: null
    configuration:
      onValue: '{"name":"TIME_AUTO_CFG","value":"true"}'
      mode: WRITEONLY
      offValue: '{"name":"TIME_AUTO_CFG","value":"false"}'
      stateExtension: /devices/33
      commandExtension: /devices/33
  - id: SUN_AUTO_CFG
    channelTypeUID: http:switch
    label: Sonnenautomatik
    description: null
    configuration:
      mode: WRITEONLY
      onValue: '{"name":"SUN_AUTO_CFG","value":"true"}'
      stateExtension: /devices/33
      offValue: '{"name":"SUN_AUTO_CFG","value":"false"}'
      commandExtension: /devices/33
  - id: AUTO_MODE_CFG
    channelTypeUID: http:switch
    label: Automatikbetrieb
    description: null
    configuration:
      onValue: '{"name":"AUTO_MODE_CFG","value":"true"}'
      mode: WRITEONLY
      stateExtension: /devices/33
      offValue: '{"name":"AUTO_MODE_CFG","value":"false"}'
      commandExtension: /devices/33
  - id: DAWN_AUTO_CFG
    channelTypeUID: http:switch
    label: Morgendämmerungsautomatik
    description: null
    configuration:
      onValue: '{"name":"DAWN_AUTO_CFG","value":"true"}'
      mode: WRITEONLY
      offValue: '{"name":"DAWN_AUTO_CFG","value":"false"}'
      stateExtension: /devices/33
      commandExtension: /devices/33
  - id: DUSK_AUTO_CFG
    channelTypeUID: http:switch
    label: Abenddämmerungsautomatik
    description: null
    configuration:
      onValue: '{"name":"DUSK_AUTO_CFG","value":"true"}'
      mode: WRITEONLY
      stateExtension: /devices/33
      offValue: '{"name":"DUSK_AUTO_CFG","value":"false"}'
      commandExtension: /devices/33
  - id: VIS_DEVICE_LOC
    channelTypeUID: http:switch
    label: Sichtbarkeit Gerät
    description: null
    configuration:
      onValue: '{"name":"VIS_DEVICE_LOC","value":"true"}'
      mode: WRITEONLY
      offValue: '{"name":"VIS_DEVICE_LOC","value":"false"}'
      stateExtension: /devices/33
      commandExtension: /devices/33

Hello,

First, let me tell that my setup works following the instruction von danil (SEP-21), thanks for this!

But I like to do my configuration by files and that is where I am now! The problem is defining the position values within the things-file at the Channel’s configuration.
After some hours of failure searching, I figured out that the problem is the formatting. When defining the thing with UI the code-view shows the following string as value.

'{"name":"STOP_CMD"}'

When writing it in this format, saving of things file fails. The same for any other format like these:

When writting the .things-file with that format style it fails. Also, it fails with the following other try-outs.

stopValue={"name":"STOP_CMD"}, 
downValue="{%22name%22:%22POS_DOWN_CMD%22}", 
upValue=""{"name":"POS_UP_CMD"}"",
upValue2="POS_UP_CMD"

Some of these formats get errors after saving the path other fail when transmitting data via http binding.

I hope someone can help me to find the correct format.

Solution, thanks to Michael’s post below:

Correct escaping was like: stopValue="{\"name\":\"STOP_CMD\"}",

Thanks a lot,
Daniel

Hi Daniel,

the following description works for me. I struggled a bit as well in the beginning as I was starting from an example that used “commandMode” instead of “commandMethod” - maybe your issue as well ;)?

Thing http:url:shutter "Homepilot" [
    baseURL="http://192.168.1.34/",
    authMode="BASIC",
    ignoreSSLErrors="true",
    refresh=5,
    commandMethod="PUT",
    stateMethod="GET",
    contentType="application/json",
    timeout=3000,
    bufferSize=2048,
    delay=0
] {
    Channels:
        Type rollershutter : wohnzimmer [
            mode="WRITEONLY",
            commandExtension="/devices/9",
            stopValue="{\"name\":\"STOP_CMD\"}",
            downValue="{\"name\":\"POS_DOWN_CMD\"}",
            upValue="{\"name\":\"POS_UP_CMD\"}"
        ]
        Type number : wohnzimmer#position [
            stateExtension="/v4/devices/9",
            stateTransformation="JSONPATH:$.device.statusesMap.Position",
            commandTransformation="JS:RollerShutterPositionJSON.js",
            commandExtension="/devices/9"
        ]
}

best regards,
/Michael

2 Likes

Dear Michael,
Thanks you so much! Following your example did the magic and my file configured rollershutter works now.

Hi,
I would like to repost my first article which was for openHAB 2.x - but this time I changed it for openHAB3.
I used text-based configuration (instead of GUI) - because new Rademacher devices can be integrated much faster this way.

This post is a summary of all above how to integrate Rademacher Homepilot into openHAB 3. You can control Rademacher hardware like:

  • Roller Shutters, Blinds, Marquee,
  • Closing Contacts (Model 9431)
  • Sun Sensors (Model 9478)
  • Radiator Thermostat (Model 9433-1)
  • UWS (“Umweltsensor” 9475)

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

Prerequisites:

  • Rademacher HomePilot
  • Rademacher DuoFern shutters, blinds, sun sensors, UWS (see above)
  • openHAB http-Binding
  • openHAB JSONPath Transformation (you will find it in openHAB “other add-ons”)

First of all you need to find out your Rademacher device ID (=DID) of every single device.
The “DID” can be found for roller shutters:
http://-your-HomePilot-IP-/v4/devices
(e.g. http://192.168.1.55/v4/devices)

The URL for sensors (closing contact, sun sensor, UWS) is:
http://-your-HomePilot-IP-/v4/devices?devtype=Sensor
(e.g. http://192.168.1.55/v4/devices?devtype=Sensor)

Depending how your Browser shows JSON data you will see something like this:

If you found the DID of your Rademacher device(s) you could use this text based config files - and change it according to your landscape:

/things/rademacher.things

Thing http:url:HomePilot1 "HomePilot1" [
    baseURL="http://192.168.1.55/",  //your HomePilot IP
    authMode="BASIC",
    ignoreSSLErrors="true",
    refresh=5,
    commandMethod="PUT",
    stateMethod="GET",
    contentType="application/json",
    timeout=3000,
    bufferSize=2048,
    delay=0
] 
{
    Channels:

        Type switch : Kueche_Abzugshaube [  // Rademacher plug  DID=27
            mode="WRITEONLY",
            commandExtension="/devices/27",  
            onValue="{\"name\":\"TURN_ON_CMD\"}",
            offValue="{\"name\":\"TURN_OFF_CMD\"}"
        ]
// -----------------------------------------------
        Type rollershutter : AZ_Rollladen_links [   //DID=46
            mode="WRITEONLY",
            commandExtension="/devices/46",  
            stopValue="{\"name\":\"STOP_CMD\"}",
            downValue="{\"name\":\"POS_DOWN_CMD\"}",
            upValue="{\"name\":\"POS_UP_CMD\"}"
        ]
        Type number : AZ_Rollladen_links#position [
            stateExtension="/v4/devices/46",
            stateTransformation="JSONPATH:$.device.statusesMap.Position",
            commandTransformation="JS:RollerShutterPositionJSON.js",
            commandExtension="/devices/46"
        ]
// -----------------------------------------------
        Type rollershutter : AZ_Rollladen_rechts [    //DID=24
            mode="WRITEONLY",
            commandExtension="/devices/24",  
            stopValue="{\"name\":\"STOP_CMD\"}",
            downValue="{\"name\":\"POS_DOWN_CMD\"}",
            upValue="{\"name\":\"POS_UP_CMD\"}"
        ]
        Type number : AZ_Rollladen_rechts#position [
            stateExtension="/v4/devices/24",
            stateTransformation="JSONPATH:$.device.statusesMap.Position",
            commandTransformation="JS:RollerShutterPositionJSON.js",
            commandExtension="/devices/24"
        ]
// -----------------------------------------------
        Type number : WC_Heizung_Battery_Percent [   // Radiator Thermostat  DID=51
            stateExtension="/v4/devices/51",  
            stateTransformation="JSONPATH:$.device.batteryStatus"
            //commandExtension="/devices/51"
        ]
        Type string : WC_Heizung_Battery_Low [
            stateExtension="/v4/devices/51",
            stateTransformation="JSONPATH:$.device.batteryLow"
            //commandExtension="/devices/51"
        ]
       Type number : WC_Heizung_Regler_Position [
            stateExtension="/v4/devices/51",
            stateTransformation="JSONPATH:$.device.statusesMap.Position",
            commandTransformation="JS:RollerShutterPositionJSON.js",
            commandExtension="/devices/51"
        ]
        Type number : WC_Heizung_actTemp [
            stateExtension="/v4/devices/51",
            stateTransformation="JSONPATH:$.device.statusesMap.acttemperatur"
            //commandExtension="/devices/51"
        ]
// -----------------------------------------------
// ******  Sensors  ******
// -----------------------------------------------
        Type string : WCFensterkontakt [   //clothing contact  DID=54
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==54)].readings.contact_state"            
        ]
        Type number : WCFensterBattery [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==54)].batteryStatus"            
        ]
        Type string : WCFensterLowBattery [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==54)].batteryLow"            
        ]
// -----------------------------------------------
        Type string : Sonnensensor [  // sun sensor DID=20
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==20)].readings.sun_detected"            
        ]
// -----------------------------------------------
        Type number : UWStemp [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==43)].readings.temperature_primary"            
        ]
// -----------------------------------------------
        Type string : UWSregen [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==43)].readings.rain_detected"            
        ]
// -----------------------------------------------
        Type number : UWSelevation [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==43)].readings.sun_elevation"            
        ]
// -----------------------------------------------
        Type number : UWSazimut [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==43)].readings.sun_direction"            
        ]
// -----------------------------------------------
        Type number : UWSwind [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==43)].readings.wind_speed"            
        ]
// -----------------------------------------------
        Type number : UWSlux [
        stateExtension="/v4/devices?devtype=Sensor",
        stateTransformation="JSONPATH:$.meters[?(@.did==43)].readings.sun_brightness"            
        ]
// -----------------------------------------------
}

/items/rademacher.items

//Rademacher Plug
Switch        Abzugshaube    	        "Abzugshaube  [%s]"  [ "Switchable" ]                           {channel="http:url:HomePilot1:Kueche_Abzugshaube"} 

//shutter
Rollershutter RollladenAZl_Strg     	"AZ Rollladen links, Steuerung"                                 {channel="http:url:HomePilot1:AZ_Rollladen_links"}
Number        RollladenAZl	            "AZ Rollladen links, Position [%d %%]"                          {channel="http:url:HomePilot1:AZ_Rollladen_links#position"}
Rollershutter RollladenAZr_Strg	        "AZ Rollladen rechts, Steuerung"                                {channel="http:url:HomePilot1:AZ_Rollladen_rechts"}
Number        RollladenAZr	            "AZ Rollladen rechts, Position [%d %%]"                         {channel="http:url:HomePilot1:AZ_Rollladen_rechts#position"}

//radiator thermostat
Number  WCheizungBattery          	    "WC Heizung Battery Percent [%d %%]"                            {channel="http:url:HomePilot1:WC_Heizung_Battery_Percent"} 
String  WCheizungLowBattery       	    "WC Heizung Battery Low"                                        {channel="http:url:HomePilot1:WC_Heizung_Battery_Low"} 
Number  WCheizungReglerPosition	        "WC Heizung Regler Position"                                    {channel="http:url:HomePilot1:WC_Heizung_Regler_Position"} 
Number  WCheizungAktTemp  	            "WC Heizung akt. Temp. [%d]"                                    {channel="http:url:HomePilot1:WC_Heizung_actTemp"} 
Number  WCheizungAktTemp_converted      "WC Heizung aktuelle Temp. converted  [%d]" 	

//clothing contact
String  WCFensterkontakt 	            "WC Fenster"                                                    {channel="http:url:HomePilot1:WC_Fensterkontakt"} 
Number  WCFensterBattery	            "WC Fenster Battery  [%d %%]"                           		{channel="http:url:HomePilot1:WCFensterBattery"} 
String  WCFensterLowBattery             "WC Fenster Low Battery"                                        {channel="http:url:HomePilot1:WCFensterLowBattery"} 

//sun sensor
String Sonnensensor		 	            "Sonnensensor meldet Sonne?"                                    {channel="http:url:HomePilot1:Sonnensensor"} 

//UWS
Number UWStemp					        "Temp Balkon [%.1f °C]"  [ "CurrentTemperature" ]               {channel="http:url:HomePilot1:UWStemp"} 
String UWSregen					        "Regnet es?"                                                    {channel="http:url:HomePilot1:UWSregen"} 
Number UWSelevation			            "Elevation (UWS) [%.1f °]"                                      {channel="http:url:HomePilot1:UWSelevation"} 
Number UWSazimut		                "Azimut (UWS) [%.1f °]"                                         {channel="http:url:HomePilot1:UWSazimut"} 
Number UWSwind                          "Wind (UWS) [%.1f m/s]"                                         {channel="http:url:HomePilot1:UWSwind"} 
Number UWSlux                           "Helligkeit (UWS)"                                              {channel="http:url:HomePilot1:UWSlux"} 

to control blinds and shutters this small js-file is needed:
/transform/RollerShutterPositionJSON.js

(function(position){
    try{
        var obj = {name: "GOTO_POS_CMD", value: parseInt(position)};
        return (JSON.stringify(obj));
    } catch(e) {
        return null;
    }
})(input)

That’s it. :slightly_smiling_face:

I would like to thank you guys here in this forum - you helped a lot to make it perfect!
@Markus_Stein @roednix @Felix_Schneider @serg_003 @Rondo @callmed24 @danil
if you see errors, typos or improvements - please let me know. I will keep this post updated.

regards,
Kai

1 Like

Thanks for the nice summary, I doubled checked my configuration and it is exactly how it looks like BUT one thing I noticed recently.
It is not possible to position my rollershutter at any other position than 0 or 100 (fully open or close). Anyone else with the same experience or any solution?
Thanks,
Br Daniel

Hi Daniel,
thanks for your feedback.

regarding your position-issue: I can not confirm this. My blinds, roller shutters and marquee can be controlled to every single position (e.g. 20%, 33%, 60%).
Is there maybe a string/number mismatch in your config?
regards, Kai

Hello, the logging is saying the following.

2022-04-01 07:59:59.733 [WARN ] [p.internal.http.HttpResponseListener] - Requesting ‘http://10.0.0.113/devices/1’ (method=‘PUT’, content=‘org.eclipse.jetty.client.util.StringContentProvider@6e705002’) failed: 400 Bad Request

Any idea, I doubt it is your mentioned string/number mismatch as the item for position is Number and item rollershutter is rollershutter. Any hint from your side how to dig deeper is appreciated.

Br Daniel

there are two items for on shutter - you are aware of, right?
E.g.:

Rollershutter Shutter1-Control    "Shutter 1 - up/down/stop control"         
Number        Shutter1-Percent    "Shutter 1 - Percentage target [%d %%]"                          {channel="http:url:HomePilot1:AZ_Rollladen_links#position"}

The rollershutter item is just for “up”, “down” and “stop”. An the number item is for the percentage-control.
Make sure that you use the number item to control the position.

The URL you are using in the things file might be wrong.
Your Log shows: Requesting ‘http://10.0.0.113/devices/1’ (method=‘PUT’, …
But it should be http://10.0.0.113/v4/devices/1’

 Type rollershutter : Shutter1-Control [
            mode="WRITEONLY",
            commandExtension="/devices/46",
            stopValue="{\"name\":\"STOP_CMD\"}",
            downValue="{\"name\":\"POS_DOWN_CMD\"}",
            upValue="{\"name\":\"POS_UP_CMD\"}"
            ]
 Type number : Shutter1-Percent [
            stateExtension="/v4/devices/46",  // <<<----- check this!
            stateTransformation="JSONPATH:$.device.statusesMap.Position",
            commandTransformation="JS:RollerShutterPositionJSON.js",
            commandExtension="/devices/46"
            ]

Please verify that the URL for Shutter1-Percent is “/v4/devices” and not just “/devices” - as shown in your log

1 Like

Dear Kai,
thank you very much for your efforts and time helping me out.

I was not aware about the different item properties and I changed it as mentioned at first. Second, I checked “stateExtension=” and I had “v4” included. BUT further checks of my setup more in detailed pointed out that the service JS was not found.

[WARN ] [.transform.SingleValueTransformation] - Transformation service JS for pattern RollershutterPositionJSON.js not found!

Problem #1 was a wrong script naming (inconsistent use of camelcase naming) but more important (shame on me :roll_eyes:),
problem #2 was that I forgot to install Javascript Transformation package after re-installation of my server weeks ago.

Now, any position between 0-100% can be requested successfully.

Br Daniel

no worries.
I am happy that you found the issue. Great! :smiley: :+1:

1 Like

I noticed that this will not work with password enabled.
Does anyone know if making it work with password will be possible?

The rademacher homepilot plugin for homebridge works with the password protection, so i wonder if something similar could be possible in oh3.

AFAIK there is no solution for password protected Homepilot available yet.
But if you go for no-password, most things are working perfectly.

yes, without password this works perfectly.

just in case someone also prefers paperui:
the code for the thing in paperui (only for rollershutter as an example):

UID: http:url:HomePilot1
label: HomePilot1
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: "true"
  baseURL: http://192.168.1.55
  delay: 0
  stateMethod: GET
  refresh: 5
  commandMethod: PUT
  contentType: application/json
  timeout: 3000
  bufferSize: 2048
channels:
  - id: WZ_R_Balkontuer
    channelTypeUID: http:rollershutter
    label: Rollershutter Channel
    description: null
    configuration:
      mode: WRITEONLY
      commandExtension: /devices/1
      stopValue: '{"name":"STOP_CMD"}'
      downValue: '{"name":"POS_DOWN_CMD"}'
      upValue: '{"name":"POS_UP_CMD"}'
  - id: WZ_R_Balkontuer#position
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      commandTransformation: JS:RollerShutterPositionJSON.js
      stateExtension: /v4/devices/1
      stateTransformation: JSONPATH:$.device.statusesMap.Position
      commandExtension: /devices/1

the channels can easily be added from the thing.
i did not yet find out how to do the transform in gui though, so this still needs to be a textfile :wink:

1 Like

Yes, sadly there is no way (at least that I am aware of) to get the password protected communication to work. I too tried some things but never managed to do it…

I just did a quick search and found this post where a small shell script is provided:

######
# Config
password="[Password]"
ip="[Homepilot IP]"
######
# You shouldn't need to change anything after this line

# Request a salt
saltrequest=$(curl --silent -X POST http://$ip/authentication/password_salt)
#echo "Saltrequest: "$saltrequest

# Extract the salt from JSON.
salt=$(echo -n $saltrequest | jq -r '.password_salt')
#echo "Salt: "$salt

# Calculate sha256 of password
hashedpassword=$(echo -n $password | sha256sum | cut -d " " -f 1)
#echo "Hashed Password: "$hashedpassword

# Concatenate the salt and hashed password
saltedpassword=$salt$hashedpassword
#echo "saltedpassword: "$saltedpassword

# Calculate sha256 of the salt+hashed password
finalpassword=$(echo -n $saltedpassword | sha256sum | cut -d " " -f 1)
#echo "Final Password: "$finalpassword

# Request the cookie
curl --silent --output /dev/null --cookie-jar - --header "Content-Type: application/json" --request POST --data '{"password":"'$finalpassword'","password_salt":"'$salt'"}' http://$ip/authentication/login | tail -n 1| awk '{print $NF}'

Maybe somebody/I can check if this works. Didn’t have time to test it yet

the shellscript seems to extract the cookie (outputs the cookie) when running. if the cookie works i can not test due to lack of programming skills.

but in principle as far as i see this seems to be the same method e.g. the homebridge plugin uses.

so probably a path to go.