Add DS18B20 temperature sensor support

This commit is contained in:
root
2026-06-03 01:11:46 -06:00
parent f9fe949bb9
commit c2248a5f5a
3 changed files with 98 additions and 9 deletions
@@ -30,10 +30,16 @@ void handleStatus() {
battery["temperature_f"] = batteryTemp;
JsonObject temps = doc.createNestedObject("temps");
temps["fridge_zone_1"] = sensors.fridgeZone1;
temps["fridge_zone_2"] = sensors.fridgeZone2;
temps["rear_seat"] = sensors.rearSeat;
temps["outside"] = sensors.outsideAir;
temps["fridge_zone_1"] = sensors.fridgeZone1Online ? sensors.fridgeZone1 : nullptr;
temps["fridge_zone_2"] = sensors.fridgeZone2Online ? sensors.fridgeZone2 : nullptr;
temps["rear_seat"] = sensors.rearSeatOnline ? sensors.rearSeat : nullptr;
temps["outside"] = sensors.outsideAirOnline ? sensors.outsideAir : nullptr;
JsonObject sensorHealth = doc.createNestedObject("sensor_health");
sensorHealth["fridge_zone_1"] = sensors.fridgeZone1Online;
sensorHealth["fridge_zone_2"] = sensors.fridgeZone2Online;
sensorHealth["rear_seat"] = sensors.rearSeatOnline;
sensorHealth["outside"] = sensors.outsideAirOnline;
JsonObject relayObj = doc.createNestedObject("relays");
relayObj["starlink"] = relays.starlink;