Jump to content

Dimming support via echo-ha-bridge and REST calls


dgeist

Recommended Posts

Posted (edited)

I'm running the newest version  of the ha-bridge package (0.4.0) to emulate the hue platform with my Echo Dot 2. Basic on/off features seem to work fine, but I'm unable to do dimming. Per the bridge's github repo:

Dimming is also supported by using the expression ${intensity.percent} with a value of 0-100 or ${intensity.byte} with a value 0-255, respectively.

 

So, I'm putting the following in (which works):

{
  "name":"Kitchen Table Light",
  "deviceType":"switch",
  "offUrl":"http://admin:*****@192.168.1.7:80/rest/nodes/7959/cmd/DOF",
  "onUrl":"http://admin:*****@192.168.1.7:80/rest/nodes/7959/cmd/DON"
}. 

Per the ISY REST guide:

  • Insteon - /rest/nodes/<node-id>/cmd/DON/128 - turn on a scene to 50% (valid parameters = 0 - 255)

 

If I update the onUrl to: 

"http://admin:*****@192.168.1.7:80/rest/nodes/7959/cmd/DON/${intensity.byte}"

The update is accepted, but Alexa complains that the device is not reachable.

 

Anyone know what I'm doing wrong?

 

Dan

Edited by dgeist
Posted (edited)

Try the parameter outside the double quotation delimiters.

 

 

ohhhhh. you can't set a scene to a dim level...just on or off.

Edited by larryllix
Posted (edited)

The parameter thing is a good idea, but the configurator is generating that part, not me (I tried POSTin the HTTP without it and it wouldn't parse correctly.

 

I thought of the scene thing, and tried calling one of the dimmers the same way, but with the hardware ID instead of the scene number, but still no-go:

http://admin:*****@192.168.1.7:80/rest/nodes/29 D3 86 1/DON/${intensity.byte}

Anything wrong with the syntax of that one?

 

<edit> the "POST" above refers to populating the ha-bridge hue-emulator application, not the call to the ISY </edit> 

Edited by dgeist
Posted (edited)

I am not familiar with this technique you are using.

 

All Rest commands are GET.

 

Try a hard coded number first to get it going, then the variable later.

Edited by larryllix
Posted (edited)

Negative. This is the version at https://github.com/armzilla/amazon-echo-ha-bridge

 

As an aside, I was able to manually get the REST commands to DIM to a specific percentage based on the switch hardware address and utilizing %20 in the expressions instead of spaces (not too surprising, there). I'll validate if "Alexa" will properly trigger the numeric value through the bridge once I get home.

 

 

 

<edit> Sure enough, I'm able to get simple dimming now with a REST call configured in the bridge like this:

http://admin:****@192.168.1.7:80/rest/nodes/29%20E0%2084%201/cmd/DON/${intensity.byte}

It supports numeric percentages as well as keywords like "half" and "three quarters" but not yet "dim" or "brighten" but that's an Echo thing.

</edit>

 

Dan

Edited by dgeist

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...