Virtual Battery Sensor

@sburke781
trying to use your driver to get device battery data from Tasker so I can set a Zooz plug to the proper state so I can charge between 15% and 80%. For your task, could you Export the Description to the Clipboard and paste it in your reply?
I have tried both the local and cloud versions of the URL.

My values:
[Device ID] d68e78b6-a3b6-4e87-aedf-d28c1cc551bb
[Command] setBattery
[Secondary Value] %BATT

Send Device Command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value])

https://cloud.hubitat.com/api/xxxxx/apps/215/devices/[Device ID]/[Command]/[Secondary value]?access_token=xxxx

Updated URL

https://cloud.hubitat.com/api/xxxxx/apps/215/devices/d68e78b6-a3b6-4e87-aedf-d28c1cc551bb/setBattery/�TT?access_token=xxxxxx

Send Device Command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value])

http://192.168.0.0/apps/api/215/devices/[Device ID]/[Command]/[Secondary value]?access_token=xxxxx

Updated URL

http://192.168.0.0/apps/api/215/devices/d68e78b6-a3b6-4e87-aedf-d28c1cc551bb/setBattery/�TT?access_token=xxxx

I believe that I have a something incorrect in Maker API. I get an error messege "Device not found or not authorized" in Tasker

I'm pretty sure the DeviceID needs to be the id shown in the Device Details page URL for that device, not the Device Network Id I expect you are using.

Also make sure the device is included in the Maker API list of devices.

1 Like

In terms of the Tasker side I suspect you are doing it right. I don't think I have a device with the original task setup anymore, I have moved on to using my new app to report battery plus plenty of other details. I could re-create it if needed, but I think, like you, that there will be something simple like the device ID is the issue.

I believe your device id is wrong, select get all devices and it will list your id’s.

1 Like