MQTT Authentication? #5
-
Excited to start taking a look at this package, thanks for whipping it up! I made some cursory patches to diyHue to support MQTT device selection, but this looks significantly more robust. My MQTT server, however, is currently password protected and doesn't allow anonymous access. I see that the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hello @konistehrad - and welcome to bifrost :) Thanks you for saying bifrost looks more robust. That was a big focus during initial development! In my own case, I'm securing the network z2m is on, instead of z2m itself, so I haven't encountered exactly this problem before. I didn't implement the low-level websocket logic from scratch - I use a crate called Can you try it, and see if it does? Also notice that bifrost is actually connecting to z2m not over mqtt (ironically), but rather over the (somewhat undocumented) websocket z2m has, which the z2m ui uses. I'd imagine that authentication on z2m also includes this websocket, but I'm not actually sure? Can you test it with the |
Beta Was this translation helpful? Give feedback.
Hello @konistehrad - and welcome to bifrost :)
Thanks you for saying bifrost looks more robust. That was a big focus during initial development!
In my own case, I'm securing the network z2m is on, instead of z2m itself, so I haven't encountered exactly this problem before.
I didn't implement the low-level websocket logic from scratch - I use a crate called
tungstenite
, which handles that for me. It's that same crate that parses the url, so... uhm... maybe that would work? 😅Can you try it, and see if it does?
Also notice that bifrost is actually connecting to z2m not over mqtt (ironically), but rather over the (somewhat undocumented) websocket z2m has, which the z2m ui uses.
I'd imagine t…