Current Version : 0.6
Hi, All
This is plugin is designed for checking battery level status for all of your battery powered device. The plugin also fire events depending on
state.
Note : You must schedule a scene that call the plugin check action to update values.
General Functions
[ul][li]Automatically Find Battery powered device (In progress)[/li]
[li]UI to select Device to monitor[/li]
[li]Visual reporting of your battery state on dashboard[/li]
[li]UI to define levels (Low/Middle/High)- TODO[/li]
[li]AutoCheck function - TODO[/li][/ul]
Tested only with UI5 (1.5.408)
VERSION HISTORY
0.5 Initial public release
0.6 Correct BatteryLevel display problem
INSTALLATION
Automatic Installation version may be older due to validation Delay
Automatic
https://apps.mios.com/plugin.php?id=2678
Manual
Upload the plugin files (From the Zip file located at the end of this Post):
- In the Toolbox section open MiOS Developers >> Luup Files and upload all the files you downloaded. check the Restart Luup after upload checkbox and click GO.
Create the IOS Notification Device:
- Open Create Device.
- In the UpnpDevFilename input box enter D_BatteryMonitor.xml
- In the Upnp Implementation Filename input box enter I_BatteryMonitor.xml
- In the Description input box enter a name for the panel device, e.g. My Battery Check.
- Click Create device.
- Close this window and Save.
Configuration
Go to the Devices tab, choose device to monitor by moving them to the Monitored List then save.
Advanced Configuration
- In the device advanced control tab, you can find the following parameters (See screenshot)
[ul][li]General Status (0=Low,1=Middle,2=High) [/li]
[li]Last Error message with readable time[/li]
[li]Configured (Not yet Used)[/li]
[li]Define LowLevel in %, 33% by default[/li]
[li]Define MidLevel in %, 66% by default[/li]
[li]HighLevel (To be removed)[/li]
[li]LowDeviceList : List of device with low level battery[/li]
[li]MidDeviceList : List of device with battery beetween low and middle[/li]
[li]HighDeviceList : List of device with level battery above middle[/li]
[li]MonitoredDeviceList : List off monitored device[/li]
[li]UnMonitoredDeviceList : List off unmonitored device[/li]
[li]TimeLastCheck : Timestamp of lastcheck[/li][/ul]
USAGE IN SCENE
Check action
Launch a check for all monitored devices.
Events
When one or more devices reach Middle Level or Low Level an event is fired so, you can use it in Automation/Triggers to launch a script or Luup Code.
See screenshot below.
High Level Event => All devices are above Mid Level
Midlle Level Event => One or more devices are above Mid Level and Below High Level
Low Level Event => One or more devices are below Mid Level
USAGE IN CODE
Assuming that the Plugin was installed as Device 99, the following tests should work. Your installation will have a different Device number, please adjust accordingly.
luup.call_action("urn:upnp-org:serviceId:BatteryMonitor1", "Check",{}, 99 )