Noob here, my first plugins... #98
Replies: 3 comments 5 replies
-
See https://github.com/SignalK/signalk-server/blob/master/docs/src/develop/plugins/server_plugin.md#start-coding , there's the section that describes the lifecycle methods
Your code almos there, but it is not setting |
Beta Was this translation helpful? Give feedback.
-
I see that this is an attempt to learn to code a plugin, that is great.
If the intent is just to make the uptime visible, I suggest that it would
be simpler and more convenient for user if this you added this one
additional data path to the existing plugin
https://github.com/sberl/signalk-rpi-monitor.
If you create a PR I would be happy to merge it in.
I am also seeing, from a specification point of view, that we are starting
to create a bunch of paths that in name are specific to RPi, but are
actually more general and could be applicable to any computer or
microcontroller type device, and maybe the naming should take that into
account.
The path should also take into account that a particular signalk may have
multiple instances of "computers" which each have their own uptime, CPU
utilization, memory, storage, etc.
It would be nice to standardize these path naming conventions.
Steve
…On Thu, Jan 25, 2024 at 7:15 AM sebba ***@***.***> wrote:
Thank you, is more clear now.
—
Reply to this email directly, view it on GitHub
<#98 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHXLEO6DNUCN33PHJN2JUTYQJZI7AVCNFSM6AAAAABCKPZL42VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DENBWGI3TI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
-steve
|
Beta Was this translation helpful? Give feedback.
-
Hello, me again :) I'll use same conversation because still noob here and still have some issues with stopping and reloading one plugin. I need a review for my plugin: https://github.com/Haimana/signalk-ble-heater.git I made it for controlling a Chinese diesel heater which allow Bluetooth connection. But for now, this code seems to do it's job, it connects/disconnects to the Bluetooth device, read the values, start, stop etc. Because I intend to go further and make it a webapp which will provide full control for this kind of heaters, I ask you nicely, please be so kind and take a look over my code. Any advice and any critics will be very appreciated. Thank you, |
Beta Was this translation helpful? Give feedback.
-
hello there,
I'm Seb, Romanian sailor, with some knowledge about electronics, mechanics and some software programming.
And also a happy user of SignalK and Openplotter. Many thanks for the authors.
For now, I'm trying to discover javascript, especially for SignalK applications and I started with a simple plugin which report the Raspberry Pi's uptime
After some struggling I managed to publish this plugin on github and npmjs.
My repo is here: https://github.com/Haimana/signalk-rpi-uptime
In the last version (v0.0.4) I tried to add an option for enabling/disabling the "pretty format uptime" reporting into SK and I could not figure out how to do it (to change it) without restarting SK.
I tried to figure out how the value of my boolean variable is passed through code. It seems is passed as I want only if change it and restarting SK.
I am wondering if there is some other way to write this code, which doesn't require restarting SK.
Please have mercy for my left-handed coding style. :) :) :)
Also, excuse my English, is not as good as I need.
Thank you,
Seb
Beta Was this translation helpful? Give feedback.
All reactions