MQTT Watchface or Apps

Hello, I have a couple of IoT devices that connect to my MQTT broker. From there, I have information about domotics, weather and other useful stuff. I was thinking about making a watchface that would be a kind of dashboard that would display a couple MQTT topics. I know you can use websocket to communicate with MQTT brokers and that Alloy support websockets. I’m pretty sure it is possible to implement this kind of watchface. I was wondering of what would be the best way to do it. Can we just use javascript libraries like : https://eclipse.dev/paho/clients/js/ ? Or it should be implemented from raw javascript (AI can do sample code). I also see that Moddable have something : https://www.moddable.com/documentation/network/network#mqtt Is this supported for the Pebble implementation of their SDK? (ps, I’m a JavaScript noob)

2 Likes

If you can create a watch app, you could use the javascript interface to act as the middleman. Architecturally, it would look something like: MQTT broker <> [javascript <> watch app .c code] where the parts between the brackets would be in a pebble watch app project.

1 Like