A little bit of background first.
In my house i have an MQTT server running which in turn is my endpoint to control certain aspects of my house (lights, power, music, …).
What i want to do is:
- Expose MQTT data over “a protocol” that can be used with Android.
- Add controls for that data in a flutter based app to control my house.
I can make this work when it’s in a local network as i can just do direct http calls.
I’m searching for a way to make this work when i’m not locally connected. In the pre-nkn-era times one would make a REST or even GraphQL API with some authentication on top to access that data securely.
To me it seems like this would be a perfectly fine usecase to use NKN to get that data.
But how? As far as i’m aware there is no NKN client library written in Dart (flutter is made in Dart).
On a related note. Can NKN also be used as “proxy” and if so, how? As it would be totally awesome if i can use NKN as a secured proxy and basically thread url’s as if i’m calling them locally. That would prevent the need to make a wrapper API in this case. Then again, once there is a connection between <app> and <home> it’s not that difficult to make a wrapper function that executes url’s (send from <app>) in <home> and send the result back to <app> thus in effect a (kind of) proxy too.
I’m curious what you folks think of this.
Perhaps there are wildly different possibilities that i haven’t even thought of yet?