doug kimmerly - Can anyone point me in the righ...
Can anyone point me in the right direction? I'm trying to write a plugin that will schedule NMEA Switching while I'm away from the boat to save power and still have access to turn on things like the dehumidifier. I continue to run into permissions issues and I'm not sure the best way to get the permissions needed. I can send PUT commands from Postman, but when I try to replicate that in a plugin running on the server I get this
"Apr 18 15:40:00 Error turning OFF switch companionway at http://localhost/signalK/v1/api/vessels/self/electrical/switches/bank/45/11/state: You do not have permission to view this resource, <a href='/admin/#/login'>Please Login</a>"
I have retrieved a token given it admin access and used that in my PUT command.
What is the best way to authenticate a plugin to be able to access the NMEA switches ??
"Apr 18 15:40:00 Error turning OFF switch companionway at http://localhost/signalK/v1/api/vessels/self/electrical/switches/bank/45/11/state: You do not have permission to view this resource, <a href='/admin/#/login'>Please Login</a>"
I have retrieved a token given it admin access and used that in my PUT command.
What is the best way to authenticate a plugin to be able to access the NMEA switches ??
4 Replies
Don’t use http. You can just call app.putSelfPath
Hmm. Somehow that got left out of the new documentation
ok that sounds easier thanks
Example here: https://github.com/SignalK/node-red-embedded/blob/ff9ecec60e79dc43586a8e8f73d99dcedf44b0d5/signalk-send-put.js#L19
GitHub
node-red-embedded/signalk-send-put.js at ff9ecec60e79dc43586a8e8f73...
Node red nodes for use with the signalk-node-red plugin - SignalK/node-red-embedded
changed it up and it works great thanks again