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
MQTT data manipulation
#4
(2019-05-13, 08:52 AM)PaddyB Wrote: What about sending the data as signalk over wifi ? I do very similar with as esp32.



Code:
void sendSigK(String sigKey, float data)
{

 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();
 }
}

Mmm, that is worth a try, but wouldn't that be about the same and cause way more network load than MQTT does? MQTT allows for vast updates with very little network load.

Still the problem would be that the SK "propulsion.engine.revolutions" does not show up in KIP configuration screen. I tried entering it manually but the gauge still does not get updated. Also see: this link that is kind of a duplicate ... I did not realize the moderator had to approve posts before they where published and thought my discussion got lost. Maybe the moderator can close one of the posts?
Reply


Messages In This Thread
MQTT data manipulation - by KKempeneers - 2019-05-12, 02:38 PM
RE: MQTT data manipulation - by jim321 - 2019-05-12, 07:44 PM
MQTT data manipulation - by PaddyB - 2019-05-13, 08:52 AM
RE: MQTT data manipulation - by KKempeneers - 2019-05-13, 12:05 PM
RE: MQTT data manipulation - by PaddyB - 2019-05-13, 12:15 PM
RE: MQTT data manipulation - by KKempeneers - 2019-05-13, 04:10 PM
RE: MQTT data manipulation - by PaddyB - 2019-05-13, 06:20 PM
RE: MQTT data manipulation - by KKempeneers - 2019-05-13, 07:53 PM
RE: MQTT data manipulation - by tkurki - 2019-05-14, 05:52 AM
RE: MQTT data manipulation - by KKempeneers - 2019-05-14, 10:20 AM
RE: MQTT data manipulation - by PaddyB - 2019-05-14, 11:11 AM
RE: MQTT data manipulation - by PaddyB - 2019-05-14, 09:45 AM
RE: MQTT data manipulation - by PaddyB - 2019-05-13, 08:30 PM
RE: MQTT data manipulation - by KKempeneers - 2019-05-14, 05:42 PM
RE: MQTT data manipulation - by KKempeneers - 2019-05-25, 08:47 AM
RE: MQTT data manipulation - by PaddyB - 2019-05-25, 05:45 PM
RE: MQTT data manipulation - by KKempeneers - 2019-05-26, 05:47 PM
RE: MQTT data manipulation - by PaddyB - 2019-05-26, 07:23 PM
RE: MQTT data manipulation - by PaddyB - 2019-05-27, 11:47 AM
MQTT data manipulation - by tkurki - 2019-05-27, 07:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)