No love between node.js and otmonitor websockets
Posted: Wed Aug 09, 2017 11:40 pm
I'm building a solution where I am using Node-Red, a flow-based programming tool for wiring together hardware devices to talk to a number of sensors and to otmonitor. Node-Red offers a way to connect to websockets but for some reason it does not connect to otmonitor. Node-Red is based on node.js and uses the https://github.com/websockets/ws library and some tests in the console reveal that otmonitor responds with a 404 error. I ran more tests with http://www.websocket.org/echo.html and with the Simple Websocket Client Chrome extension and those all work fine. The Chrome Dev tools show a successful handshake. I can't seem to figure out why every library EXCEPT the self-proclaimed most stable and well-tested library is the only one that only doesn't work with otmonitor. In any case it halts further development of my project and I've spent over a week trying different setups. Anyone here have an similar experiences and/or solutions? I tried unraveling what kind of websocket library is in the source of otmonitor but it seems to be an add-on to the wibble http server that I can't debug.
See https://ibb.co/ezPNwa for the successful handshake in Chrome
See https://ibb.co/ezPNwa for the successful handshake in Chrome