The
curl example
pz1 directed you to was just to show you how to pass your 'username' and 'password' to the zway server.
ZWayVDev_zway_6-0-37 is just a sample virtual device id.
It looks like the authentication has worked, but
ZWayVDev_zway_6-0-37 is not a device in your network which is why you are seeing an error.
From your original post
http://192.168.0.103:8083/ZWaveAPI/Run/ ... ].Set(255)
would suggest that
ZWayVDev_zway_3-0-37 is a valid device in your case?
Try:
curl -v -u admin:admin 192.168.0.103:8083/ZAutomation/ap i/v1/devices/ZWayVDev_zway_3-0-37/command/on
If that does not work, then:
curl -v -u admin:admin 192.168.0.103:8083/ZAutomation/ap i/v1/devices
would give you all the device ids so that you could try the original request again with one of your own device ids. Remember though, that this was just an example command to show you how to authenticate. I am not very familiar with
curl but can see that two examples were given:
1.
- Sends a login request with the username & password in the body.
Extracts the cookie and places it in 'cookie.txt'.
Sends a second request to switch on device ZWayVDev_zway_6-0-37 passing in the stored cookie.
2.
- Sends the same request to switch on device ZWayVDev_zway_6-0-37 but provides the username & password in the request itself
For my project I have been using the first model - ie login, obtain a cookie and use that in future requests.
I do this in Java for an Android app. However, to quickly test my requests I use a Windows PC. From the PC I either use Python or a RESTClient plugin for the Firefox browser. Both are free. To trace the requests and responses I use a Windows tool called Fiddler (also free). If these are available to you, they will give a good insight into the api and what is required.
I hope that helps.