HTTP Device quick hack help

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
TritonT
Posts: 9
Joined: 16 Oct 2015 19:13

HTTP Device quick hack help

Post 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.
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: HTTP Device quick hack help

Post 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.
TritonT
Posts: 9
Joined: 16 Oct 2015 19:13

Re: HTTP Device quick hack help

Post 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!
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: HTTP Device quick hack help

Post 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)
TritonT
Posts: 9
Joined: 16 Oct 2015 19:13

Re: HTTP Device quick hack help

Post by TritonT »

Thanks, working now. Didn't realise I could use the JavaScript API.
Post Reply