50 msg = xstrcat(msg, co2meter->alias); |
50 msg = xstrcat(msg, co2meter->alias); |
51 msg = xstrcat(msg, (char *)"\",\"online\":"); |
51 msg = xstrcat(msg, (char *)"\",\"online\":"); |
52 msg = xstrcat(msg, co2meter->online ? (char *)"1":(char *)"0"); |
52 msg = xstrcat(msg, co2meter->online ? (char *)"1":(char *)"0"); |
53 msg = xstrcat(msg, (char *)",\"mode\":\""); |
53 msg = xstrcat(msg, (char *)",\"mode\":\""); |
54 msg = xstrcat(msg, co2meter->mode); |
54 msg = xstrcat(msg, co2meter->mode); |
|
55 msg = xstrcat(msg, (char *)"\",\"beeruuid\":\""); |
|
56 msg = xstrcat(msg, co2meter->beeruuid); |
55 msg = xstrcat(msg, (char *)"\",\"beercode\":\""); |
57 msg = xstrcat(msg, (char *)"\",\"beercode\":\""); |
56 msg = xstrcat(msg, co2meter->beercode); |
58 msg = xstrcat(msg, co2meter->beercode); |
57 msg = xstrcat(msg, (char *)"\",\"beername\":\""); |
59 msg = xstrcat(msg, (char *)"\",\"beername\":\""); |
58 msg = xstrcat(msg, co2meter->beername); |
60 msg = xstrcat(msg, co2meter->beername); |
|
61 msg = xstrcat(msg, (char *)"\",\"temperature_state\":\""); |
|
62 msg = xstrcat(msg, co2meter->temperature_state); |
|
63 msg = xstrcat(msg, (char *)"\",\"temperature_address\":\""); |
|
64 msg = xstrcat(msg, co2meter->temperature_address); |
59 msg = xstrcat(msg, (char *)"\",\"temperature\":"); |
65 msg = xstrcat(msg, (char *)"\",\"temperature\":"); |
60 snprintf(buf, 64, "%.3f", co2meter->temperature); |
66 snprintf(buf, 64, "%.3f", co2meter->temperature); |
61 msg = xstrcat(msg, buf); |
67 msg = xstrcat(msg, buf); |
62 msg = xstrcat(msg, (char *)",\"pressure_channel\":"); |
68 msg = xstrcat(msg, (char *)",\"pressure_state\":\""); |
|
69 msg = xstrcat(msg, co2meter->pressure_state); |
|
70 msg = xstrcat(msg, (char *)"\",\"pressure_channel\":"); |
63 snprintf(buf, 64, "%d", co2meter->pressure_channel); |
71 snprintf(buf, 64, "%d", co2meter->pressure_channel); |
64 msg = xstrcat(msg, buf); |
72 msg = xstrcat(msg, buf); |
65 msg = xstrcat(msg, (char *)",\"pressure_voltage\":"); |
73 msg = xstrcat(msg, (char *)",\"pressure_voltage\":"); |
66 snprintf(buf, 64, "%.3f", co2meter->pressure_voltage); |
74 snprintf(buf, 64, "%.3f", co2meter->pressure_voltage); |
67 msg = xstrcat(msg, buf); |
75 msg = xstrcat(msg, buf); |