Hello,
I am trying to connect to the Z-Way Virtual Device API from MIT AppInvertor2
I am using the post method to login with the url: http://Razberry_IP:8083/ZAutomation/api/v1/login
but keep getting 500 Error "unexpected token o"
can someone please refer me to some place where I can find answers.
thanks.
Remote Control with MIT AppInvertor2
Re: Remote Control with MIT AppInvertor2
http://razberry.z-wave.me Support/Manuals/Developers manual
Since 29-12-2016 I am no longer a moderator for this forum
Re: Remote Control with MIT AppInvertor2
I already looked at all the documentation files but couldn't find the answer..
there is no place that say how to use Virtual Device API or Z-Way API via android app.
please can you please refer me to more detailed document
there is no place that say how to use Virtual Device API or Z-Way API via android app.
please can you please refer me to more detailed document
Re: Remote Control with MIT AppInvertor2
I have the beginnings of an Android app which successfully logs in and retrieves devices etc. I have only done this through my local network so far. I used the Android SDK rather than AppInventor but hopefully what follows will help you.
I had some issues initially because I misinterpreted the documentation. I resolved my problems by tracing the HTTP requests made from the smarthome browser app. I used http://www.telerik.com/fiddler to do this.
I then used a REST Client (http://restforchrome.blogspot.co.uk/) in a browser to mimic and edit the requests I had seen. This was to get a better understanding of what needs to go in the header and body of the HTTP requests.
For example, the body of a login POST request looks like this:
{"form":true,"login":"admin","password":"admin","keepme":false,"default_ui":1}
I just tried this from the REST client whilst writing these notes and got your exact error 'unexpected token o' and in this case it was due to the REST client defaulting the header content-type to '...urlencoded'. Changing the content-type to 'application/json' fixed this.
Playing around with these tools really helped me get a grasp of what my Android app needed to send and when I went back to the documentation it made a lot more sense.
I had some issues initially because I misinterpreted the documentation. I resolved my problems by tracing the HTTP requests made from the smarthome browser app. I used http://www.telerik.com/fiddler to do this.
I then used a REST Client (http://restforchrome.blogspot.co.uk/) in a browser to mimic and edit the requests I had seen. This was to get a better understanding of what needs to go in the header and body of the HTTP requests.
For example, the body of a login POST request looks like this:
{"form":true,"login":"admin","password":"admin","keepme":false,"default_ui":1}
I just tried this from the REST client whilst writing these notes and got your exact error 'unexpected token o' and in this case it was due to the REST client defaulting the header content-type to '...urlencoded'. Changing the content-type to 'application/json' fixed this.
Playing around with these tools really helped me get a grasp of what my Android app needed to send and when I went back to the documentation it made a lot more sense.
Re: Remote Control with MIT AppInvertor2
Hey,
trying to start with a little Appinventor app for zway too.
Can anybody enventually post an .aia file with an example, esp. with regard to login by using appinventor web component?
Would be very helpful...
Big thanks in advance...
Cheers
K
trying to start with a little Appinventor app for zway too.
Can anybody enventually post an .aia file with an example, esp. with regard to login by using appinventor web component?
Would be very helpful...
Big thanks in advance...
Cheers
K