Closed joelhaasnoot closed 3 years ago
Ah, took a little longer and figure it out. Once I had downgraded to ESP8266 Board/Core version 2.7.4 it works fine.
It does however still seem to constantly be losing its wifi settings.
Huh. Interesting. Unfortunately, I can't say much about both of your issues since I honestly lack the experience.
Which version of ESP8266 Board/Core were you using before? Maybe there are breaking changes mentioned in the release notes between 2.7.4 and that version.
In any case lets hope that someone with the suitable skills reads this issue and shines some light on the problem
I used 3.0.1 before. I think the issue may be timing related. It seems to be quite sensitive timing wise, see my other message.
It does however still seem to constantly be losing its wifi settings.
This was an issue on my side
I think both issues (#2 and #8) are related to the parseState()
function, which was declared to return a bool, but did not return anywhere, which will result in undefined behaviour. This has been fixed with #9 and I think it is already working for @joelhaasnoot again.
For me running the code with the missing return statement resulted in the ESP8266 continuously printing data, which it wasn't even supposed to.
Thanks for figuring that out @enwi !
As I just copy-pasted most of this code from one project to another, the same issue did surface here: https://github.com/Hypfer/esp8266-midea-dehumidifier/commit/fabc01297fe6c787b87e095390be8abcaafbc91c
I am somewhat surprised that the compiler didn't complain though
@Hypfer C compilers can sometimes be strange. I mean I didn't even get a compiler warning, so I first thought the memcpy
did something weird. But it wasn't until I tried to force the function to return by adding a return statement that the static analysis (intellisense) told me, hey you can't just return you need to return a boolean that I noticed it.
Thanks for this excellent work!
I tried to replicate but after receiving the first reading, the system crashes. A side-effect of this is that the Wifi Config is lost and you have to reconfigure it, making debugging a bit of a pain :)
The serial log looks like this:
I've decoded the exception to be
(using a D1 Mini Pro) Any ideas what's going wrong?