Page 1 of 1

HTTP Device quick hack help

Posted: 16 Oct 2015 19:41
by TritonT
Hi,

I am trying to migrate from an EventGhost based automation system at the moment, and as a quick hack, to save on programming I've got a bunch of 'HTTP Device's in Z-Way. I can turn the HTTP_Device_switchBinary type on and off with a command like:

http://192.168.32.223:8083/ZAutomation/ ... ommand/off

But I don't know the syntax to set the value on a HTTP_Device_sensorMultilevel type. Can anybody help me out? Thanks.

Re: HTTP Device quick hack help

Posted: 16 Oct 2015 19:58
by pofs
Are you sure you want to set value for sensorMultilevel and not switchMultilevel? How do you expect to set value on a sensor?
If you've meant switchMultilevel, it also supports "/command/on" and "/command/off", and also "/command/exact?level=75" to set specific value.

Re: HTTP Device quick hack help

Posted: 16 Oct 2015 23:47
by TritonT
Yes I did mean HTTP_Device_sensorMultilevel. I am trying Z-Way as my primary interface, but I have a large number of sensors available in my EventGhost based interface. I have 1-Wire temperature, Oregon temperature, humidity, wind and rain, and Netiom voltage. I was planning on having these values visible in Z-Way by having EventGhost periodically send the values by the API -

...:8083/ZAutomation/api/v1/devices/HTTP_Device_sensorMultilevel_10/whatevergoeshere

Clearly this is isn't most efficient method, but I thought it would do until I had time to write something. I sure there's a better way to get values into virtual sensors but I don't know it yet!

Re: HTTP Device quick hack help

Posted: 05 Nov 2015 03:28
by PoltoS
It is supposed that sensorMultilevel value is set by poll of HTTP. You can stillnuse JS API like /JS/Run/controller.devices.get("XXX").set("metrics:level", YYY)

Re: HTTP Device quick hack help

Posted: 13 Nov 2015 22:56
by TritonT
Thanks, working now. Didn't realise I could use the JavaScript API.