In the commands for devices (Generic Zigbee RGBW Light) and others I don't see any option for "Duration". The command shows to take the value as a list?
{ "command": "setLevel", "type": [ "NUMBER", "NUMBER" ] },
I send this.... Abbreviated with token etc removed:
http://192.168.1.28/apps/api/254/devices/786/setLevel/100,5
Error in postman:
{ "error": true, "type": "java.lang.Exception", "message": "An unexpected error occurred." }
Hubitat Logs:
app:2542019-08-04 00:27:31.719 errorjava.lang.NumberFormatException: For input string: "20,5" on line 356 (sendDeviceCommandSecondary)
Is Duration not implemented for Maker API?
I believe Maker API currently only supports passing in a single parameter. @patrick would know for certain.
I think you're correct... on both parts.
1 Like
I've tried using the HTML code for comma as well (%2C) and that doesn't work either. I would think that they Maker API would need to be updated to translate from the HTML appropriate code is translated after it is received by the Maker API, similarly to the way that we translate those for the Cast-Web-API and Google Assistant Relay drivers.
I think the same problem exists with the 'setColor' command as well. It also is expecting a map which is not possible through a http query.
@patrick I'm calling this a bug with setLevel and setColor
I don't know if you can call either of these a bug as neither is expressly mentioned as a feature available via the maker API. Having the setLevel duration available is fairly easy but the setColor is going to be a lot harder to do.
According to the app and the guide:
Get Device Commands (replace [Device ID] with actual subscribed device id
http://192.168.1.28/apps/api/254/devices/[Device ID]/commands?access_token=
They are listed as available commands and show the value type. The problem is the type doesn't work with a http query.