mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
dectmngr: add rules in ruleng to handle DECT LED
Also remove the default DECT PIN '1234'.
This commit is contained in:
parent
075728ce3e
commit
5f36441b11
3 changed files with 90 additions and 1 deletions
|
|
@ -4,4 +4,3 @@ config dect 'global'
|
|||
|
||||
config dect 'base'
|
||||
option enable '1'
|
||||
option PIN '1234'
|
||||
|
|
|
|||
88
dectmngr/files/etc/ruleng/dect.json
Normal file
88
dectmngr/files/etc/ruleng/dect.json
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"dect_registration_started": {
|
||||
"if": [
|
||||
{
|
||||
"event": "dect.base",
|
||||
"match": {
|
||||
"event": "registration",
|
||||
"status": "started"
|
||||
}
|
||||
}
|
||||
],
|
||||
"then": [
|
||||
{
|
||||
"object": "led.dect",
|
||||
"method": "set",
|
||||
"args": {
|
||||
"state": "notice",
|
||||
"timeout": 120
|
||||
},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"dect_registration_stopped": {
|
||||
"if": [
|
||||
{
|
||||
"event": "dect.base",
|
||||
"match": {
|
||||
"event": "registration",
|
||||
"status": "stopped"
|
||||
}
|
||||
}
|
||||
],
|
||||
"then": [
|
||||
{
|
||||
"object": "led.dect",
|
||||
"method": "set",
|
||||
"args": {
|
||||
"state": "off"
|
||||
},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"dect_registration_timeout": {
|
||||
"if": [
|
||||
{
|
||||
"event": "dect.base",
|
||||
"match": {
|
||||
"event": "registration",
|
||||
"status": "timeout"
|
||||
}
|
||||
}
|
||||
],
|
||||
"then": [
|
||||
{
|
||||
"object": "led.dect",
|
||||
"method": "set",
|
||||
"args": {
|
||||
"state": "off"
|
||||
},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"dect_registration_success": {
|
||||
"if": [
|
||||
{
|
||||
"event": "dect.base",
|
||||
"match": {
|
||||
"event": "registration",
|
||||
"status": "success"
|
||||
}
|
||||
}
|
||||
],
|
||||
"then": [
|
||||
{
|
||||
"object": "led.dect",
|
||||
"method": "set",
|
||||
"args": {
|
||||
"state": "ok",
|
||||
"timeout": 5
|
||||
},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
2
dectmngr/files/etc/uci-defaults/ruleng.dect
Normal file
2
dectmngr/files/etc/uci-defaults/ruleng.dect
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
uci -q set ruleng.dect=rule
|
||||
uci -q set ruleng.dect.recipe='/etc/ruleng/dect.json'
|
||||
Loading…
Add table
Reference in a new issue