This is specifically in response to a 3 year old posting by @idallen regarding querying the hubitat webservice for logs. However, any help would be appreciated. The following code was posted:
So I tried it and got a weird error:
/Volumes/homes/jgobble/websocket-hubitat.pl: Opening blocking INET socket to ws://hubitat.local:80
/Volumes/homes/jgobble/websocket-hubitat.pl: Creating Protocol::WebSocket::Client handler
/Volumes/homes/jgobble/websocket-hubitat.pl: Connecting to client
/Volumes/homes/jgobble/websocket-hubitat.pl: Error on websocket: Wrong response line. Got [[HTTP/1.1 302 Found]], expected [[HTTP/1.1 101 ]]
Now, I know what HTTP 302 is. It's "moved temporarily" but A: Why isn't the script "following" the link to the new location. And does anyone know how to make it work correctly? I am on a C7 w/v2.4.1.177 and all I want to do is be able to export logs of all temperature and humidity levels on all devices as they occur. I want the solution in perl from a "remote" system so it looks like Hubitat's webservice is the answer. I have no other knowledge how to get logs of all the temp and humidity sensors.
Any help?