** UPDATED THIS POST 1 POST DOWN **
Well actually that turned out to be just the beginning of it for me. I wasn’t getting the battery monitor to give me any updates, etc. or nothing. So, I moved one of the battery devices over to low battery level in the variables by putting it’s device number there (It showed 100% in the “Low” section and even though I setup a scene to run the luup check code to run manually, it would not move from low to high:
luup.call_action("urn:upnp-org:serviceId:BatteryMonitor1", "Check",{}, 72 )
*NOTE - Change the "72" to the device # of your battery device
But eventually I got it to work. Use this process to test that it does work by forcing a device into a low battery condition and then running battery monitor check to verify that battery monitor is working properly:
Set up a scene to run either manually or on a schedule (I do every hour) and have the scene run this luup code above (change the last numbers to your battery device).
You can verify using this procedure once you have added your devices as in the previous post to the variables HighDevice and Monitored form fields.
Change the battery level to “30” in the variables on one of your battery devices that is being monitored. The battery will show this level for awhile, depending on the device. When you see the battery level of the device at 30%, then run the battery check scene manually. Then go into the battery monitor and check battery level. You should see that device that you just set to level 30 in the “low” section of the battery level section of the battery monitor.
So recap of what you are trying to do is:
- Setup the luup code in a scene that forces a battery monitor check
- Set one of your battery devices that you had manually entered into the battery monitor (following the previous post) to level 30 in the variables section of that device
- Verify that the device shows a battery level of 30% and then run the battery monitor level check scene from step #1
- Go to battery monitor → battery level and see that the battery check from step #3 put the device you set to 30 in step #2 in the “low” section
- Now you can do the process again by putting the device back to 100 and running the battery check, it should return it to the High section in Battery Level
If the device is not there in the low section of the battery monitor verify that the device is still reporting level 30 and that it is being monitored by Battery Monitor. It’s in Battery Devices.
You can also try using battery monitor-> Advanced-> New Service-> Reload Engine. Using this sometimes puts everything at it basic start default state. Then begin testing.
My problem with Battery Monitor not working has still plagued me for days, even before my first post, until yesterday when I started working on the code. I finally ended up on the Intermediate XML page and from there I tried working the code around, understanding the sequences, changing things, testing, trying to look for results. I changed a lot of things, changed them back. I tried to tidy up the code, etc. and then what seemed out of nowhere, it just seemed to start working.
So first, try these steps above and see if that works for you.
Report back here and let me (us) know the results.