Chisburgers - Hi All, im running the signal k a...

Hi All, im running the signal k autopilot plugin to control my EV 100. My only concern is that i sometimes i get the error “502 Autopilot not in auto or wind mode” I can However switch from standby to any mode. If I restart the Signal K server the error is gone and no error is shown. I believe the error comes when the signal k server has booted before the P70 (not fully confirmed). Any suggestions how to solve?
13 Replies
Scott Bender
Scott Bender4mo ago
When do you get that error? p70 not be on should not matter... next time it happens, can you look in the Data Browser? is steering.autopilot.state there?
Chisburgers
ChisburgersOP4mo ago
Yes! Ill check it tomorrow. Example: 1. I’ve been sailing day 1 2. By the end of the day I let the signal k server run but Turn off all instruments including dongle that sends NMEA data to signal k. 3. Next day I head out for sailing. I start all instruments and fire up the signal k auto pilot app. 4. I switch to mode auto via the app, it works and sets the pilot in auto 4. When I press -+1/10 it gives med the error 5. I try toggle the stat and restart the pilot app. Nothing changes - I can still toggle state. 6. I restart signalk and then the pilot works perfect again
Scott Bender
Scott Bender4mo ago
It sounds like you’re not getting any n2k in after you have re-powered your n2k dongle. What are you using? Are you getting any other n2k data in?
Chisburgers
ChisburgersOP4mo ago
Ok, so ive been testing now. 1. The Signal K server has been up all night, 2. I powered up the Autopilot and the Wifi dongle YDWG-02 3. I receive data from all inputs in signal K from the NMEA network. steering.autopilot.state is set to strandby 4. I fire up the Autopilot APP, I set the mode to Auto and check the data browser and steering.autopilot.state is set to auto. All other inputs receive data. 5. I try to change course on the autopilot app and receive: "Autopilot not in auto or wind mode” 6. I toggle back to standby and data browser displays standby. All other instruments are still sending data to Signal K 7. I tried to ”repower” the app but receive the same error.
Scott Bender
Scott Bender4mo ago
so strange! the code:
if ( state !== 'auto' && state !== 'wind' ) {
return { message: 'Autopilot not in auto or wind mode', ...FAILURE_RES }
} else {
if ( state !== 'auto' && state !== 'wind' ) {
return { message: 'Autopilot not in auto or wind mode', ...FAILURE_RES }
} else {
Chisburgers
ChisburgersOP4mo ago
Yeah, i know. Should I comment it out? Or can I add something to debug?
Scott Bender
Scott Bender4mo ago
I am completely stumped Add some debug there to log the autopilot state
Chisburgers
ChisburgersOP4mo ago
hmm, i cant seem to find that if statement in any of the files?
Scott Bender
Scott Bender4mo ago
In the raymarinen2k.js
Chisburgers
ChisburgersOP4mo ago
been fiddling around with it but my updates wont show?? @signalk/signalk-autopilot/raymarinen2k.js ive also tried to alter the message "return { message: 'Autopilot not in auto or wind mode " what am I missing here?
Scott Bender
Scott Bender4mo ago
Edit directly under ~/.signalk/node_modules And restart the server after a change
Chisburgers
ChisburgersOP4mo ago
thanks - missed the part with rebooting the server. will continue the debugging tomorrow.
Want results from more Discord servers?
Add your server