Skip to content
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

Merged
merged 1 commit into from Aug 4, 2020

Conversation

Roosted7
Copy link
Contributor

@Roosted7 Roosted7 commented Jan 4, 2020

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)

This was referenced Jan 4, 2020
@fliphess
Copy link
Owner

fliphess commented Aug 4, 2020

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)

@fliphess fliphess merged commit facbebe into fliphess:master Aug 4, 2020
@proddy
Copy link

proddy commented Aug 4, 2020

@Roosted7 thanks for this. I was just about to wire up a circuit to my MA105C and use this software

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants