Hi,
I read through several topics in the forum and found a simple solution to send battery information from Android to Domoticz. I use Automate on Android to get the data and create the json url. You can download the Flow from the Automate community Flow library. It is named: Battery level reporting tool for Domoticz. The battery level is sent over json like this: ../json.htm?type=command¶m=udevice&idx=92&svalue=55.1
In Domoticz I created a dummy percentage sensor. The ID of the sensor is set in the Automate flow as well as the url and the ssid of the wifi.
Peter
Battery level reporting from Android
Moderator: leecollings
-
- Posts: 234
- Joined: Sunday 27 August 2017 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Spain
- Contact:
Re: Battery level reporting from Android
hi,
This is very interesting for me.
Can you tell us more details?
This is very interesting for me.
Can you tell us more details?
-
- Posts: 24
- Joined: Tuesday 12 September 2017 14:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Battery level reporting from Android
It is simple. I'm using a tasker. In my configuration I have:
- scene: two conditions - near wifi with specific ssid and time betwen 0:01am and 12:59 pm every 10 minutes,
- task: Net->http get, in server domoticzip:port, in path
- scene: two conditions - near wifi with specific ssid and time betwen 0:01am and 12:59 pm every 10 minutes,
- task: Net->http get, in server domoticzip:port, in path
Code: Select all
json.htm?type=command¶m=udevice&idx=IDX&svalue=%BATT
........................................................................................
RPi2 + sonoff + 433MHz + Xiaomi Gateway + EQ-3 MAX!
RPi2 + sonoff + 433MHz + Xiaomi Gateway + EQ-3 MAX!
Re: Battery level reporting from Android
Try Wall All, posted about here in the forum. I wrote it, .. it allows you to post battery info to MQTT of pull it via HTTP GET.
There's alot more data it can gather.
I've posted a bunch of codes to test it out, but give me some feedback, I'm always looking to improve or add features
There's alot more data it can gather.
I've posted a bunch of codes to test it out, but give me some feedback, I'm always looking to improve or add features
-
- Posts: 94
- Joined: Thursday 24 November 2016 14:55
- Target OS: Linux
- Domoticz version: >=Béta
- Location: Netherlands
- Contact:
Re: Battery level reporting from Android
I just posted this;
http://www.domoticz.com/forum/viewtopic ... 20#p156694
Would be great if its implemented into the Android app and Domoticz itself.
I'm using this Automate flow;
This is working great for about an year now. Based on "Android AccuBattery" the battery of my OnePlus 3t only lost 100mAh(~5%) of capacity 
Where my previous Nexus5 lost >10% after 1 year.
Also on safety its great; No charging Lithium device in the house while sleeping
http://www.domoticz.com/forum/viewtopic ... 20#p156694
Would be great if its implemented into the Android app and Domoticz itself.
I'm using this Automate flow;
Code: Select all
"Catch error?" >No> Loop every 1 minutes > Get BatteryLevel > Put BatteryLevel in Variable > Post the Automate Variable to an Domoticz UserVariable.
"Catch error?" >Yes> Delay 2 min.

Where my previous Nexus5 lost >10% after 1 year.
Also on safety its great; No charging Lithium device in the house while sleeping

Domotica/graphs "freak" :)
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam
https://www.frijduurzaam.nl
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam
https://www.frijduurzaam.nl
Who is online
Users browsing this forum: No registered users and 1 guest