![]() ![]() This is basically it so why do I consider this as a bit less elegant idea and will present other approach? You can copy this Api Key and using CURL, Postman or just browser call such an API:Īs event_name use previously created event names from Applets creation, you should see Plug turning on and off. Ok, so how to call you Webhook? Go to "My Services" using user menu and open "Webhooks" to find "Settings" Now, when you open "My Applets", you should see something like this: Repeat Applet creation but this time, when adding Webhook Service, specify event_name as "bt_server_battery_full" and, when adding Smart Life Service as "Then", choose action "Turn Off" (and select same Plug). Smart Life will show you list of yours connected devices to select (you should see your Plug connected in Step 1) When connected, chose one of proposed actions "Turn On". In both cases, Applets will will be created using two Services:įor "IF This" choose Service called Webhook.You will be asked for event_name for it, I called mine "bt_server_batter_low" (as you can guess I expect this Applet to react whe battery of device will be low).įor "Then" choose Service called "Smart Life" (when you will select it, you will be prompted to link your Smart Life account so IFTTT will have permission to call it). First, which I consider a bit less elegant but available when having free account and second which is similar but available for Pro users. I will describe two ways how you can use Applets for this excersize. In this step, you will connect Smart Life with IFTTT, thanks to that you will be able to controll your Smart Plug using REST API. You should be able to turn on and off your Smart Plug using application. ![]() Choose "Socket (WI-FI)" and follow instructions provided by application. When account is verified (code sent via email) you can start adding device. Install Smart Life application on Android device and register an account. Android application implemented as part of this project :)Īs a first step, you need to prepare Smart Plug.Android Device (I used old Nexus 4 with Android 5.1.1).Reason I decided to use this one, was possibility to controll it via. when device's battery goes up yo y%, it should turn off Smart Plug and use batteryįor purpose of this project I used Smart Plug from Gosund ( can be found on Amazon for example).when device's battery goes down to x%, it should turn on Smart Plug to be charged,.In this example I will build small solution for having Android device plugged in to Smart Plug and charged only when battery level wil go down.Įxample itself does not have much value stand alone, but in combination with other projects (described in other article) may work well. Android Battery Level Reporter ( & Self Charging Control ) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |