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

Add power/energy metering to Samotech SM309-S #5384

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

alexjfisher
Copy link
Contributor

When the device support was originally added, it was a straight copy of the SM309 code. This newer variant exposes power/energy use.

The reporting min and change parameters shamelessly cargo culted from

await reporting.rmsVoltage(endpoint, {min: 10, change: 20}); // Voltage - Min change of 2V
await reporting.rmsCurrent(endpoint, {min: 10, change: 10}); // A - z2m displays only the first decimals, change of 10 / 0,01A
await reporting.activePower(endpoint, {min: 10, change: 15}); // W - Min change of 1,5W
await reporting.currentSummDelivered(endpoint, {min: 300}); // Report KWH every 5min
but they look like sensible enough settings to me.

Tested with home assistant and the zigbee2mqtt addon. Seems to work just fine.

{
    "brightness": 254,
    "linkquality": 140,
    "power_on_behavior": "previous",
    "state": "ON",
    "current": 1.15,
    "energy": 2.71,
    "power": 275.5,
    "voltage": 238.4
}

@Koenkk
Copy link
Owner

Koenkk commented Jan 23, 2023

Thanks!

@alexjfisher alexjfisher deleted the sm309-s_power_monitoring branch January 23, 2023 19:30
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