Page 1 of 1

Simple turn on and off query

Posted: 30 Apr 2014 12:20
by drzippit
Hey All,

I've recently picked up a Razberry to have some fun learning to code and actually making something useful for myself.
I just can't figure out how the API is set up. Basically what I want is a script to run and turn on a device through a HTTP POST request. And another one to turn off a device through another HTTP POST request. I've read through the API but I can't for the life of me figure it out.

Can someone push me in the right direction?

Re: Simple turn on and off query

Posted: 01 May 2014 02:09
by PoltoS
Try this:

wget "http://localhost:8083/JS/Run/zway.devic ... sic.Set(Y)"

where N is the node ID and V is the value (0..99 or 255).

Re: Simple turn on and off query

Posted: 12 May 2014 04:42
by Mike Yeager
I have been working with a Kwikset deadbolt lock and so far I've managed to get it to lock and unlock. The command to lock is :

http://192.168.0.220:8083/ZWaveAPI/Run/ ... 2].Set[255]

If I replace the 255 with a 0, it unlocks it. I'm trying now to find a reliable way (without beating the battery in the lock to death) to determine the state of the lock. Just to clarify, the lock is device #2 (first one I added to the network) and instance I am assuming is likely always 0. The command class is important and must match the device you are trying to control. You can google z-wave command classes (MiCasaVerde has a good list) and once you find the correct command class, you should be in business. 0 and 255 appear to be the only valid settings for a binary switch. A dimmer would use anything in between.

Re: Simple turn on and off query

Posted: 12 May 2014 20:33
by PoltoS
For simplicity ".instances[0]" can be omitted. Also "commandClass[CC] can be replaced with it's verbal name like "DoorLock", "Basic" and others. See Z-Way developer manual for full list.

Re: Simple turn on and off query

Posted: 13 May 2014 05:36
by Mike Yeager
Now that may actually help with my understanding of how to work this thing. I'm getting the hang of the lock although there are many features I have yet to figure out how to support... Knowing that the commands can be simplified will make a difference.....