Page 1 of 1
Undocumented error code MPC
Posted: Tue Feb 02, 2021 4:41 pm
by mvn23
While playing around with the new firmware v5.0 I ran into the following:
Unfortunately I can't find this error code anywhere in the docs.
I'm guessing it has something to do with the float parsing (C2=9.99 is accepted without issues) but I would like to get some more info on this.
Also, if anyone is aware of any more such codes, sharing is appreciated

Re: Undocumented error code MPC
Posted: Tue Feb 02, 2021 11:18 pm
by hvxl

MPC is not an error code. The letters represent the settings for LEDs D,E, and F. You get this output because the result of the subroutine to parse a floating point number is incorrectly interpreted as a pointer to an error code in EEPROM. Because you used
9.999, you get the data at offset 9. If you try 4.999, you get all LEDs: "L=FXOMPC". And 15.999 returns "A=OpenTherm Gateway 5.0". Needless to say, this is another bug.
I've created a test for both of your findings in the test suite. So they will be verified before I release a new firmware version in the future. I've also added a test for OT=-0.004, which should round up to 0.00. At least that one already works correctly.
It looks like you are stress-testing the firmware. Do let me know if you find more bugs.
Re: Undocumented error code MPC
Posted: Wed Feb 03, 2021 12:33 am
by mvn23
Haha that's awesome! Thanks for the info. I already added an 'MPC' error code in my dev version of pyotgw

guess I'll have to remove it again.
I'm trying to cover all of the more or less reasonable user inputs for the pyotgw update. If I find anything else I will of course update on this forum.