Closed Roosted7 closed 4 years ago
Hey @Roosted7 ! Thanks a lot for this fix, I will merge it for now, as it looks the right way to fix. (I can't test it for now, but I'm working on that)
@Roosted7 thanks for this. I was just about to wire up a circuit to my MA105C and use this software
Thanks for your cool project! After changing two small things, I've now got my energy in HA :+1:
Firstly, the current version of te SoftwareSerial library doesn't require (nor accept) an buffersize in the initialization of the object. Simply removing this argument fixes compilation.
Secondly, my Kaifa MA105C (DSMR 4.2.2) spits out quite bit more than the 64 char buffer could hold which caused the CRC check to fail. By increasing the buffersize to 1024 the line is being read in correctly and the CRC passes. 512 might also just about have been enough, but since this sketch isn't too complicated there is a lot of free memory left anyway. (You could now also update the README and such to reflect 4.2.2 compatibility, but I'll leave that up to you - 4.2.2 is a subversion of 4.2)