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
Sensor -> MQTT -> OpenPlotter
#4
(2019-02-14, 01:35 PM)PaddyB Wrote:
(2019-02-14, 01:13 PM)skipper@sy-barranas Wrote: Does anyone have any ideas?

Thanks.


You could send the data as signalk...

Code:
void sendSigK(String sigKey, float data) {    //    send SigK via UDP *****************************************

 if (sendSig_Flag == 1) {
   DynamicJsonBuffer jsonBuffer;
   String deltaText;

   //  build delta message
   JsonObject& delta = jsonBuffer.createObject();

   //updated array
   JsonArray& updatesArr = delta.createNestedArray("updates");
   JsonObject& thisUpdate = updatesArr.createNestedObject();   //Json Object nested inside delta [...
   JsonArray& values = thisUpdate.createNestedArray("values"); // Values array nested in delta[ values....
   JsonObject& thisValue = values.createNestedObject();
   thisValue["path"] = sigKey;
   thisValue["value"] = data;

   thisUpdate["Source"] = "ESP32";

   // Send UDP packet
   Udp.beginPacket(remoteIp, remotePort);
   delta.printTo(Udp);
   Udp.println();
   Udp.endPacket();
 }
}

I might be the most stupid person on earth right now, but, where do you put in this code? Huh I'm using espeasy and nodemcu but can't find the right place to put it.
I can not find any info about how to actually do it so it would be nice if you could put me in the right direction.
Sorry for the question, but I'm lost...
//Patrik
Reply


Messages In This Thread
RE: Sensor -> MQTT -> OpenPlotter - by PaddyB - 2019-02-14, 01:35 PM
RE: Sensor -> MQTT -> OpenPlotter - by Pkarl45 - 2019-03-18, 11:52 PM
RE: Sensor -> MQTT -> OpenPlotter - by PaddyB - 2019-03-19, 11:26 AM
RE: Sensor -> MQTT -> OpenPlotter - by JeroenAdam - 2019-03-20, 02:22 PM
RE: Sensor -> MQTT -> OpenPlotter - by Pkarl45 - 2019-03-21, 12:14 PM
RE: Sensor -> MQTT -> OpenPlotter - by Melvin - 2020-08-25, 04:48 PM
RE: Sensor -> MQTT -> OpenPlotter - by PaddyB - 2020-08-25, 05:14 PM
RE: Sensor -> MQTT -> OpenPlotter - by Melvin - 2020-08-25, 06:15 PM
RE: Sensor -> MQTT -> OpenPlotter - by PaddyB - 2020-08-25, 07:27 PM
RE: Sensor -> MQTT -> OpenPlotter - by Melvin - 2020-08-26, 03:03 AM
RE: Sensor -> MQTT -> OpenPlotter - by PaddyB - 2020-08-26, 08:36 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)