This example demonstrates the ability of Avior to perform REST request to any HTTP(S) server.
WiFi and/or PLMN data connection must be enabled.
No users.
Rule 001 is triggered on main power supply changes.
Condition: Main Supply not available.
Make an HTTP POST request to "www.myserver.com/infoAvior" sending plain text "power is lost".
– HTTPpost ↯ Main power supply ✛ Main Supply - Value = 0 ✛ ✛ ✛ ✛ > AT#HTTP=POST,www.myserver.com/infoAvior,"power is lost" > > > >
Rule 002 is triggered at 12:00AM.
Condition: today is Wednesday.
Make an HTTP PUT request to "www.myserver.com/SendFile" sending the system LOG file.
– HTTPput ↯ Scheduled at TIME [hh:mm] 12:00 ✛ Device - Current Weekday = 3 ✛ ✛ ✛ ✛ > AT#HTTP=PUT,www.myserver.com/SendFile,D:SYSTEM/system.log > > > >
Rule 003 is triggered on output 2 changes.
Condition: output 2 active (on out activation).
Make HTTP GET request to "https://www.test.com/GetCommand".
Server can use custom header "X-command"
to send commands to Avior
– HTTPget ↯ Output 2 ✛ Output 2 - Value = 1 ✛ ✛ ✛ ✛ > AT#HTTP=GET,https://www.test.com/GetCommand,"" > > > >
Rule 004 is triggered by Pulse Counter Input 1.
Condition: accumulated pulses greater than 100.
Make an HTTP DELETE request to "https://123.111.98.21:81/delete.php".
– HTTPdelete ↯ Pulse Counter Input 1 ✛ Pulse Counter 1 - Total > 100 ✛ ✛ ✛ ✛ > AT#HTTP=DELETE,https://123.111.98.21:81/delete.php,"" > > > >