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

Energy reporting #6

Closed
enesbcs opened this issue Mar 11, 2023 · 4 comments
Closed

Energy reporting #6

enesbcs opened this issue Mar 11, 2023 · 4 comments

Comments

@enesbcs
Copy link
Owner

enesbcs commented Mar 11, 2023

All values reported by the Shellies with Watt-minute will be incorrect on the Domoticz side, until division implemented in the templates.

If you check templates in database, you can see:
"val_tpl": "{{(value|float/60)|round(2)}}"}

Which is needed for conversion to Watthour (or kWh). Until it will be supported in Domoticz, the energy devices will be disabled by default, but can be enabled manually if you wish on the Domoticz device list, as it is added anyway.

@enesbcs
Copy link
Owner Author

enesbcs commented Mar 11, 2023

In case anyone wants to experiment with that, change MQTT template database lines from:
"unit_of_meas": "Wh", "val_tpl": "{{(value|float/60)|round(2)}}"
to:
"unit_of_meas": "Wm", "val_tpl": "{{(value|round(2)}}"}
and lets see how it works..

@enesbcs
Copy link
Owner Author

enesbcs commented Sep 7, 2023

Latest Domoticz 2023 beta 15526 now supports Watt-hour and Watt-minute so division is no longer necessary templates are updated at commit
3a2248f
If you have problems with energy devices delete them from Domoticz and repeat the teaching process.

@enesbcs enesbcs closed this as completed Sep 7, 2023
@Xavier82
Copy link

Xavier82 commented Oct 13, 2023

Hi Alexander,

Just to clarify.....
In de Domoticz Beta 15526 there is support for Watt-hour and Watt-minute.

The question I have about this:
At this moment in the old Shelly Python Plugin energy devices were created as Device Type "General" with SubType "kWh", with MQTT Autodisovery energy devices are created as Device Type "General" with SubType "Custom Sensor".
With the fix in Domoticz beta 15526 will energy devices now be created as Device Type "General" with SubType "kWh"?
This since Subtype "kWh" is more common then "Custom Sensor".

Thanks for your answer.

EDIT UPDATE 13-10-2023:
Build test environment with latest Domoticz beta version.
Added MQTT autodiscovery hardware (LAN) in Domoticz
Ran the ShellyTeacher4Domo script
Booted a Shelly device (with MQTT server of the test environment)
Devices were created.
For energy device it is now Device Type "General" with SubType "kWh" which is correct.

Since BETA is not my thing I need to wait for next stable release of Domoticz

@enesbcs
Copy link
Owner Author

enesbcs commented Oct 13, 2023

Hi Alexander,

Just to clarify..... In de Domoticz Beta 15526 there is support for Watt-hour and Watt-minute.

The question I have about this: At this moment in the old Shelly Python Plugin energy devices were created as Device Type "General" with SubType "kWh", with MQTT Autodisovery energy devices are created as Device Type "General" with SubType "Custom Sensor". With the fix in Domoticz beta 15526 will energy devices now be created as Device Type "General" with SubType "kWh"? This since Subtype "kWh" is more common then "Custom Sensor".

Thanks for your answer.

Yes, the type will be kWh from.
See solved Domo issue domoticz/domoticz#5812

EDIT UPDATE 13-10-2023: Build test environment with latest Domoticz beta version. Added MQTT autodiscovery hardware (LAN) in Domoticz Ran the ShellyTeacher4Domo script Booted a Shelly device (with MQTT server of the test environment) Devices were created. For energy device it is now Device Type "General" with SubType "kWh" which is correct.
Since BETA is not my thing I need to wait for next stable release of Domoticz

Thank you for testing, the next stable Domoticz will has got several other MQTT enhancements also, such as dimmer device status update, Shelly TRV support and Gen2 cover device support.

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

No branches or pull requests

2 participants