Aswin - help needed on the architecture of my p...
help needed on the architecture of my plugin
7 Replies
I made a plugin that lets one stream a NMEA log file to the signalK server at predefined speed. I use this plugin to replay my sailing trips and analyse performance.
I now want a user interface (webapp) to go with the plugin. The webapp offers playback controls to the user, like play, pause, FF, loop, etc.
I see two designs. The first is to create a webpage and javascript code that does everything from scratch. Like log file handling, connecting to the signalk server, handling playback controls. But it seems that javascript cannot directly connect to a signalK dataseource of type NMEA0183 due to limitations in using sockets? Is this true?
The other option would be to have the my plugin to handle ? an the connection to signalK, the log file and so. The HTML page would then just provide the UI. The HTML page must then comminuicate with my plugin. But how? (be easy on me, I am not a professional programmer)
Plugins - Signal K Server Documentation
A Guide for users and developers.
WebApps - Signal K Server Documentation
A Guide for users and developers.
There are plenty of examples to look at, have you looked at any of the existing plugins?
since the playback is actually happening on the server, in the plugin the way to do this is for your plugin to expose an HTTP api that the webapp can then call to play/pause/ff etc
https://demo.signalk.io/documentation/develop/plugins/server_plugin_api.html?highlight=registerWithRouter#exposing-custom-http-paths--openapi has a bit of documentation on how to do this
Server API - Signal K Server Documentation
A Guide for users and developers.
This was exactly the guidance I needed