sinricpro / esp8266-esp32-sdk

Library for https://sinric.pro - simple way to connect your device to Alexa, Google Home, SmartThings and cloud
https://sinric.pro
Other
234 stars 124 forks source link

How to set consumed energy values in PowerSensor ('Today', 'This month' and 'Total') #233

Closed RoSchmi closed 2 years ago

RoSchmi commented 2 years ago

I'm working on an application to switch and monitor the power consumption on a Fritz!Dect 200 switchable power socket using the 'Switch' and 'Energy Sensor' template and the Sinric Pro iOS App. Everything works fine so far and I can switch the socket and read and transmit power values from the socket. However in the 'Energy Sensor' control on the iPhone energy values for 'Today', 'This month' and 'Total' are displayed and I couldn't find a method how to change these values and I even don't know, where the displayed values come from. Could you please point me to the right direction. Regards RoSchmi

kakopappa commented 2 years ago

Whatever you send

https://github.com/sinricpro/esp8266-esp32-sdk/blob/master/examples/PowerSensor/PowerSensor.ino Line 85 gets stored in the server and aggregated in the server over the time.

These values cannot be changed manually in the server

On Thu, 2 Dec 2021 at 6:50 PM RoSchmi @.***> wrote:

I'm working on an application to switch and monitor the power consumption on a Fritz!Dect 200 switchable power socket using the 'Switch' and 'Energy Sensor' template and the Sinric Pro iOS App. Everything works fine so far and I can switch the socket and read and transmit power values from the socket. However in the 'Energy Sensor' control on the iPhone energy values for 'Today', 'This month' and 'Total' are displayed and I couldn't find a method how to change these values and I even don't know, where the displayed values come from. Could you please point me to the right direction. Regards RoSchmi

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/233, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZVG7JDV7ZPI6A2VZA3UO5MRDANCNFSM5JG5HAUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

RoSchmi commented 2 years ago

Thanks @kakopapa for your answer, I think it would be nice if the values could be set (or at least resetted to 0). In my application I do not read the power values all the time but only when I switch the socket or switch the 'Energy Sensor' to on from time to time. So the reported energy values do not represent the really consumed (or produced) energy. The values would only reflect the consumed energy if the measurements were taken in short and constant intervals. So in my application I would like to reset them to 0 with every upload to avoid thinking about what these values might mean. Btw: Actually in my application the values are shown in units of 'MW'. Wouldn't it be correct to use e.g. mWh, Wh, kWh or J(oule)?

Not to forget: Thank you for your great work. On the ESP32 it works very reliable, as far as I can say for now.

kakopappa commented 2 years ago

Thank you for your feedback.

We will add an option to reset the counters in the next release.

Units start with Wh, if you have consumed more than 1000 wh, then roll over to kWh

On Thu, Dec 2, 2021 at 9:30 PM RoSchmi @.***> wrote:

Thanks @kakopapa for your answer, I think it would be nice if the values could be set (or at least resetted to 0). In my application I do not read the power values all the time but only when I switch the socket or switch the 'Energy Sensor' to on from time to time. So the reported energy values do not represent the really consumed (or produced) energy. The values would only reflect the consumed energy if the measurements were taken in short and constant intervals. So in my application I would like to reset them to 0 with every upload to avoid thinking about what these values might mean. Btw: Actually in my application the values are shown in units of 'MW'. Wouldn't it be correct tu use e.g. mWh, Wh, kWh or J(oule)?

Not to forget: Thank you for your great work. On the ESP32 it works very reliable, as far as I can say for now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/233#issuecomment-984679213, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZUTLIDK3753XMF5AVLUO57HHANCNFSM5JG5HAUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kakopappa commented 2 years ago

BTW, We have two types of energy measurements.

  1. Estimates

You can specify the device energy usage when you create a device and then the system will calculate the consumption when during the on/off phase. You can see the consumptions in the "energy estimates" tab in the portal. Consumption ratings are sent to Alexa during the device discovery phase so these will be calculated and shown in Alexa app as well. (may take time to reflect)

  1. Via Energy Sensor.

This is for devices that have a sensor that can read actual consumptions. Alexa integration for this is not completed yet.

On Fri, Dec 3, 2021 at 11:14 AM Aruna Tennakoon @.***> wrote:

Thank you for your feedback.

We will add an option to reset the counters in the next release.

Units start with Wh, if you have consumed more than 1000 wh, then roll over to kWh

On Thu, Dec 2, 2021 at 9:30 PM RoSchmi @.***> wrote:

Thanks @kakopapa for your answer, I think it would be nice if the values could be set (or at least resetted to 0). In my application I do not read the power values all the time but only when I switch the socket or switch the 'Energy Sensor' to on from time to time. So the reported energy values do not represent the really consumed (or produced) energy. The values would only reflect the consumed energy if the measurements were taken in short and constant intervals. So in my application I would like to reset them to 0 with every upload to avoid thinking about what these values might mean. Btw: Actually in my application the values are shown in units of 'MW'. Wouldn't it be correct tu use e.g. mWh, Wh, kWh or J(oule)?

Not to forget: Thank you for your great work. On the ESP32 it works very reliable, as far as I can say for now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/233#issuecomment-984679213, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZUTLIDK3753XMF5AVLUO57HHANCNFSM5JG5HAUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

RoSchmi commented 2 years ago

That's great, thank you

stale[bot] commented 2 years ago

This issue has gone quiet. Spooky quiet. We currently close issues after 14 days of inactivity. It’s been at least 7 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks for being a part of the SinricPro community!

stale[bot] commented 2 years ago

Hey again! It’s been 14 days since anything happened on this issue, so our friendly robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks again for being a part of the SinricPro community!