Http Binding to get Renault Zoe status

Not sure if the command is right, as the car is doing nothing

// Triggers:
// - When ZOE_ac_start received command ON

// context: zoe-1
executeCommandLine(Duration.ofSeconds(5), "curl","-d","POST","http://10.0.1.46/zoe/index.php?acnow","-H","Content-Type:application/json","-s","-H")

The Renault API server had a lot of issues in the last few days, maybe it is down again. I tested my ZOE a few minutes ago and it did nothing, too.

Usually you donā€™t have to call the index.php, just call the ?acnow command.

Always check the Renault App first for testing: if the app does nothing, the script canā€™t work as it is using the same api calls.

Edit: also you have commented out the trigger, so this wonā€™t work in either case :slight_smile:

The input from the rules file looks like this:

rule "Klimatisierung starten"
when
Item ZOE_ac_start received command ON
then
executeCommandLine(Duration.ofSeconds(5), "curl","-d","POST","http://10.0.1.46/zoe/index.php?acnow","-H","Content-Type:application/json","-s","-H")
end

in the web gui under rules it is shown as this:

// Triggers:
// - When ZOE_ac_start received command ON

// context: zoe-1
executeCommandLine(Duration.ofSeconds(5), "curl","-d","POST","http://10.0.1.46/zoe/index.php?acnow","-H","Content-Type:application/json","-s","-H")

bug?

Youā€™re right, the trigger is not working therefore?

I donā€™t know, put a logInfo in the then part to find out.

LogInfo entry not in the logfile, therefore trigger is not workingā€¦
strange. right in the rules file, but wrong in the gui and not working

All you need is a switch and a simple rule:

Switch ZOE_ac_start "Klimatisierung starten []"

rule "Klimatisierung starten"
when
	Item ZOE_ac_start received command ON
then
    executeCommandLine(Duration.ofSeconds(5), "curl","-d","POST","https://zoe.yxyxyxyxyxyxy.net/?acnow","-H","Content-Type:application/json","-s","-H","authorization:Basic ababababababababab")
end

Again, the Renault servers have issues sometimes, it may not work for a couple of days and always check the MyRenailt App first before doing some testing in openHAB.

Something seems to be different in OH3.

When I enter the rule by hand in GUI, the Code looks like

triggers:
  - id: "1"
    configuration:
      itemName: ZOE_ac_start
      command: ON
    type: core.ItemCommandTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      type: application/vnd.openhab.dsl.rule
      script: >-
        executeCommandLine(Duration.ofSeconds(5),
        "curl","-d","POST","http://10.0.1.46/zoe/index.php?acnow","-H","Content-Type:application/json","-s","-H")

    type: script.ScriptAction

but is also not being triggered by the button.

but I will keep looking into it. The renault app is responding, the ac start can be triggered by app, wich let me assume that script is not working.

After rebooting the PI and the openhab service, Iā€™m getting the following error in the log (for the rule in the rules file from you)

2021-09-17 09:49:03.107 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-1' failed: An error occurred during the script execution: index=1, size=1 in zoe

same for the next rule

2021-09-17 09:50:00.662 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-4' failed: An error occurred during the script execution: Couldn't invoke 'assignValueTo' for feature JvmVoid:  (eProxyURI: zoe.rules#|::0.2.3.2.0.1.0.0::0::/1) in zoe

everything seems very different

Just use a rules file like in openHAB2.
If you want to use MainUI to create the rules, then yes, it is different.

Ok, thanks

Ii tested again this morning, the Renault servers seem to be working again, and the rule from above

worked fine.

for me as well, thanks for your support. Now itā€™s working flawlessly.
ā€¦ but there is a bug as you mentioned. after changing the rules you need to restart openhab, not everytime the rule change will be successfully activated

I would not call this a bug: only in rare instances openHAB needs to be restarted to pick up changes, mostly if item names are changed.