2019-05-13, 12:05 PM
(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?