TP-Link Hs110 / NG-Rule Issue to switch off Power Plug

Hello all,

I have newerdays some issue with a NG rule and with a new TP-Link power plug
Meanwhile I’m using 12 from the powerplugs HS110 (with power) to control electronics at home.
So I have buyed another two oft hem to power off the Qi Charger form y mobile, when it has been fully charged.
This works so far with a personal setuped NG rule for my iPad very well.

But now, not with a new HS110 plug fort he Qi Charger.

Here is my config:

The systems runs on a Rasberry PI 3 B+

Openhab I‘m using the latest testversion from the 2.5 Branch, RC1, all updates a their.

Binding I have had the TP-Link 2.5 Binding, but since yesterday I have the

Beta 30-8-2019 installed, with the same problem as before.

I can manage the plugs all manual, or over a rule manual, but not the two new once, with have the same latest firmware as all the other 12. It seems to me, that the power value is not given back, that the plug should be switch off.

Everything in managed by the NG rule under Paper UI,

and should work like that:

When…….a item receives an update……….the switch state is ON from the given item

Then……send a item a command, that the switch state should be OFF fron the given item

BUT ONLY……when the POWER from the given item is lower (<1) one. (this should be the power from the plug in idle mode)

Have you any idea what could be the problem???

The log shows me, that the rule it self is running every 30 sec to check the value, but is now switching off the plug.

Also the power is below 1 Watt and it should be switched off.

As told you before, it works perfect with my bike charger or with the iPad charger.

2019-12-31 10:32:56.613 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_power changed from 0.708 W to 0.637 W

2019-12-31 10:32:56.616 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_voltage changed from 231.059 V to 230.728 V

2019-12-31 10:33:26.894 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_power changed from 0.637 W to 0.631 W

2019-12-31 10:33:26.899 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_voltage changed from 230.728 V to 230.323 V

2019-12-31 10:33:57.086 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_rssi changed from -53 dBm to -54 dBm

2019-12-31 10:33:57.089 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_power changed from 0.631 W to 0.639 W

2019-12-31 10:33:57.091 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_voltage changed from 230.323 V to 231.017 V

2019-12-31 10:34:27.244 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_rssi changed from -54 dBm to -53 dBm

2019-12-31 10:34:27.247 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_power changed from 0.639 W to 0.723 W

2019-12-31 10:34:27.249 [vent.ItemStateChangedEvent] - tplinksmarthome_hs110_7005DE_voltage changed from 231.017 V to 230.93 V

2019-12-31 10:32:56.569 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: RUNNING

2019-12-31 10:32:56.574 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: IDLE

2019-12-31 10:33:26.791 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: RUNNING

2019-12-31 10:33:26.800 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: IDLE

2019-12-31 10:33:57.018 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: RUNNING

2019-12-31 10:33:57.021 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: IDLE

2019-12-31 10:34:27.207 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: RUNNING

2019-12-31 10:34:27.210 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: IDLE

2019-12-31 10:34:57.285 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: RUNNING

2019-12-31 10:34:57.290 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: IDLE

2019-12-31 10:35:27.475 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: RUNNING

2019-12-31 10:35:27.479 [.event.RuleStatusInfoEvent] - 09577849-a8fc-4fd1-9abf-a49ddc5eb261 updated: IDLE

So it would be very kindfull if you could help, the solve this issue.

Best regards.
Jochen Scheuerer

PS: I have NO programing skills, so I cannot develop inside the configs from Openhap rules.

Why not use 2.5 stable version? That test version is no longer current.

1 Like

From your information I can’t determine if the plugs don’t work as expected or if it is the rule that doesn’t work? Please give some detailed information on what works and what doesn’t for the plugs (Not if the rule works or not, that is in a first step irrelevant). And if it doesn’t work please check the logs? If we can conclude the plugs work as expected (give the right information) than the next step would be to look into the rules. (Can you use code fences (```) around the log comments).

Thanks for the feedback so far.
Now, 2.5 offical is running.

What is working?
Working are all rules for two differnet (also HW Version) HS110 over those I switch off the plug off aber the Power from the plug is less the 1W. They work as expected.

What is working working?
Not workings are all NEW rules, wich I create with NG rules. I double cheked now with old an new plugs now, that every rule I create to work in the same way as the working one, will not work.

If you need more logs, the provide me the steps that I need to do to generate the logs for you.

BR
Jochen

@5iver are you the NGRE guru here?

We’ve been without electricity for a couple days and things are just coming up now… but I’ll try!

@scheuerer, it is not clear if your problem is with your devices or in the rules. If the rules are the same or similar to others that are working, I’d start investigating the devices. Do you have Items created for them and are the Items updating with values correctly?

In case it is an automation issue, please post the JSON file (found in $OPENHAB_USERDATA/jsondb/automation_rules.json), or a portion of it, that contains your rules and provide the name of a working rule and a name of a similar non-working rule.

And welcome to the forum!

1 Like

Thanks for your Help.

First off all, the Values in PaperUI Control ar in the CassicUI works very well.
I can switch off and on, and also all values are updatet every 30 sec with e.v. Power etc.

One of the Rules wich works fine is the:

“23896a53-9ce3-4b69-b94d-8d0db7c00c56”

The rule which I have now serveral time geneatet is the:

“9b458ad1-18bd-4ad1-980b-bd98e3a8fdf1”

Conditions are all the same:
“When Switch in On, Switch it OFF, when less then 1.0 Watt are used and not 0.0”

Here comes the Automation file:

{
“19519e2f-4b48-4099-9897-3cae0b247d52”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “23:30”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“state”: “ON”,
“operator”: “\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “19519e2f-4b48-4099-9897-3cae0b247d52”,
“name”: “Adventsstern AUS abends”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Adventsstern AUS abends”
}
},
“07a4cc8c-e818-44d8-a65e-e8b0ef2e8378”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “16:30”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“state”: “OFF”,
“operator”: “\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “07a4cc8c-e818-44d8-a65e-e8b0ef2e8378”,
“name”: “Adventsstern AN abends”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Adventsstern AN abends”
}
},
“dadf90e0-f545-4839-a9b8-a19ca9f1cba6”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “06:00”
},
“type”: “timer.TimeOfDayTrigger”
},
{
“id”: “2”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “12:00”
},
“type”: “timer.TimeOfDayTrigger”
},
{
“id”: “3”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “18:00”
},
“type”: “timer.TimeOfDayTrigger”
},
{
“id”: “4”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “00:00”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “5”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_FC3C5F_switch”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “dadf90e0-f545-4839-a9b8-a19ca9f1cba6”,
“name”: “Jochen Zimmer Steckdose 4x am Tag einschalten”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“6c388b5d-1cc9-477d-963e-1d67737a3eea”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “05:48”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_4_color_temperature”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “3”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_4_color”,
“command”: 10.0
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “6c388b5d-1cc9-477d-963e-1d67737a3eea”,
“name”: “HUE4 anschalten um 05:48”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“5104b8c6-de14-4813-a1bb-96ca35e3dacd”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “05:46”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_2_color_temperature”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “3”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_2_color”,
“command”: 10.0
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “5104b8c6-de14-4813-a1bb-96ca35e3dacd”,
“name”: “HUE2 anschalten um 05:46”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“eaffc5bc-3ffa-41c2-89a1-6cd625eee9ac”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “an item state is updated”,
“description”: “Test 1”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_911088_switch”,
“state”: “ON”
},
“type”: “core.ItemStateUpdateTrigger”
}
],
“conditions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “an item has a given state”,
“description”: “Test3value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_911088_power”,
“state”: 5.0,
“operator”: “\u003c\u003d”
},
“type”: “core.ItemStateCondition”
},
{
“inputs”: {},
“id”: “4”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_911088_power”,
“state”: 0.0,
“operator”: “!\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Test2”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_911088_switch”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “eaffc5bc-3ffa-41c2-89a1-6cd625eee9ac”,
“name”: “Fahrradnetzteil nach Aufladen automatisch abschalten”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Schaltet Netzteil bei kleiner 10W wieder aus”
}
},
“f74794c3-54a9-4ed8-940b-300f4279e0b7”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “1”,
“label”: “enables or disable rules”,
“description”: “Enables or disables a rule or a group of rules specified by their UIDs.”,
“configuration”: {
“enable”: false,
“ruleUIDs”: [
“66640f5f-1cd6-4968-9c9d-53fea96e3140”,
“19519e2f-4b48-4099-9897-3cae0b247d52”,
“07a4cc8c-e818-44d8-a65e-e8b0ef2e8378”,
“aa5f8886-0948-4500-9b8b-ee75e63ed0f5”
]
},
“type”: “core.RuleEnablementAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “f74794c3-54a9-4ed8-940b-300f4279e0b7”,
“name”: “Adventsstern Rule AUS”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“9b458ad1-18bd-4ad1-980b-bd98e3a8fdf1”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “Testversuch für Charger Netzteil”,
“description”: “Testversuch für Charger Netzteil”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_7005DE_switch”,
“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”: “tplinksmarthome_hs110_7005DE_power”,
“state”: “1.0”,
“operator”: “\u003c”
},
“type”: “core.ItemStateCondition”
},
{
“inputs”: {},
“id”: “4”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_7005DE_power”,
“state”: “0.0”,
“operator”: “!\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “Testversuch für Charger Netzteil”,
“description”: “Testversuch für Charger Netzteil”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_7005DE_switch”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “9b458ad1-18bd-4ad1-980b-bd98e3a8fdf1”,
“name”: “Testversuch für Charger Netzteil”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Testversuch für Charger Netzteil”
}
},
“066c419b-32f7-48a4-b1ae-a31e309f09bb”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “05:50”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_1_color_temperature”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “3”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_2_color_temperature”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “4”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_3_color_temperature”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “5”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_4_color_temperature”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “066c419b-32f7-48a4-b1ae-a31e309f09bb”,
“name”: “HUE alle ausschalten um 05:50”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“ebcda1b7-ae81-4512-bcd1-11e83998327d”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “2”,
“label”: “a trigger channel fires”,
“description”: “React on events from a trigger channel of a thing.”,
“configuration”: {
“event”: “Off”,
“channelUID”: “hue:0820:00178875a637:4:dimmer_switch_event”
},
“type”: “core.ChannelEventTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “1”,
“label”: “enables or disable rules”,
“description”: “Enables or disables a rule or a group of rules specified by their UIDs.”,
“configuration”: {
“enable”: false,
“ruleUIDs”: [
“21d372d4-88c9-466a-bd34-ff36dac80615”,
“5104b8c6-de14-4813-a1bb-96ca35e3dacd”,
“ae93513b-05d3-43bb-b722-07364bb8d2f5”,
“6c388b5d-1cc9-477d-963e-1d67737a3eea”
]
},
“type”: “core.RuleEnablementAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “ebcda1b7-ae81-4512-bcd1-11e83998327d”,
“name”: “HUE Lampe Rule AUSSCHALTEN”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“ae93513b-05d3-43bb-b722-07364bb8d2f5”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “05:47”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_3_color_temperature”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “3”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_3_color”,
“command”: 10.0
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “ae93513b-05d3-43bb-b722-07364bb8d2f5”,
“name”: “HUE3 anschalten um 05:47”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“e7946271-1285-4a60-afb1-f6c980b06538”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “2”,
“label”: “an item receives a command”,
“description”: “This triggers the rule if an item receives a command.”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_7005DE_switch”,
“command”: “ON”
},
“type”: “core.ItemCommandTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “1”,
“label”: “enables or disable rules”,
“description”: “Enables or disables a rule or a group of rules specified by their UIDs.”,
“configuration”: {
“enable”: true,
“ruleUIDs”: [
“21d372d4-88c9-466a-bd34-ff36dac80615”,
“5104b8c6-de14-4813-a1bb-96ca35e3dacd”,
“ae93513b-05d3-43bb-b722-07364bb8d2f5”,
“6c388b5d-1cc9-477d-963e-1d67737a3eea”
]
},
“type”: “core.RuleEnablementAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “e7946271-1285-4a60-afb1-f6c980b06538”,
“name”: “HUE Lampen Rule EINSCHALTEN”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“21d372d4-88c9-466a-bd34-ff36dac80615”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “05:45”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_1_color_temperature”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “4”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “hue_0210_00178875a637_1_color”,
“command”: 10.0
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “21d372d4-88c9-466a-bd34-ff36dac80615”,
“name”: “HUE1 anschalten um 05:45”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“aa5f8886-0948-4500-9b8b-ee75e63ed0f5”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “06:00”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“state”: “OFF”,
“operator”: “\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “aa5f8886-0948-4500-9b8b-ee75e63ed0f5”,
“name”: “Adventsstern AN morgens”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Adventsstern AN morgens”
}
},
“67f0c2a4-6305-4116-a3d7-b14fd6b19d5f”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “1”,
“label”: “enables or disable rules”,
“description”: “Enables or disables a rule or a group of rules specified by their UIDs.”,
“configuration”: {
“enable”: true,
“ruleUIDs”: [
“07a4cc8c-e818-44d8-a65e-e8b0ef2e8378”,
“aa5f8886-0948-4500-9b8b-ee75e63ed0f5”,
“66640f5f-1cd6-4968-9c9d-53fea96e3140”,
“19519e2f-4b48-4099-9897-3cae0b247d52”
]
},
“type”: “core.RuleEnablementAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “67f0c2a4-6305-4116-a3d7-b14fd6b19d5f”,
“name”: “Adventsstern Rule AN”,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“23896a53-9ce3-4b69-b94d-8d0db7c00c56”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “5”,
“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”: “tplinksmarthome_hs110_FC3C5F_switch”,
“state”: “ON”
},
“type”: “core.ItemStateUpdateTrigger”
}
],
“conditions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “Ausschalten bei 0,5 Watt”,
“description”: “Bei 0,5 Watt abschalten”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_FC3C5F_power”,
“state”: 1.0,
“operator”: “\u003c”
},
“type”: “core.ItemStateCondition”
},
{
“inputs”: {},
“id”: “4”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_FC3C5F_power”,
“state”: 0.0,
“operator”: “!\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “Schaltet Steckdose Aus”,
“description”: “Ausschalten\nAusschalten”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_FC3C5F_switch”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “23896a53-9ce3-4b69-b94d-8d0db7c00c56”,
“name”: “Steckdose im Jochen Zimmer abschalten bei weniger als 0,5 Watt”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Schaltet Steckdose aus”
}
},
“66640f5f-1cd6-4968-9c9d-53fea96e3140”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “it is a fixed time of day”,
“description”: “Triggers at a specified time”,
“configuration”: {
“time”: “08:00”
},
“type”: “timer.TimeOfDayTrigger”
}
],
“conditions”: [
{
“inputs”: {},
“id”: “3”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“state”: “ON”,
“operator”: “\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_2455A9_switch”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “66640f5f-1cd6-4968-9c9d-53fea96e3140”,
“name”: “Adentssstern AUS morgens”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Adentssstern AUS morgens”
}
}
}

Please use code fences!

OK… if the hardware and binding are setup properly, it helps in pointing towards to a rule configuration or automation issue. I’m quite certain you are experiencing this issue…

Compare the states in the conditions of both rules. The rule that is working has…

“conditions”: [
    {
        “inputs”: {},
        “id”: “3”,
        “label”: “Ausschalten bei 0,5 Watt”,
        “description”: “Bei 0,5 Watt abschalten”,
        “configuration”: {
        “itemName”: “tplinksmarthome_hs110_FC3C5F_power”,
        “state”: 1.0,
        “operator”: “\u003c”
    },
    “type”: “core.ItemStateCondition”
},

But the one that is not working has…

“conditions”: [
    {
        “inputs”: {},
        “id”: “3”,
        “label”: “an item has a given state”,
        “description”: “Compares the item state with the given value”,
        “configuration”: {
        “itemName”: “tplinksmarthome_hs110_7005DE_power”,
        “state”: “1.0”,
        “operator”: “\u003c”
    },
    “type”: “core.ItemStateCondition”
},

Try removing the non-working rule, create it again all in one go without editing it, and see if it will run properly.

Please! You can go back and edit your post to add them in. Just add triple ticks (```) on the line before and after.

1 Like

Yes, you are right with the “” Problem. It there.
But now, I createdagain and used the trick, and cecked the file itself.
IT IS NOT WORKING…

Here the config:
“9b458ad1-18bd-4ad1-980b-bd98e3a8fdf1”: {
“class”: “org.openhab.core.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “Testversuch für Charger Netzteil”,
“description”: “Testversuch für Charger Netzteil”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_7005DE_switch”,
“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”: “tplinksmarthome_hs110_7005DE_power”,
“state”: 1.0,
“operator”: “\u003c”
},
“type”: “core.ItemStateCondition”
},
{
“inputs”: {},
“id”: “4”,
“label”: “an item has a given state”,
“description”: “Compares the item state with the given value”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_7005DE_power”,
“state”: 0.0,
“operator”: “!\u003d”
},
“type”: “core.ItemStateCondition”
}
],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “Testversuch für Charger Netzteil”,
“description”: “Testversuch für Charger Netzteil”,
“configuration”: {
“itemName”: “tplinksmarthome_hs110_7005DE_switch”,
“command”: “OFF”
},
“type”: “core.ItemCommandAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “9b458ad1-18bd-4ad1-980b-bd98e3a8fdf1”,
“name”: “Testversuch für Charger Netzteil”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Testversuch für Charger Netzteil”
}
},

BR
Jochen

It looks like your new rule has 2 conditions, while the other rules had 1 condition. But I had some problem reading the rule as it's missing code fences, Is there a reason you used 2 conditions here?

Hello,

Booth condition have eben in the old Rule.
Lass than 1.0 Watt and 0.0 Watt.
I noticed 1/2 a year, that it works only in combination.
Anyhow removing has also failed. So the value with 1.0.

The fence Story I cannot Unterstand.

Br
Jochen

Continuing the discussion from TP-Link Hs110 / NG-Rule Issue to switch off Power Plug:

Hello all,

meanwhile, after a half day work, was now abler so solve the problem.

  • I took the backup from several months with OH 2.4 and copyed on an empty SD Card
  • Booted to old version
  • Serveral meanwhile created rules and the two new TP-Link plugs where missing.
  • So I added the TP-Libk plug
  • And added a new rule for switch off the plug when it has under 1 Watt power

–> So the 2.4 Version was working again with the new rule.
(Yes, tknown bug with the “” inthe values is there an can be solved as already know.

–> So I updated the 2.4 to 2.5.0 as stable version

  • I have had the generate all the missing rules new, which dos thing only on a given time
  • I added testwise a rule with the “with the lower that 1 Watt” conditions.
  • used the trick with saving again

–> YES, it is still working…

OK, what does this mean? The problems seems to be away from makeing an update from stable 2.4 to stable 2.5.0

–> As the binding has some changes in the I have had to delete all my TP-Links plugs and haveto add them new, include the assigment from allthe items.

Also here some issue come up that Things have had walos without types and some with type (kWh)
I delete the once without the kWh and generate them new.
Now all of the TP-Libks have the right values in Cassic UI.
So, what is the lesson learnd now?

Do not all the time try to update from a stablesystemto the next Testrelease to hope that the new
NG rule contains selecting day single for doing switch on and of from plus.

All in all 3 days work overnew year, but final I got what I want.

BR
Jochen

PS: @hilbrand You needto have two conditions inplace, to one, with 1.0 Watt conditions, and also one with 0.0 Watt to switch off in the “only if section”.Otherwise it will now work for me.

Thanks to all for the nice communication.

2 Likes