This commit is contained in:
Marcus 2023-08-07 01:27:10 +02:00
parent 88fc817027
commit e0e88597f0
2 changed files with 4 additions and 4 deletions

View file

@ -16,9 +16,9 @@ while 1:
# ser.readline() # ser.readline()
Data = ser.readline().decode('ascii') Data = ser.readline().decode('ascii')
print(Data) print(Data)
#outFile = open("arduino-fridge-powercontrol.json", "w") outFile = open("arduino-fridge-powercontrol.json", "w")
#outFile.write(Data) outFile.write(Data)
#outFile.close outFile.close
##while 1: ##while 1:
## # { "command": "switch", "arg": "one", "state": "off", "ver":"1690931931"} ## # { "command": "switch", "arg": "one", "state": "off", "ver":"1690931931"}

View file

@ -78,7 +78,7 @@ void loop() {
jsonOut[1]["temp"] = tempSensor2; jsonOut[1]["temp"] = tempSensor2;
jsonOut[1]["state"] = fetState2; jsonOut[1]["state"] = fetState2;
serializeJson(jsonOut, Serial); serializeJson(jsonOut, Serial);
Serial.println();
delay(5000); delay(5000);
} }