This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SignalK updates over WiFi from ESP32
#6
Sorry i could not answer sooner ... upon tkurki's suggestion i dove in the server logs and found that the Signal K message was improper formated.  

For future reference, the C++ (Arduino code) should be:

String makeSignalKDelta(const char* topic, float data) {
  String SignalKDelta;
  DynamicJsonDocument doc(256);


  // Create the Signal K Delta message
  JsonArray updatesArray = doc.createNestedArray("updates");
  // Create an object within the updates array
  JsonObject updateObject = updatesArray.createNestedObject();
  // Create the values array within the update object
  JsonArray valuesArray = updateObject.createNestedArray("values");
  // Create an object within the values array
  JsonObject value = valuesArray.createNestedObject();
 
  value["path"] = topic;
  value["value"] = data;  
 
  serializeJson(doc, SignalKDelta);
  return SignalKDelta;
}

(You must include ArduinoJson.h in order to compile) With that sorted out ... how can i read data from the SignalK server? And are there aftermarket displays that withstand the weather and understand SignalK? Which one would you suggest? I realy would like the dept sounder and wind instrument on a display in the cockpit. 
 to server: 10.10.10.1

95 bytes written.

{"updates":[{"values":[{"path":"vessels.self.propulsion.0.revolutions","value":38.483}
Reply


Messages In This Thread
RE: SignalK updates over WiFi from ESP32 - by KKempeneers - 2024-05-11, 07:43 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)