Post 42 made on Monday November 5, 2018 at 12:32 |
kapsreiter Long Time Member |
Joined: Posts: | November 2006 48 |
|
|
i did jus this
Change your write line to this.... Notice how I simply injected 2 HTTP Request Headers that I pasted above.
socket.write('PUT /api/lVfthQzyz9ZbNsUyndnZT9WBBOQ852HY3fEcPUVg/groups/1/action HTTP/1.1\r\nHost: 10.0.0.2\r\nUser-Agent: ProntoTSU9600\r\nContent-Length: '+commands.length+'\r\n\r\n'+commands);
And finally, when you do send this command, are you getting any data back? I see you are not logging anything in your onData
Change... socket.onData = function() {
};
to...
socket.onData = function() { var data = this.read(); // to show in ProntoScript console provided you use System.setDebugMask(9); System.print(data.substr(80)); };
thank you Lyndel
any example for a power toggle? so i would just need 1 hard button for the light
tom
|
|
|