As proof of consept I created a Thingspeak data channel for Android battery level (https://thingspeak.com/channels/55432).
Thingspeak channel settings. |
In Tasker create new Task that we can call "Thingspeak Batt Mon".
Tasker task for Thingspeak data update. |
Second action on this task is IF loop where I compare battery level to the battery level that is stored to %BATT_old variable. This way we do not update the data if value has not been changed.
Then we get to the main part of the task, the HTTP Post action.
HTTP Post action. |
If you look the task next I have the variable set action that store the current battery level to variable #BATT_old that was used in IF statement.
Next is 15 seconds delay that is there to make sure that update interval to Thingspeak server s minimum 15 seconds. Thinkspeak has the update rate limitation of 15 seconds.
Below IF loop I have the ELSE brach. That is needed for #BATT_old variable update in case IF branch is not executed.
Tasker task need to run by the profile. For profile I created simple Time profile that will run the task every 15 minutes.
Then data should start to appear on Thingspeak server.
Thingspeak channel. |
The location will not be visible on channel page, but can be seen on channel feed (Data Export). Note that you need to add "location=true" parameter like this: http://api.thingspeak.com/channels/55432/field/1.json?location=true (I have removed location from my public feed).
Tasker - Thingspeak combo will allow all kind of data transfer between Android and Internet, but also allows easy data transfer between Android and Arduinio or RaspberryPI. With Tasker it is possible to create all kind of user interfaces (example with speech) or location based events that can be used to trigger your controller. Data can be also read with Tasker from the feed and any kind of alarms and notifications can be created.
Following article was great help with Tasker: Controlling Your Home Automation Controller with Tasker
1 comment:
great! i was lookiing por these to monitor the batteries from various celphones i have. is a shame i cant find any simple app that just do that, monitor and uploar my bateri level to the cloud. but thank to you it is some kind solved.
https://thingspeak.com/channels/88440
Post a Comment