Skip to content

Added custom cluster for energy consumption data for Neo smart plug#762

Merged
marcelveldt merged 2 commits intomatter-js:mainfrom
jf-wm:main
Jun 21, 2024
Merged

Added custom cluster for energy consumption data for Neo smart plug#762
marcelveldt merged 2 commits intomatter-js:mainfrom
jf-wm:main

Conversation

@jf-wm
Copy link
Copy Markdown
Contributor

@jf-wm jf-wm commented Jun 17, 2024

I added a custom cluster definition for energy consumption data that the Neo Coolcam Matter smart plug measures and writes to this cluster.

However the raw values for voltage and watt will need additional scaling, the voltage raw value for e.g. 227.3 V is "2273", the watt raw value for e.g. 10.1 W is "101". Current is reported in mA. Wattaccumulated is reported in Wh, however the time frame for each accumulation measurement does not seem to be constant.

In addition I could not yet find a raw value for total energy consumption, even so the Tuya app reports such a value.

I added a custom cluster for energy consumption data that the Neo Coolcam Matter smart plug measures. 

However the raw values for voltage and watt will need additional scaling, the voltage raw value for e.g. 227.3 V is "2273", the watt raw value for e.g. 10.1 W is "101". Current is reported in mA. Wattaccumulated is reported in Wh, however the time frame for each accumulation measurement does not seem to be constant.  

In addition I could not yet find a raw value for total energy consumption, even so the Tuya app reports such a value.
@marcelveldt
Copy link
Copy Markdown
Collaborator

The scaling can be done in the Home Assistant discovery schema (once we have bumped the lib there with a version that includes this change)

Comment thread matter_server/common/custom_clusters.py Outdated
@marcelveldt marcelveldt added the maintenance Code (quality) improvement or small enhancement which not a new feature label Jun 18, 2024
Copy link
Copy Markdown
Collaborator

@marcelveldt marcelveldt left a comment

Choose a reason for hiding this comment

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

Thanks @jf-wm !

@marcelveldt
Copy link
Copy Markdown
Collaborator

Don't forget that we will also need to add this to the HA discovery schema, once the library version has been bumped.
Check Eve for an example: https://github.com/home-assistant/core/blob/dev/homeassistant/components/matter/sensor.py#L173

@marcelveldt marcelveldt merged commit 422c860 into matter-js:main Jun 21, 2024
@marcelveldt
Copy link
Copy Markdown
Collaborator

marcelveldt commented Jul 3, 2024

@jf-wm FYI: home-assistant/core#121080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Code (quality) improvement or small enhancement which not a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants