Hi,
First findings about mqtt service:
- Seems to work fine after successful setup. Delay gets down to a few seconds which is nice.
- Seems that only websocket transport is supported. Is TCP planned?
- Does not support SSL/TLS. Hopefully support for secure connection is planned in order to enable access from pages loaded over HTTPS.
- Is not compatible with paho-mqtt python client because of case sensitive HTTP header interpretation. The python client sends HTTP headers as follows:
websocket_headers = {
"Host": "{self._host:s}:{self._port:d}".format(self=self),
"Upgrade": "websocket",
"Connection": "Upgrade",
"Origin": "https://{self._host:s}:{self._port:d}".format(self=self),
"Sec-WebSocket-Key": sec_websocket_key.decode("utf8"),
"Sec-Websocket-Version": "13",
"Sec-Websocket-Protocol": "mqtt",
}
Those headers result in "Websocket handshake error". Hacking the last two to "...WebSocket..." fixes the error.
cheers,
Kyösti