2021-09-16 09:39:50.866 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'zoe.items'
2021-09-16 09:39:51.111 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-5' failed: The name 'ZOE_current_battery' cannot be resolved to an item or type; line 54, column 7, length 19 in zoe
2021-09-16 09:39:51.266 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'switchoffwallboxzoe-1' failed: The name 'ZOE_charge100' cannot be resolved to an item or type; line 5, column 7, length 13 in switchoffwallboxzoe
2021-09-16 09:39:51.269 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-3' failed: The name 'ZOE_position_north' cannot be resolved to an item or type; line 28, column 65, length 18 in zoe
2021-09-16 09:39:51.275 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-3' failed: The name 'ZOE_position_north' cannot be resolved to an item or type; line 28, column 65, length 18 in zoe
2021-09-16 09:39:52.116 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'zoe.items'
2021-09-16 09:39:52.220 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-5' failed: The name 'ZOE_current_battery' cannot be resolved to an item or type; line 54, column 7, length 19 in zoe
2021-09-16 09:40:00.199 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-4' failed: The name 'ZOE_distance' cannot be resolved to an item or type; line 42, column 8, length 12 in zoe
2021-09-16 09:40:24.026 [WARN ] [p.internal.http.HttpResponseListener] - Requesting 'http://10.0.1.46/zoe/index.php' (method='GET', content='null') failed: Total timeout 3000 ms elapsed
2021-09-16 09:42:03.710 [INFO ] [nding.http.internal.HttpThingHandler] - Using the secure client for thing 'http:url:zoe'.
Items without channels stay the same as before.
Your errors indicate that your items cannot be found.
If you want to use my definitions, you need to name your thing in a proper way:
2021-09-16 13:07:41.622 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'zoe-1' failed: An error occurred during the script execution: array element type mismatch in zoe
code for rule:
// Triggers:
// - When ZOE_ac_start received command ON
// context: zoe-1
var String URL = 'http://myhome/zoe/index.php?acnow'
val String curlcommand = "curl@@-d@@" + "@@POST@@" + URL +"@@-H@@Content-Type:application/json@@-H@@accept"
var String jsonacnow = executeCommandLine(curlcommand, 1000)
//Authorization Header for Basic Authentication: https://www.base64encode.org/
var Boolean MessageB = false
rule "Klimatisierung starten"
when
Item ZOE_ac_start received command ON
then
var String URL = 'http://10.0.1.46/zoe/index.php?acnow'
val String curlcommand = "curl@@-d@@" + "@@POST@@" + URL +"@@-H@@Content-Type:application/json@@-H@@accept"
var String jsonacnow = executeCommandLine(curlcommand, 1000) //executes the curl-string
end
rule "Laden starten"
when
Item ZOE_charge_start received command ON
then
var String URL = 'http://10.0.1.46/zoe/index.php?chargenow'
val String curlcommand = "curl@@-d@@" + "@@POST@@" + URL +"@@-H@@Content-Type:application/json@@-H@@accept"
var String jsoncharge = executeCommandLine(curlcommand, 1000) //executes the curl-string
end
rule "Zoe Home"
when
Item ZOE_position_north changed or
Item ZOE_position_east changed
then
val PointType home_location = new PointType(new DecimalType(47.215), new DecimalType(9.703)) //hier die Koordinaten deines Standortes eintragen
val PointType Zoe_location = new PointType(new DecimalType(ZOE_position_north.state.toString), new DecimalType(ZOE_position_east.state.toString))
val int distance = Zoe_location.distanceFrom(home_location).intValue()
ZOE_coordinates.postUpdate(Zoe_location) //Update für Mapview
if ( distance < 50) { //Abstand in Metern vom Standort
ZOE_Home.postUpdate(ON)
} else {
ZOE_Home.postUpdate(OFF)
}
end
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")
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?
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.
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
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