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

Make AC motor check more region agnostic #45

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

GingerSnap-xx
Copy link
Contributor

Starting to get myself familiar with the codebase to try to resolve a bug I reported. I noticed this voltage check seems to be assuming an EU or UK mains voltage of 220. In the US it is 120 (or 110 depending on who you ask), and according to Wikipedia, some countries (Japan) go as low as 100!

Without some knowledge that regardless of what the true ac voltage is it gets reported as 220, I assumed this was something that might not be accurate in all cases and figured I'd submit a fix to open it up a bit.

Copy link
Owner

@starkillerOG starkillerOG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I removed the comment, because I don't think it is needed

@starkillerOG
Copy link
Owner

Thank you for the PR, did you actually have a AC blind reporting a voltage between 100 and 220 V?

@starkillerOG starkillerOG merged commit 4a68e2d into starkillerOG:main Jun 22, 2024
5 checks passed
@GingerSnap-xx
Copy link
Contributor Author

Thank you for the PR, did you actually have a AC blind reporting a voltage between 100 and 220 V?

I did not have one myself, so it was mostly speculative. The only reason I would think you wouldn't get 120 would be is if there's a transformer at play upstream of the sensor. I can try to get a hold of a model that uses AC motors to test it. If you already know of a good low cost one I could use that'd be awesome otherwise I'll look around.

@starkillerOG
Copy link
Owner

I don't think testing will be nessesary.
Besides it could very well be that the voltage is hardcoded to 230V and not actually measured. (Why would they measure the 230V, kind of pointless)

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.

2 participants