Undocumented error code MPC

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

Post Reply
mvn23
Starting Member
Starting Member
Posts: 6
Joined: Tue Feb 02, 2021 4:13 pm

Undocumented error code MPC

Post by mvn23 »

While playing around with the new firmware v5.0 I ran into the following:

Code: Select all

command: C2=9.999
reponse: MPC
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 ;)
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Undocumented error code MPC

Post by hvxl »

:lol: 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.
Schelte
mvn23
Starting Member
Starting Member
Posts: 6
Joined: Tue Feb 02, 2021 4:13 pm

Re: Undocumented error code MPC

Post by mvn23 »

Haha that's awesome! Thanks for the info. I already added an 'MPC' error code in my dev version of pyotgw :lol: 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.
Post Reply

Return to “Opentherm Gateway Forum”