Hello Rich,
thanks for this good questions.
The rules have neen generated with the NG editor unter PaperUI on an 2.5.3-1 PI system.
###############################################################################
############### openhab #####################################################
###############################################################################
Ip = 192.168.1.9
Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 4.19.97-v7+
Platform = Raspberry Pi 3 Model B Plus Rev 1.3
Uptime = 1 day(s). 4:14:52
CPU Usage = 5.2% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
CPU Load = 1m: 0.41, 5m: 0.31, 15m: 0.22
Memory = Free: 0.16GB (17%), Used: 0.78GB (83%), Total: 0.95GB
Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB
Root = Free: 10.43GB (76%), Used: 3.27GB (24%), Total: 14.32GB
Updates = 5 apt updates available.
Sessions = 1 session(s)
Processes = 109 running processes of 32768 maximum processes
###############################################################################
Welcome to __ _____ ____ _
____ ____ ___ ____ / / / / | / __ )(_)___ _____
/ __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ / / __ `/ __ \
/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ / / /_/ / / / /
\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/_/\__,_/_/ /_/
/_/
openHAB 2.5.3-1 (Release Build)
The log filelooks like this:
2020-04-10 17:10:31.165 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_Strom changed from 67.680 W to 67.730 W
2020-04-10 17:10:31.182 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_LetzteAktualisierung changed from 2020-04-10T17:10:19.000+0200 to 2020-04-10T17:10:31.000+0200
2020-04-10 17:10:31.207 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1377 s to 1389 s
2020-04-10 17:10:43.463 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_Strom changed from 67.730 W to 0.000 W
2020-04-10 17:10:43.487 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_LetzteAktualisierung changed from 2020-04-10T17:10:31.000+0200 to 2020-04-10T17:10:44.000+0200
2020-04-10 17:10:43.507 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1389 s to 1401 s
2020-04-10 17:10:49.772 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1401 s to 1408 s
2020-04-10 17:11:14.073 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_Gesamtverbrauch changed from 0.0088 kWh to 0.0096 kWh
2020-04-10 17:11:14.110 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_SchnitteLetzteMin changed from 17.337 W to 47.366 W
2020-04-10 17:11:14.115 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_SchnittVorletzteMin changed from 0.000 W to 17.337 W
2020-04-10 17:11:14.117 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_SchnittVor3Min changed from 5.407 W to 0.000 W
2020-04-10 17:11:14.119 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_LetzteAktualisierung changed from 2020-04-10T17:10:44.000+0200 to 2020-04-10T17:11:14.000+0200
2020-04-10 17:11:14.121 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1408 s to 1432 s
2020-04-10 17:11:20.817 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1432 s to 1439 s
2020-04-10 17:11:27.066 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1439 s to 1445 s
2020-04-10 17:11:42.352 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1445 s to 1460 s
2020-04-10 17:11:51.635 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1460 s to 1469 s
2020-04-10 17:11:57.963 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1469 s to 1476 s
2020-04-10 17:12:13.233 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_SchnitteLetzteMin changed from 47.366 W to 0.000 W
2020-04-10 17:12:13.263 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_SchnittVorletzteMin changed from 17.337 W to 47.366 W
2020-04-10 17:12:13.278 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_SchnittVor3Min changed from 0.000 W to 17.337 W
2020-04-10 17:12:13.285 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Meter1_LetzteAktualisierung changed from 2020-04-10T17:11:14.000+0200 to 2020-04-10T17:12:13.000+0200
2020-04-10 17:12:13.289 [vent.ItemStateChangedEvent] - Shelly25RelaySHSW25_Device_Laufzeit changed from 1476 s to 1491 s
The rule in the automation_rules.json file under /var/lib/openhab2/jsondb looks like this:
“85c6228a-ed58-4f90-94c1-92b3abc00d03”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “an item state is updated”,
“description”: “This triggers the rule if an item state is updated (even if it does not change).”,
“configuration”: {
“itemName”: “Shelly25RelaySHSW25_Relay1_Betrieb”,
“state”: “ON”
},
“type”: “core.ItemStateUpdateTrigger”
}
],
“conditions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “Shelly25RelaySHSW25_Meter1_Strom”,
“state”: 5.0,
“operator”: “\u003c”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “Shelly25RelaySHSW25_Relay1_Betrieb”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “85c6228a-ed58-4f90-94c1-92b3abc00d03”,
“name”: “TEST Shelly 2.5”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “TEST Shelly 2.5”
}
},
The screenshots from the rules values are added.
I hope I have now added all information that is needed to brinf to rule ti run
BR & Thanks
Scheuerer