Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix energyReset command issue #6561 #6564

Merged
merged 1 commit into from
Oct 6, 2019
Merged

Fix energyReset command issue #6561 #6564

merged 1 commit into from
Oct 6, 2019

Conversation

pablozg
Copy link
Contributor

@pablozg pablozg commented Oct 4, 2019

Now we only use the hardware energy total counter as reference if the "setOption72" is enabled.

@pablozg
Copy link
Contributor Author

pablozg commented Oct 4, 2019

Hi, I'm sorry but I pressed by mistake the close PR button.

When setoption is set to 1 we use hardware as reference, when 0 we use the firmware counter.

The default option is a question for Theo 😅

@pablozg pablozg closed this Oct 4, 2019
@pablozg pablozg reopened this Oct 4, 2019
@andrethomas
Copy link
Contributor

Is there a specific reason why this would need to be changed during runtime?

Assuming it would be either enabled or disabled permanently it may be beneficial to set this in my_user_config.h

Just a thought...

@meingraham
Copy link
Collaborator

even better - user_config_override.h 😉

@pablozg
Copy link
Contributor Author

pablozg commented Oct 6, 2019

Assuming it would be either enabled or disabled permanently it may be beneficial to set this in my_user_config.h

As the "sonoff-sensors" firmware has activated all supported meters, I think we have to support a precompiled option to enable or disable the hardware sync, them the users can choose what they needs without to have to compile all firmware every time they want to change it, and the change don't have a code impact because only use a existing bit.

@arendst arendst merged commit ec9fa4f into arendst:development Oct 6, 2019
@arendst
Copy link
Owner

arendst commented Oct 6, 2019

Agree with @pablozg and will merge. The default will be the long standing firmware counter (0), the hardware counter should be (1).

Thx all for input and considerations

@meingraham
Copy link
Collaborator

Is this applicable only to the DDS238?

@arendst
Copy link
Owner

arendst commented Oct 6, 2019

No. It's applicable to all sensors with hardware energy total support. Currently they are

  • All PZEMs
  • SDM120
  • SDM630
  • DDS238
  • DDSU666

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

Successfully merging this pull request may close these issues.

None yet

4 participants