Closed asymptotic closed 5 years ago
Uho, thanks for catching the MQTT username. I must have accidentally messed it up, when I normalized the code. As for conversions from F/C, check out my HeatPump repo. In that one I do conversions. Might help you with your quest for F, instead of C. Or when I get a chance, I'll update support for F
I am assuming you want Setpoint in F, instead of C right? You could just update MQTT dash to show F value in the set temp section, but send the corresponding C value to Havia controller. Might have to tell it to retain as sub topic would be returning C and it might not find F. But that is a work around for setpoint with F
Example
{ "items": [ { "label": "160", "payload": "{\"setpoint\":71}" }, { "label": "170", "payload": "{\"setpoint\":77}" }, { "label": "180", "payload": "{\"setpoint\":82}" }, { "label": "190", "payload": "{\"setpoint\":88}" }, { "label": "200", "payload": "{\"setpoint\":93}" }, { "label": "210", "payload": "{\"setpoint\":99}" }, { "label": "220", "payload": "{\"setpoint\":104}" }, { "label": "230", "payload": "{\"setpoint\":110}" } ], "mainTextSize": "LARGE", "textColor": -1, "enableIntermediateState": true, "enablePub": true, "enteredIntermediateStateAt": 0, "intermediateStateTimeout": 0, "jsOnReceive": "", "jsonPath": "$.setpoint", "qos": 0, "retained": false, "topic": "sonoff/sauna", "topicPub": "sonoff/sauna/set", "updateLastPayloadOnPub": true, "id": "4b9f092c-fe6b-4760-af79-7ed29f888549", "jsBlinkExpression": "", "jsOnDisplay": "", "jsOnTap": "", "longId": 6, "name": "SetPoint", "type": 4 },
@asymptotic , I recently discovered that latest Arduino JSON library version 6+, does not support the methods used in this code. Use library version 5 instead. At least until I can upgrade the code and re-test
Still haven't got it working, but this at least gets me connected to my network. Having issues with JSONObjects vs. arrays for F/C temperatures - if you have a fix for that let me know, otherwise I'll keep working on it :)