MakerAPI URL help - error message java.lang.Exception

Hmmm, I'm trying to use MakerAPI to turn on a light switch.

This is the URL I'm using:
http://192.168.0.88/apps/api/69/devices/13113/On/100?access_token=XXXXXX

But then the webpage displays this error text:
{"error":true,"type":"java.lang.Exception","message":"An unexpected error occurred."}

Also, is the DeviceID supposed to be from the light switch's "Device Details" section? Or should I be getting the DeviceID from somewhere else, unique to MakerAPI?

Thanks in advance for any help. :facepunch:

The device id can be taken from the url for the device edit page for the switch device, that's usually what I reference.

Try a lowercase o in on....

1 Like

Try removing this from URL. The On & Off commands don't have a secondary value.

3 Likes

Well picked up, yes, that should do it...

2 Likes

Thanks @sburke781 - Mystery solved!

1 Like