This example shows how to append lines to the cloud SWAP AREA available for each device.
The content remains available until 11:59 pm then is overwritten starting a new period.
Rule 001 triggered daily at 23:59.
No conditions are set.
Overwrites the contents of the swap area by sending a header row.
When current time is 23:590 .
A PUT request is made to rewrite the swap area of the device gxl0 which has as password 0000.
• A11 Name assigned to the analog input 1
• A21 Name assigned to the analog input 2
– PutSwapArea
↯ Scheduled at TIME [hh:mm] 23:59
✛
✛
✛
✛
✛
> at#HTTP=PUT,http://www.mobikey.eu/swap/gxl0/pwd/0000,"DAY,TIME,$A11,$A21"
>
>
>
>
Rule 002 triggered hourly.
No conditions are set.
A line with date, time and data relating to analog inputs is appended to swap area.
To ignore a time digit use the wildcard *.
Here the time matches when minutes are 00 ignoring all other digits.
It means every hour at 00.
A POST request is made to append content to the swap area of the device gxl0 which has as password 0000.
• D14 Current date
• D15 Current time
• A12 Average value of analog input 1
• A16 Measurement unit for analog input 1
• A22 Average value of analog input 2
• A26 Measurement unit for analog input 2
– PostSwapArea
↯ Scheduled at TIME [hh:mm] **:00
✛
✛
✛
✛
✛
> at#HTTP=POST,http://www.mobikey.eu/swap/gxl0/pwd/0000,"$D14,$D15,$A12 $A16,$A22 $A26"
>
>
>
>
The content of the swap area is visible from avior.webadmin.mobi and retrieved with the API call
http://www.mobikey.eu/swap/gxl0/pwd/0000
More info HERE