This repository has been archived by the owner on May 26, 2021. It is now read-only.
Fix compatibility with latest SoftwareSerial and DSMR 4.2.2 #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for your cool project! After changing two small things, I've now got my energy in HA 馃憤
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)