Event Reference¶
Here’s a list of all available events that may be triggered. Please be aware that only some will trigger, depending on what settings you have selected, and what plugins you have active.
Internal (core) events¶
Event |
Example |
---|---|
|
on DHT11Outside#Temperature>20 do
GPIO,2,1
endon
|
|
on System#Wake do
GPIO,15,1
endon
|
|
on System#Boot do
GPIO,2,1
timerSet,1,30
endon
|
|
on System#Sleep do
GPIO,2,0
endon
|
|
on MQTT#Connected do
Publish,%sysname%/status,First message!
endon
|
|
on MQTT#Disconnected do
Reboot
endon
|
|
on MQTTimport#Connected do
Publish,%sysname%/status,MQTT Import is now operational
endon
|
|
on MQTTimport#Disconnected do
Reboot
endon
|
|
on WiFi#Connected do
SendToHTTP,url.com,80,/report.php?hash=123abc456&t=[temp2#out]
endon
|
|
on WiFi#ChangedAccesspoint do
Publish,%sysname%/status,AP changed
endon
|
|
on WiFi#ChangedWiFichannel do
Publish,%sysname%/status,channel changed
endon
|
|
on WiFi#APmodeEnabled do
... // Some command
endon
|
|
on WiFi#APmodeDisabled do
Publish,%sysname%/status,AP disabled
endon
|
|
on Login#Failed do
Publish,%sysname%/warning,Intruder alert!
endon
|
|
on Time#Initialized do
Publish,%sysname%/Time,%systime%
endon
|
|
on Time#Set do
Publish,%sysname%/Time,%systime%
Publish,%sysname%/NTP,Updated time at: %systime%
endon
|
|
on Rules#Timer=1 do
GPIO,2,1
endon
|
|
on Clock#Time=All,12:00 do //will run once a day at noon
GPIO,2,1
endon
on Clock#Time=All,**:30 do //will run half past every hour
GPIO,2,1
endon
on Clock#Time=All,%sunrise% do //will run at sunrise (%sunset% is also available)
GPIO,2,1
endon
|
|
on System#Boot do
Monitor GPIO,15
endon
on GPIO#15=0 do
if [Plugin#GPIO#Pinstate#13]=0
// do something
endif
endon
on GPIO#15=1 do
if [Plugin#GPIO#Pinstate#13]=1
// do something
endif
endon
|
Plugin based events¶
Besides the internal events there’s also plugin specific events. These are listed here below.
P081 Generic - CRON¶
Event |
Example |
---|---|
|
on Cron#foo do
GPIO,2,1 //LED on
endon
|
P082 Position - GPS¶
Event |
Example |
---|---|
|
on GPS#GotFix do
GPIO,2,1 //LED on
endon
|
|
on GPS#LostFix do
GPIO,2,0 //LED off
endon
|
|
on GPS#travelled do
LogEntry,'Travelled %eventvalue% meter'
endon
|