DrRSatzteil
(Thomas Lauterbach)
August 20, 2023, 9:31am
1
Hi everyone,
I’m facing a problem with the “send a WoL Packet” action in a rule. When OH is restarted the rule remains in the state UNINITIALIZED and shows the error: “Missing handler ‘network.sendWakeOnLanPacketViaIp’ for module ‘3’”.
When I disable and enable the rule again it works without problems. To me it looks like a rece condition during startup or a wrong order of things in the startup sequence but I don’t have a deep technical insight in this.
The rule is defined as follows:
configuration: {}
triggers:
- id: "1"
configuration:
command: ON
itemName: bd_player_on
type: core.ItemCommandTrigger
conditions: []
actions:
- inputs: {}
id: "3"
configuration:
config: network:pingdevice:839955dc60
type: network.sendWakeOnLanPacketViaIp
Am I doing something wrong here or might this be a bug?
rlkoshak
(Rich Koshak)
August 21, 2023, 1:37pm
2
I agree, there does seem to be a case where the Thing is coming online after the rule is loaded. The rule engine is loaded at runlevel 40 but Thing don’t get loaded until runlevel 80 so this is not unexpected. The rule should become initialized when the Thing does come online.
Please file an issue on openhab-core. How to file an Issue .
Thanks
DrRSatzteil
(Thomas Lauterbach)
August 21, 2023, 7:44pm
3
Thanks Rich, issue filed:
opened 07:43PM - 21 Aug 23 UTC
bug
I have a problem with the “send a WoL Packet” action in a rule. When OH is resta… rted the rule remains in the state UNINITIALIZED and shows the error: “Missing handler ‘network.sendWakeOnLanPacketViaIp’ for module ‘3’”.
When I disable and enable the rule again it works without problems. This seems to be due to a wrong order of things in the startup sequence. Please see my initial report and Richs answer in the community forums: https://community.openhab.org/t/wake-on-lan-rule-in-main-ui-fails-to-init/148894
The rule is defined as follows:
```
configuration: {}
triggers:
- id: "1"
configuration:
command: ON
itemName: bd_player_on
type: core.ItemCommandTrigger
conditions: []
actions:
- inputs: {}
id: "3"
configuration:
config: network:pingdevice:839955dc60
type: network.sendWakeOnLanPacketViaIp
```
## Expected Behavior
The rule should get into IDLE state after booting up OH
## Current Behavior
The rule remains in state UNINITIALIZED
## Possible Solution
Rich Koshak answered my report with the following that might be of help to find a solution: "I agree, there does seem to be a case where the Thing is coming online after the rule is loaded. The rule engine is loaded at runlevel 40 but Thing don’t get loaded until runlevel 80 so this is not unexpected. The rule should become initialized when the Thing does come online."
## Steps to Reproduce (for Bugs)
1. Create the above rule
2. Reboot OH
## Context
Rule is not working until the state has been manually fixed by disabling and enabling the rule
## Your Environment
* Version used: OH 4.0.2 - Docker version
* Environment name and version (e.g. Chrome 111, Java 17, Node.js 18.15, ...): Chrome
* Operating System and version (desktop or mobile, Windows 11, Raspbian Bullseye, ...): Ubuntu 20.04.6 LTS