-
Notifications
You must be signed in to change notification settings - Fork 14
5. MQTT topics and message structure
Below is a list of MQTT topics assuming the root topic is set to "ClassicMQTT" in the setup.
- ClassicMQTT/tele/LWT = Offline
- ClassicMQTT/tele/LWT = Online
{"appVersion":"","buildDate":"20180206","deviceName":"Workshop","deviceType":"Classic","endingAmps":10.81,"hasWhizbang":true,"lastVOC":5.01,"model":"Classic 200","mpptMode":11,"netVersion":"","nominalBatteryVoltage":12,"unitID":-1901700000}
{ "BatTemperature": 18.61, "NetAmpHours": 0, "ChargeState": 0, "InfoFlagsBits": -1577046016, "ReasonForResting": 104, "NegativeAmpHours": -1459, "BatVoltage": 13.71, "PVVoltage": 15.21, "VbattRegSetPTmpComp": 14.7, "TotalAmpHours": 63, "WhizbangBatCurrent": 0.41, "BatCurrent": 0.91, "PVCurrent": 0.71, "ConnectionState": 0, "EnergyToday": 0.41, "EqualizeTime": 7200, "SOC": 100, "Aux1": false, "Aux2": false, "Power": 12.01, "FETTemperature": 31.31, "PositiveAmpHours": 2094, "TotalEnergy": 109.51, "FloatTimeTodaySeconds": 16842, "RemainingAmpHours": 63, "AbsorbTime": 7200, "ShuntTemperature": 23.01, "PCBTemperature": 39.41 }
Payload examples:
- {"wakePublishRate":2000} - set the awake publish rate to once every 2 seconds (range 2000 - 30000 ms)
- {"stayAwake":true} - does not change to 'Snooze Rate' after publishing 60 reading messages
- {"stayAwake":false} - does change to 'Snooze Rate' after publishing 60 reading messages
- {"WAKE"} - Wake up and publish at wakePublishRate.
Snooze rate publishes one reading every 5 minutes.
Once any command is received, the code will publish "ClassicMQTT/classic/stat/info" once and "ClassicMQTT/classic/stat/readings" at the 'wakePublishRate'.