Thu, 12 Oct 2023 15:24:56 +0200
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.