Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Tuesday March 15, 2022 at 21:37
laalves
Long Time Member
Joined:
Posts:
February 2008
26
So, I want to build an interface in my wall mounted TSU9800 with buttons to send on/off commands to devices in Hubitat, just that. Given the infinite possibilities of the Hubitat system, this would be really neat.

I have no experience with Pronto Script although I have many years with Prontos

Now, building on other posts in this forum I adapted somebody else's script to work with a GET command like the below which I simply pasted into the Actions field of a button (after clicking "Use Pronto Script"):


var socket = new TCPSocket(false);
socket.onConnect = function()
{
socket.write("GET /apps/api/150/devices/1153/on?access_token=a43ebdcb-bc49-4a37-a419-b30304277ed6 HTTP/1.1\r\n\r\n")
socket.close();
};
socket.onClose = function()
{
};
socket.onIOError = function(e)
{
label = "Error: " + e;
};
socket.connect('192.168.70.100’,80);



The Hubitat's IP is 192.168.70.100 and when using the string 192.168.70.100:80/apps/api/150/devices/1153/on?access_token=a43ebdcb-bc49-4a37-a419-b30304277ed6 in a browser it works just fine, i.e, the device 1153 turns ON. However, the script does not work. Nothing shows up in the logs of the Hubitat, so I assume that the command is not reaching it.

Looking at the script, what possible failures can you spot and what could I try different?


Hosting Services by ipHouse