v1.5.0: error flags payload UDP + init bytes status a 0x00

- Bytes 66-68 (error_flags, npm_status, device_status) initialises a 0x00
  au lieu de 0xFF pour eviter faux positifs cote serveur
- Implementation flag RTC (byte 66) + methodes SensorPayload
- Escalade PDP reset: si echec → notification + hardware reboot + exit
- Changelog et VERSION mis a jour

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
PaulVua
2026-03-18 10:17:37 +01:00
parent 3804a52fda
commit eb93ba49bd
3 changed files with 29 additions and 2 deletions

View File

@@ -1 +1 @@
1.4.6 1.5.0

View File

@@ -1,5 +1,26 @@
{ {
"versions": [ "versions": [
{
"version": "1.5.0",
"date": "2026-03-18",
"changes": {
"features": [
"Payload UDP Miotiq: byte 66 error_flags (erreurs systeme RTC/capteurs)",
"Payload UDP Miotiq: byte 67 npm_status (registre status NextPM)",
"Payload UDP Miotiq: byte 68 device_status (etat general du boitier, specification)",
"Methodes SensorPayload: set_error_flags(), set_npm_status(), set_device_status()"
],
"improvements": [
"Initialisation bytes 66-68 a 0x00 au lieu de 0xFF pour eviter faux positifs cote serveur",
"Escalade erreur UDP: si PDP reset echoue, notification WiFi + hardware reboot + exit"
],
"fixes": [],
"compatibility": [
"Necessite mise a jour du parser Miotiq pour decoder les bytes 66-68 (error_flags, npm_status, device_status)"
]
},
"notes": "Ajout de registres d'erreur et d'etat dans la payload UDP (bytes 66-68). Les bytes de status sont initialises a 0x00 (aucune erreur) au lieu de 0xFF. Le flag RTC est implemente, les autres flags seront actives progressivement."
},
{ {
"version": "1.4.6", "version": "1.4.6",
"date": "2026-03-17", "date": "2026-03-17",

View File

@@ -282,6 +282,12 @@ class SensorPayload:
self.payload[0:8] = device_id_bytes self.payload[0:8] = device_id_bytes
# Status/error bytes default to 0x00 (no error)
# 0xFF = "no data" for sensor values, but for status bytes
# 0x00 = "no error/no flag" is the safe default
self.payload[66] = 0x00 # error_flags
self.payload[67] = 0x00 # npm_status
self.payload[68] = 0x00 # device_status
# Set protocol version (byte 9) # Set protocol version (byte 9)
self.payload[9] = 0x01 self.payload[9] = 0x01