I have a bunch of Medion-branded MAX! door/window contacts which - in contrast to the original MAX! door/window contacts - are based on STM8 and Si4431 ICs. I was looking into porting it myself when I found your work here, so I will happily base my work on yours.
When skipping through the code, I found a few things that aren't exactly obvious:
What's the for-loop in main.c for / what are these magic numbers?
for (uint8_t * i = (uint8_t*)(0x622 + 0xd4); i <= (uint8_t*)0xfff; i++)
I suppose a port to STM8L052C6 should be doable with minor modifications, do you happen to know if there might be some road blocks (I'll have to rework the timeout handling as the LSE crystal is not populated).
Regards,
Andreas
EDIT: I just disassembled one of the Medion MAX! radiator thermostats: Also STM8L052/Si4431-based. Cool, so I might be able to convert those to Homematic as well - only downside: The wall thermostats are Samsung-based and I don't want to replace the thermostats.
I'm using a couple of these devices where I need to set the VALVE % instead of a temperature. My workaround is to limit the max-opening % and set the device to "on" (30.5 degrees). However this is not always fully reliable (e.g. one device is somehow stuck at 99% but I really need to close fully - the valve is reverse)
It looks like this firmware had the target to do exactly what I need (I'm using FHEM as well btw.), but when I checked it out and tried to compile, I get a number of errors. It looks to me like development was stopped in the middle of something.
Has there been any further development (and just not checked in), so I could retry to compile this?
What is the procedure to actually get this firmware on the device? Is it revertable to original or is there a risk to brick the device?
I might be interested to help. Maybe you could just contact me (German will be fine) - my email is visible with my profile.