lorawan-server icon indicating copy to clipboard operation
lorawan-server copied to clipboard

Websockets per device

Open Kralg opened this issue 5 years ago • 5 comments

Hello,

We are analyzing how to connect this server to another over the websockets for UI. The thing is to have websockets clients per deveui/devaddr which will connect to the other server. I was reading Integration and this could probably be similar to the Thingsboard but not MQTT. Is there already a pattern on how to implement this?

Kralg avatar Jul 02 '19 09:07 Kralg

Hello. Outbound WebSockets (clients to a remote server) are not supported.

gotthardp avatar Jul 02 '19 09:07 gotthardp

I see, can you write how complex this is to be implement as server enhancement? It would be good to roughly estimate how feasible is this to be supported and possible time when it could be used.

Kralg avatar Jul 02 '19 10:07 Kralg

Having a WebSocket is quite easy to implement even for a newbie. The per-device WebSockets are a bit more complex. I'd say few days, depending on Erlang proficiency.

gotthardp avatar Jul 02 '19 10:07 gotthardp

I believe this is related to lorawan_connector_ws.erl module. Comparing it with lorawan_connector_mqtt.erl not so much of initial insights comes. One interesting difference that supervisor seems to create the child connectors for mqtt. Thats still sort of challenge - as my skills of Erlang are more like a basics. If it is between the enhancements of the server can you write how long would it take for you to implement this on the server?

Kralg avatar Jul 03 '19 14:07 Kralg

I'd say 1-2 days, but in general I implement new features only when I see demand from multiple users.

gotthardp avatar Jul 03 '19 15:07 gotthardp