Send lastseen iSpindel over websocket. Disabled a debug logmessage again.

Thu, 12 Oct 2023 15:24:56 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 12 Oct 2023 15:24:56 +0200
changeset 850
26cc7ea0f790
parent 849
16079aef4c4c
child 851
b15fa90a9af5

Send lastseen iSpindel over websocket. Disabled a debug logmessage again.

bmsd/ispindels.c file | annotate | diff | comparison | revisions
--- a/bmsd/ispindels.c	Thu Oct 12 14:19:46 2023 +0200
+++ b/bmsd/ispindels.c	Thu Oct 12 15:24:56 2023 +0200
@@ -90,6 +90,9 @@
     msg = xstrcat(msg, (char *)",\"alarm\":");
     snprintf(buf, 64, "%d", ispindel->alarm);
     msg = xstrcat(msg, buf);
+    msg = xstrcat(msg, (char *)",\"lastseen\":");
+    snprintf(buf, 64, "%ld", ispindel->lastseen);
+    msg = xstrcat(msg, buf);
     msg = xstrcat(msg, (char *)"}");
     ws_broadcast(msg);
     free(msg);
@@ -233,7 +236,7 @@
     time_t              timestamp;
     FILE		*fp;
 
-    syslog(LOG_NOTICE, "ispindel_set: %s %s", node, payload);
+    //syslog(LOG_NOTICE, "ispindel_set: %s %s", node, payload);
 
     /*
      * Search ispindel record in the memory array and use it if found.

mercurial