Page 1 of 1

App - Dummy Device, change state

Posted: 22 Jun 2015 10:26
by Isaksson
Hello.

I have added a Dummy Device with the app Dummy Device (Version 1.0.0 by Z-Wave.Me)
Is it possible for me to externally change the state of that device with HTTP?
If yes, what is the url?

Re: App - Dummy Device, change state

Posted: 22 Jun 2015 11:48
by pz1
Yes with something like:

Code: Select all

http://IP:8083/ZAutomation/api/v1/devices/DummyDevice_7/command/off
See http://docs.zwayhomeautomation.apiary.io/ for the specification of the virtual device level API. Please note that the document is slightly outdated. So not everything may work as specified there

Re: App - Dummy Device, change state

Posted: 22 Jun 2015 12:12
by Isaksson
Thanks.
Perfect, i will test this.

Edit:
Worked :D

Re: App - Dummy Device, change state

Posted: 23 Aug 2015 23:21
by Mike Yeager
Ok, I looked over the docs page above and I can set the dummy device just fine. Not sure how to read it's status though...

I can check it from another computer with the line:

http://192.168.0.220:8083/ZAutomation/a ... yDevice_12

but if I try the exact same line from the RPi running ZWay, I get a 404 error that the device doesn't exist. Any idea why???

Re: App - Dummy Device, change state

Posted: 27 Aug 2015 23:32
by Mike Yeager
After 3 hours today, I am no closer to figuring out how to access the ZAutomation API from the RPi itself. I'm storing the status I want the dummy device set to in a database but still can't figure the command to change it. Tried from Midori on the RPi and got the same error. Works fine from a computer OTHER than the localhost of the Razberry controller....

Ok, I have definitely determined that the API requires a login. Is there any way to either bypass this or automatically log in the localhost? If this isn't the answer or there's a better solution, I'm all ears. I'm trying to do this from Python. I'm sure it helps to know what environment I'm working in....

Re: App - Dummy Device, change state

Posted: 29 Aug 2015 02:41
by PoltoS
You an add anonymous or local user, allow some room to that user and then add device into that room

Re: App - Dummy Device, change state

Posted: 31 Aug 2015 02:43
by Mike Yeager
PoltoS,

I can see the entire device tree from the ZAutomation API on the RPi from within my program but the minute I specify anything to the DummyDevice, I get an error that it doesn't exist. Still working on this but I figured I'd clear up any misunderstanding about where I was at that might exist. I'm almost not sure it has anything to do with authentication at this point, but I could be wrong. I'll look at adding a local user to see if that gets it as soon as I get the time to figure that out.

UPDATE - This solved the issue and I can now see the DummyDevice. Time to move ahead with a few other ideas....