SignalK / instrumentpanel

Instrument panel implemented as a grid with draggable & resizable components
Apache License 2.0
44 stars 30 forks source link

Instrumentpanel doesn't load: 404 error getting "/signalk/v1/applicationData/global/instrumentpanel/1.0/instrumentpanelPreferredUnits" #173

Closed ivan-ns closed 3 years ago

ivan-ns commented 3 years ago

After last update Instrumentpanel doesn't load. Server response 404 for '/signalk/v1/applicationData/global/instrumentpanel/1.0/instrumentpanelPreferredUnits'

cmotelet commented 3 years ago

can you give me a little more information on 'Instrumentpanel doesn't load' ?

which version of

Server response 404 for '/signalk/v1/applicationData/global/instrumentpanel/1.0/instrumentpanelPreferredUnits' is not an error, it indicates that there is no data stored for the preferred units on the server.

ivan-ns commented 3 years ago

@cmotelet , thanks for your answer.

<html><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="initial-scale=1"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="default"> <meta name="mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-title" content="SK-Instruments"> <meta name="application-name" content="SK-Instruments"> <meta name="msapplication-TileColor" content="#da532c"> <meta name="theme-color" content="#ffffff"> <title>SignalK Instrumentpanel</title> <link href="./css/bootstrap.min.css" rel="stylesheet"> <link href="./css/instrumentpanel.css" rel="stylesheet"> <link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="192x192" href="icons/android-chrome-192x192.png"> <link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png"> <link rel="manifest" href="site.webmanifest"> <link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#5bbad5">

</head>

<body> <div id="content" onclick=""></div> <footer style="text-align:center"> <hr> <p><a href="https://github.com/SignalK/instrumentpanel">Signal K Instrument Panel</a> version <span id="version">0.17.1</span></p> </footer>

<script src="ui.js"></script>

</body></html>

Versions:

`

cmotelet commented 3 years ago

Sorry but I can't reproduce your problem. Can you give me the content of this URL to see all the data produced by the server : /signalk/v1/api/vessels/self/

The 404 (Not Found) are normal when the server does not provide meta for certain paths.

In the page do you still have the toolbar at launch and heart blinking ? image If yes, in settings mode, do you have any widgets displayed ? If yes, click on the Show all paths button

ivan-ns commented 3 years ago

No toolbar available at the page. That's the content of /signalk/v1/api/vessels/self/: {"uuid":"urn:mrn:signalk:uuid:70c826aa-5c2f-4f84-854a-b12c01abe70a","name":"Takushi","communication":null,"design":{"draft":{"meta":{"description":"The draft of the vessel","properties":{"minimum":{"description":"The minimum draft of the vessel","type":"number","units":"m"},"maximum":{"description":"The maximum draft of the vessel","type":"number","units":"m"},"current":{"description":"The current draft of the vessel","type":"number","units":"m"},"canoe":{"description":"The draft of the vessel without protrusions such as keel, centerboard, rudder","type":"number","units":"m"}}},"value":{"maximum":1.5},"$source":"defaults","timestamp":"2020-12-31T14:54:10.345Z"},"length":{"meta":{"description":"The various lengths of the vessel","properties":{"overall":{"type":"number","description":"Length overall","units":"m"},"hull":{"type":"number","description":"Length of hull","units":"m"},"waterline":{"type":"number","description":"Length at waterline","units":"m"}}},"value":{"overall":12},"$source":"defaults","timestamp":"2020-12-31T14:54:10.345Z"},"beam":{"meta":{"units":"m","description":"Beam length"},"value":3.5,"$source":"defaults","timestamp":"2020-12-31T14:54:10.345Z"},"airHeight":{"meta":{"units":"m","description":"Total height of the vessel"},"value":15,"$source":"defaults","timestamp":"2020-12-31T14:54:10.345Z"},"aisShipType":{"meta":{"description":"The ais ship type see http://www.bosunsmate.org/ais/message5.php","properties":{"id":{"type":"number","description":"The ship type number"},"name":{"type":"string","description":"The ship type name"}}},"value":null,"$source":"defaults","timestamp":"2020-12-31T14:54:10.345Z"}},"sensors":{"gps":{"fromBow":{"meta":{"description":"The distance from the bow to the sensor location"},"value":6,"$source":"defaults","timestamp":"2020-12-31T14:54:10.345Z"},"fromCenter":{"meta":{"description":"The distance from the centerline to the sensor location, -ve to starboard, +ve to port"},"value":0,"$source":"defaults","timestamp":"2020-12-31T14:54:10.345Z"}}},"navigation":{"courseGreatCircle":{"activeRoute":{"href":{"meta":{"description":"A reference (URL) to the presently active route, in resources."},"value":"/resources/routes/urn:mrn:signalk:uuid:587d3f42-7c94-4608-8cbb-c7d8d764f96b","$source":"freeboard-sk-helper","timestamp":"2020-12-31T15:03:10.804Z"},"startTime":{"meta":{"description":"The time this route was activated"},"value":"2020-12-22T13:51:26.503Z","$source":"freeboard-sk-helper","timestamp":"2020-12-31T15:03:10.804Z"}},"nextPoint":{"position":{"meta":{},"value":{"latitude":60.03707416822979,"longitude":29.398040771484375},"$source":"freeboard-sk-helper","timestamp":"2020-12-31T15:03:10.804Z"},"arrivalCircle":{"meta":{},"value":926,"$source":"freeboard-sk-helper","timestamp":"2020-12-31T15:03:10.804Z"},"distance":{"meta":{},"value":7006.60523606077,"$source":"derived-data","timestamp":"2020-12-31T15:03:31.594Z"},"bearingTrue":{"meta":{},"value":-0.9409873657216355,"$source":"derived-data","timestamp":"2020-12-31T15:03:31.594Z"}},"previousPoint":{"position":{"meta":{"description":"The position of lastPoint in two dimensions","properties":{"longitude":{"type":"number","description":"Longitude","units":"deg","example":4.98765245},"latitude":{"type":"number","description":"Latitude","units":"deg","example":52.0987654},"altitude":{"type":"number","description":"Altitude","units":"m"}}},"value":{"latitude":60.082726170912245,"longitude":29.974464636770996},"$source":"freeboard-sk-helper","timestamp":"2020-12-31T15:03:10.804Z"},"distance":{"meta":{"units":"m","description":"The distance in meters between previousPoint and the vessel's present position"},"value":27905.666464321283,"$source":"derived-data","timestamp":"2020-12-31T15:03:31.594Z"}},"crossTrackError":{"meta":{"units":"m","description":"The distance from the vessel's present position to the closest point on a line (track) between previousPoint and nextPoint. A negative number indicates that the vessel is currently to the left of this line (and thus must steer right to compensate), a positive number means the vessel is to the right of the line (steer left to compensate)."},"value":-4977.153637185911,"$source":"derived-data","timestamp":"2020-12-31T15:03:31.594Z"},"bearingTrackTrue":{"meta":{"units":"rad","description":"The bearing of a line between previousPoint and nextPoint, relative to true north."},"value":-1.7238086552881826,"$source":"derived-data","timestamp":"2020-12-31T15:03:31.594Z"}},"position":{"meta":{"description":"The position of the vessel in 2 or 3 dimensions (WGS84 datum)","properties":{"longitude":{"type":"number","description":"Longitude","units":"deg","example":4.98765245},"latitude":{"type":"number","description":"Latitude","units":"deg","example":52.0987654},"altitude":{"type":"number","description":"Altitude","units":"m"}}},"value":{"longitude":29.5,"latitude":60},"$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"datetime":{"meta":{"description":"Time and Date from the GNSS Positioning System"},"value":"2019-02-17T16:29:28Z","$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"gnss":{"antennaAltitude":{"meta":{"units":"m","description":"Altitude of antenna"},"value":148.94,"$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"satellites":{"meta":{"description":"Number of satellites"},"value":0,"$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"horizontalDilution":{"meta":{"description":"Horizontal Dilution of Precision"},"value":0.5,"$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"positionDilution":{"meta":{"description":"Positional Dilution of Precision"},"value":1,"$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"geoidalSeparation":{"meta":{"description":"Difference between WGS84 earth ellipsoid and mean sea level"},"value":-24,"$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"type":{"meta":{"description":"Fix type"},"value":"Combined GPS/GLONASS","$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"methodQuality":{"meta":{"description":"Quality of the satellite fix"},"value":"GNSS Fix","$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029},"integrity":{"meta":{"description":"Integrity of the satellite fix"},"value":"no Integrity checking","$source":"Vessel Sim.127","timestamp":"2020-12-31T15:03:31.592Z","pgn":129029}},"headingMagnetic":{"meta":{"units":"rad","description":"Current magnetic heading of the vessel, equals 'headingCompass adjusted for magneticDeviation'"},"value":0,"$source":"Vessel Sim.204","timestamp":"2020-12-31T15:03:31.605Z","pgn":127250},"courseOverGroundTrue":{"meta":{"units":"rad","description":"Course over ground (true)"},"value":0,"$source":"Vessel Sim.3","timestamp":"2020-12-31T15:03:31.607Z","pgn":130577}},"environment":{"sun":{"meta":{},"value":"dusk","$source":"derived-data","timestamp":"2020-12-31T15:03:12.587Z"},"mode":{"meta":{"description":"Mode of the vessel based on the current conditions. Can be combined with navigation.state to control vessel signals eg switch to night mode for instrumentation and lights, or make sound signals for fog."},"value":"night","$source":"derived-data","timestamp":"2020-12-31T15:03:12.587Z"},"sunlight":{"times":{"sunrise":{"meta":{},"value":"2019-02-17T05:37:35.548Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"sunriseEnd":{"meta":{},"value":"2019-02-17T05:42:15.105Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"goldenHourEnd":{"meta":{},"value":"2019-02-17T06:40:59.186Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"solarNoon":{"meta":{},"value":"2019-02-17T10:17:29.634Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"goldenHour":{"meta":{},"value":"2019-02-17T13:54:00.082Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"sunsetStart":{"meta":{},"value":"2019-02-17T14:52:44.163Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"sunset":{"meta":{},"value":"2019-02-17T14:57:23.720Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"dusk":{"meta":{},"value":"2019-02-17T15:41:03.161Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"nauticalDusk":{"meta":{},"value":"2019-02-17T16:29:40.844Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"night":{"meta":{},"value":"2019-02-17T17:17:46.105Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"nadir":{"meta":{},"value":"2019-02-16T22:17:29.634Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"nightEnd":{"meta":{},"value":"2019-02-17T03:17:13.163Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"nauticalDawn":{"meta":{},"value":"2019-02-17T04:05:18.424Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"},"dawn":{"meta":{},"value":"2019-02-17T04:53:56.107Z","$source":"derived-data","timestamp":"2020-12-31T15:03:12.589Z"}}},"current":{"meta":{"description":"Direction and strength of current affecting the vessel","properties":{"drift":{"type":"number","description":"The speed component of the water current vector","example":3.12,"units":"m/s"},"setTrue":{"type":"number","description":"The direction component of the water current vector referenced to true (geographic) north","example":123.45,"units":"rad"},"setMagnetic":{"type":"number","description":"The direction component of the water current vector referenced to magnetic north","example":131.22,"units":"rad"}}},"value":{"setTrue":2.0914,"drift":2.45},"$source":"Vessel Sim.3","timestamp":"2020-12-31T15:03:31.607Z","pgn":130577}},"propulsion":{"port":{"revolutions":{"meta":{"units":"Hz","description":"Engine revolutions (x60 for RPM)"},"value":0,"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.608Z","pgn":127488},"temperature":{"meta":{"units":"K","description":"Engine temperature"},"value":330.43,"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"oilPressure":{"meta":{"units":"Pa","description":"Oil pressure"},"value":393000,"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"runTime":{"meta":{"units":"s","description":"Total running time for engine (Engine Hours in seconds)"},"value":699005,"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489}}},"notifications":{"propulsion":{"port":{"temperature":{"meta":{"units":"K","description":"Engine temperature"},"value":{"state":"alert","method":["visual","sound"],"timestamp":"2020-12-31T14:54:11.841Z","message":"The enging temperature is more than 327.59"},"$source":"simple-notifications","timestamp":"2020-12-31T14:54:11.841Z"},"checkEngine":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Check Port Engine is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"overTemperature":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Over Temperature is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"lowOilPressure":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Low Oil Pressure is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"lowOilLevel":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Low Oil Level is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"lowFuelPressure":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Low Fuel Pressure is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"lowSystemVoltage":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Low System Voltage is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"lowCoolantLevel":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Low Coolant Level is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"waterFlow":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Water Flow is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"waterInFuel":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Water in Fuel is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"chargeIndicator":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Charge Indicator is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"preheatIndicator":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Preheat Indicator is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"highBoostPressure":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine High Boost Pressure is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"revLimitExceeded":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Rev Limit Exceeded is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"eGRSystem":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine EGR System is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"throttlePositionSensor":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Throttle Position Sensor is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"emergencyStopMode":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Emergency Stop Mode is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"warningLevel1":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Warning Level 1 is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"warningLevel2":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Warning Level 2 is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"powerReduction":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Power Reduction is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"maintenanceNeeded":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Maintenance Needed is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"commError":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Comm Error is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"subOrSecondaryThrottle":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Sub or Secondary Throttle is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"neutralStartProtect":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Neutral Start Protect is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489},"shuttingDown":{"meta":{},"value":{"state":"normal","method":["visual"],"message":"Port Engine Shutting Down is Normal"},"$source":"Vessel Sim.17","timestamp":"2020-12-31T15:03:31.609Z","pgn":127489}}}}}

ivan-ns commented 3 years ago

Sorry for disturbing at the NY, I think I found the solution: I have changed in Server>Settings field "Ship Type" from "Wing in Ground" (I had it by default) to "Sailing" and instrument panel came alive! Happy New Year! SignalK is awesome!

cmotelet commented 3 years ago

Great and very interesting bug: In your data related to "Ship Type":

   "aisShipType": {
      "meta": {
        "description": "The ais ship type see http://www.bosunsmate.org/ais/message5.php",
        "properties": {
          "id": {
            "type": "number",
            "description": "The ship type number"
          },
          "name": {
            "type": "string",
            "description": "The ship type name"
          }
        }
      },
      "value": null,
      "$source": "defaults",
      "timestamp": "2020-12-31T14:54:10.345Z"
    }

Your value is null !!!

In my data it's an object:

"aisShipType": {
"meta": {
"description": "The ais ship type see http://www.bosunsmate.org/ais/message5.php",
"properties": {
"id": {
"type": "number",
"description": "The ship type number"
},
"name": {
"type": "string",
"description": "The ship type name"
}
}
},
"value": {
"name": "Wing In Ground",
"id": 20
},
"$source": "defaults",
"timestamp": "2020-12-31T15:21:28.327Z"
}

or

"aisShipType": {
"meta": {
"description": "The ais ship type see http://www.bosunsmate.org/ais/message5.php",
"properties": {
"id": {
"type": "number",
"description": "The ship type number"
},
"name": {
"type": "string",
"description": "The ship type name"
}
}
},
"value": {
"name": "Sailing",
"id": 36
},
"$source": "defaults",
"timestamp": "2020-12-31T15:26:17.732Z"
}

I have to try to reproduce this case to see if that's what it is then protect InstrumentPannel against it. And happy new year ;-)

tkurki commented 3 years ago

New meta deltas have a problem that creates nulls. Just noticed it yesterday, in aisreporter bug reports, @sbender9 said he’d look into it.

ivan-ns commented 3 years ago

Sorry, it's offtopic, but I'm new in SignalK. I'm using 'activeRoute' in freeboard-sk, is there any way to automatically switch to next waypoint when one is reached? (notifications.arrivalCircleEntered fired)

tkurki commented 3 years ago

Please use https://github.com/SignalK/freeboard-sk/ for Freeboard stuff.