Hey folks! I've got some miscellaneous issues with Maker API I'd like to ask about to see if any of y'all might have some insight.
First Question
Does anyone know if they're doing any kind of URL encoding/decoding on the request URL? For example, I’m trying to issue the speak command to a speech synthesis device. But if I format my URL as:
/apps/api/143/devices/[Device ID]/speak/Hello, world! What’s going on today??access_token=yadayadayada
it blows up, as expected, because the question mark is a reserved character for URLs.
If I URL escape it, so that it reads:
/apps/api/143/devices/[Device ID]/speak/Hello%2C+world!+What%E2%80%99s+going+on+today%3F?access_token=yadayadayada
it actually reads out the escape characters, e.g. “Hello percent two see plus world! Plus what percent eee two percent etc. etc. etc.” As a workaround, I had to make a function to convert my string to safe characters (a-z, A-Z, 0-9, hyphen, comma, period, and exclamation mark, e.g. /Hello,-World!Whats-going-on-today). This works, but again, it’s a little less than ideal, especially if I want the house to ask the kids a question.
Second Question
I can't seem to get RGBW bulbs to react to a setHue
or setSaturation
event through the Maker API. I've tried sending in a color map with setColor
but that doesn't work, either. Has anybody had any success changing colors through the Maker API?