App - Dummy Device, change state

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Isaksson
Posts: 133
Joined: 10 Apr 2013 09:43

App - Dummy Device, change state

Post 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?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: App - Dummy Device, change state

Post 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
Isaksson
Posts: 133
Joined: 10 Apr 2013 09:43

Re: App - Dummy Device, change state

Post by Isaksson »

Thanks.
Perfect, i will test this.

Edit:
Worked :D
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: App - Dummy Device, change state

Post 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???
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: App - Dummy Device, change state

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

Re: App - Dummy Device, change state

Post by PoltoS »

You an add anonymous or local user, allow some room to that user and then add device into that room
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: App - Dummy Device, change state

Post 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....
Post Reply