I have modified the Environmental monitoring and control example and it is working fine sending the data from the ESP32 to the web app. Unfortunately I cannot figure out what is going wrong in the other direction, when i try the original example it seems worse as every message seems to reboot the ESP32.
In my attempt it does not reboot the ESP32 but the data is always zero. The debug messages output on the web app shows what I think it the correct message. The issue seems to be in the ESP32 code, I have put lots of debug messages in to see where it is failing and that seems to be the Index has a value of -1 so it never gets to the decode macro.
This is what I see in the serial monitor, all seems to be what I would expect until the -1 as the "Decision" is looking for Index >= 0
These are for each click on the radio buttons.
mtx_demo_switchdata
Success
{"AvgCfg":66}
-1
IndexFailed
mtx_demo_switchdata
Success
{"AvgCfg":67}
-1
IndexFailed
mtx_demo_switchdata
Success
{"AvgCfg":19}
-1
IndexFailed
mtx_demo_switchdata
Success
{"AvgCfg":67}
-1
IndexFailed
This is where I think the issue is. Any help would help with hair loss
Regards,
Bob