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

No energie information in app dashboard #4

Open
HermanHSlagman opened this issue Feb 12, 2019 · 65 comments
Open

No energie information in app dashboard #4

HermanHSlagman opened this issue Feb 12, 2019 · 65 comments

Comments

@HermanHSlagman
Copy link

I have installed the app, on/off switching works fine.
I knew that the connected device is consuming power, but I don't see this in the consuming dashboard. The "energiemeter", "ontvangen" and the "energie" levels or not filled (they were zero).
screenshot_20190212-210102

@kasteleman
Copy link
Owner

kasteleman commented Feb 12, 2019 via email

@HermanHSlagman
Copy link
Author

Hi Martin,

I'm consuming electricity with the Plug HA. My (small) electric car is connected.
Please let me know what you mean with "Also no values visible in insights for the other?", I don't understand this, Sorry.

Regards, Herman.

@kasteleman
Copy link
Owner

kasteleman commented Feb 19, 2019 via email

@HermanHSlagman
Copy link
Author

Hi Martin,
Are you familiar with cli app install? Sorry, I'm not. I don't understand what you mean with: I suspect that the reportlistener isn’t registered.
I use Homey version 2.xx

Regards, Herman.

@kasteleman
Copy link
Owner

kasteleman commented Feb 19, 2019 via email

@HermanHSlagman
Copy link
Author

I'm sorry Martin, I'm not a programmer and can't help you with debugging this issue.
I have a look at wiki about cli method, but I don't understand the information about my Homey and my the app.
If I can do simple things for you (as an advanced user), I will help you with pleasure.
Regards, Herman.

@kasteleman
Copy link
Owner

kasteleman commented Feb 19, 2019 via email

@HermanHSlagman
Copy link
Author

I understand, success Martin with solving the issue.

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

I experienced the same problem.
The Plug functioned fine with Homey firmware 1.5, but after the update of the Plugwise Zigbee Support apk to v 1.0.1 the Plug started to appear buggy. I did send the Plug back to the supplier and contacted Plugwise about the issues I was experiencing:

onoff was communicated propely as soon as there was an event
meter_power was communicated only once; right after the install
meter_received was not communicated anymore (Plugwise firmware is bad: wrong variable type...)
measure_power was communicated only once; right after the install
alarm_poweroverload is still communicated on a regular base (once every 10 minutes?)

Now it seems it is not due to a bad Plug, but to the new App...

I downloaded some old versions of the app (20180426 and 20190125) and installed those by cli, but no improvement. The value for measured_power is communicated once, just after the installation.

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

As Plugwise decided for a wrong version of the variable for meter_received (max is 256) they also moved the decimal point: their 0,255 kWh is 0,0255 kWh in reality. after reaching this maximum the counter resets...
This will be solved in the firmware update they should release in April.

Also strange is the naming of the variables measured by the Plug:
meter is used for energy, so values measuring energy in (k)Wh
measure is used for power, so values measuring power in W
I would suggest:
meter_power energy_(in/ delivered/ import)
meter_received energy_(out/ received/ export)
measure_power power_now
The implementation of measure_power was correct, as the value for reversed power (by e.g. PV) was displayed as a negative number

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

Onderstaand de output van de app versie van 2018-04-26
Ik zal later ook de output van de laatste versie posten.

— Profile your app's performance at https://go.athom.com/app-profiling?homey=5aa8f8b205eff5043791a40d&app=com.plugwise.zigbee
─────────────── Logging stdout & stderr ───────────────
Warning: Trying to access Homey.env.HOMEY_LOG_URL but the environment variable has not been set!
2019-02-21 18:29:55 [log] [PlugwiseZigbeeApp] init
2019-02-21 18:29:56 [log] [ManagerDrivers] [Plug] [0] ZigBeeDevice has been inited
2019-02-21 18:29:56 [log] [ManagerDrivers] [Plug] [0] ------------------------------------------
2019-02-21 18:29:56 [log] [ManagerDrivers] [Plug] [0] Node: 6b5a86ea-ad4d-48e4-b27d-f4e1f88f3c8d
........
2019-02-21 18:29:56 [log] [ManagerDrivers] [Plug] [0] ---- acActivePowerOverload : 0
2019-02-21 18:29:56 [log] [ManagerDrivers] [Plug] [0] ------------------------------------------
2019-02-21 18:29:56 [err] [ManagerDrivers] [Plug] [0] registerAttrReportListener() -> error could not configure attrReport_0_genOnOff_onOff { Error: data is not defined
at Object.JSON.parse (/opt/homey-client/system/helpers/jsonfns.js:1:1190)
at JSON.parse ()
.....
2019-02-21 18:29:56 [err] [ManagerDrivers] [Plug] [0] registerAttrReportListener() -> error could not configure attrReport_0_seMetering_currentSummDelivered { Error: data is not defined
at Object.JSON.parse (/opt/homey-client/system/helpers/jsonfns.js:1:1190)
....
at _combinedTickCallback (internal/process/next_tick.js:142:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
(node:8915) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

AthomAppRun 20180426.txt

@MischaKluin
Copy link

2019-02-21 18:34:56 [log] [ManagerDrivers] [Plug] [0] [dbg] Polling clusterId 'haElectricalMeasurement' for capabilityId 'alarm_poweroverload'

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

Thanks.
Do you still want the output for the latest version of your app?

I could give you access to my Homey with fw 2.0.2 ...

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

PowerOverload was fixed properly on Jan 29th !

Every 5 minutes:
2019-02-21 18:34:56 [log] [ManagerDrivers] [Plug] [0] [dbg] Polling clusterId 'haElectricalMeasurement' for capabilityId 'alarm_poweroverload'
2019-02-21 18:39:57 [log] [ManagerDrivers] [Plug] [0] [dbg] Polling clusterId 'haElectricalMeasurement' for capabilityId 'alarm_poweroverload'
2019-02-21 18:44:57 [log] [ManagerDrivers] [Plug] [0] [dbg] Polling clusterId 'haElectricalMeasurement' for capabilityId 'alarm_poweroverload'

As is OnOff
2019-02-21 18:46:36 [log] [ManagerDrivers] [Plug] [0] set onoff -> false
2019-02-21 18:46:39 [log] [ManagerDrivers] [Plug] [0] set onoff -> true

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

I know about reducing the pollling load.
If you would make a build (even with frequent polling) I will be able to test on fw 2.0 via CLI.

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

I'm on Slack.

@MischaKluin
Copy link

First thing: how do you plan to get the new firmware on the device? Homey does not support ota.

Friend of mine has a USB Zigbee stick, and I live very close to the Plugwise devs...

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

I'm on Slack, but not yet part of the Homey workspace...

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

Results for 1.0.2 (22df413 )

Capability | Type | Value | Edit value | Last Updated
onoff | boolean | true | truefalse | 47 seconds ago
meter_power | number | null |   |  
meter_received | number | null |   |  
measure_power | number | null |   |  
alarm_poweroverload | boolean | false |   | 1 minute ago

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

2019-02-21 22:04:06 [err] [ManagerDrivers] [Plug] [0] registerAttrReportListener() -> error could not configure attrReport_0_genOnOff_onOff { Error: data is not defined
.....

AthomAppRun20190221a.txt

@kasteleman
Copy link
Owner

kasteleman commented Feb 21, 2019 via email

@MischaKluin
Copy link

MischaKluin commented Feb 21, 2019

Will try now...
Done

@MischaKluin
Copy link

MischaKluin commented Apr 5, 2019 via email

@kasteleman
Copy link
Owner

kasteleman commented Apr 5, 2019 via email

@MischaKluin
Copy link

At this moment the PV delivers around 50 Watt of power.

Capability Type Value Edit value Last Updated
onoff boolean true truefalse 1 minute ago
meter_power number 0   7 minutes ago
meter_received number 0.252   7 minutes ago
measure_power number 0   11 hours ago
alarm_poweroverload boolean false   2 minutes ago

AthomAppRun20190406a.txt

@MischaKluin
Copy link

Had je wat aan de data en kan ik evt al iets testen?

@kasteleman
Copy link
Owner

kasteleman commented Apr 15, 2019 via email

@MischaKluin
Copy link

MischaKluin commented Apr 15, 2019

AthomAppRun20190415a.txt
Logging 40 minuten, aflopende opbrengst zonnepanelen.

Capability | Type | Value | Edit value | Last Updated
onoff | boolean | false | truefalse | 3 minutes ago
meter_power | number | 0 |   | 3 minutes ago
meter_received | number | 0.174 |   | 3 minutes ago
measure_power | number | 0 |   | 10 hours ago
alarm_poweroverload | boolean | false |   | 2 minutes ago

currentSummDelivered wordt goed verwerkt, nu geen verbruik...
currentSummReceived wordt gemeten en gerapporteerd, maar variabele heeft te klein type (in firmware van plugwise...)
zodra waarden negatief zijn geeft instantaneousDemand niks meer door ...

@kasteleman
Copy link
Owner

kasteleman commented Apr 15, 2019 via email

@MischaKluin
Copy link

MischaKluin commented Apr 15, 2019

meter_power loopt nu niet op omdat de plug wordt gebruikt voor het meten van zonnepanelen.
Er zou nu dus alleen een oplopende meter_received moeten zijn (met 'random' waarden tussen 0.000 en 0.255 Wh) en measure_power zou een negatieve waarde moeten hebben (van 0 tot -500 Watt).

@kasteleman
Copy link
Owner

Pushed a version to GitHub to allow value below -2 for measure_power.
Also corrected the meter_power and meter_received (u48 type).
Unfortunately can't test. So please feel free to test and report back!

@MischaKluin
Copy link

MischaKluin commented May 11, 2019

Ik heb de nieuwe software geïnstalleerd, Plug opnieuw met netwerk verbonden.
Hieronder de resultaten uit Homey Developer Devices en de log file.

Capability | Type | Value | Edit value | Last Updated
onoff | boolean | true | truefalse | 9 minutes ago
meter_power | number | null |   | 16 minutes ago
meter_received | number | null |   | 16 minutes ago
measure_power | number | 6.3 |   | 28 minutes ago
alarm_poweroverload | boolean | false |   | 11 minutes ago

AthomAppRun20190511.txt

Measure power wordt niet ververst en app werd na 10 minuten lopen afgesloten

@kasteleman
Copy link
Owner

kasteleman commented May 11, 2019 via email

@kasteleman
Copy link
Owner

Ik heb een nieuwe versie gepushed. Wil je die testen en de log wederom sturen?

@MischaKluin
Copy link

MischaKluin commented May 11, 2019

Doe ik, laat de app 15 minuten lopen.
Nu helaas geen power door de PV-plug, zon is uit...
Beter nu, waarde voor Power wordt ververst!

AthomAppRun20190511b.txt

Ik zal morgenochtend een run doen met zonlicht en log uploaden

@MischaKluin
Copy link

Meter Received krijgt regelmatig data binnen, lijkt me niet goed geformatteerd.
Power krijgt zeer zelden updates, zou nu negatieve waarden moeten geven (tussen -50 en -500Watt)

AthomAppRun20190511b2.txt

@kasteleman
Copy link
Owner

ok, measure_power report listener was nog niet aangepast. Daarom alleen initieel een waarde. Aanpassing gedaan en tevens de andere weer teruggezet naar readUIntBE. Graag testen. Heb je toevallig een andere manier om de waarden te vergelijken?

@MischaKluin
Copy link

MischaKluin commented May 12, 2019

instantaneousDemand werkt nu perfect:
elke 10s een update (veld met 1 decimaal) die klopt met mijn referentiemeter.
currentSummReceived wordt ook doorgegeven.
Waarden lijken nu te worden doorgegeven in Wh x100 of kWh/10:
0.164 en 10 min later bij 15 Watt 0.194

Dank!
Ik zal log half uur laten lopen en dan in deze post toevoegen.

Homey Insigths presenteert overigens alleen de waarden voor Energie (instantaneousDemand ???) en Energiemeter (oncurrentSummDelevered).
Helaas niet de variabele voor Ontvangen energie.
Werk aan de winkel dus voor Athom!

Blijft ook lastig:
Vermogen/power heet bij Homey dus Energie, in de code Demand; terwijl het ook Supply kan zijn....

AthomAppRun20190512.txt

vb
2019-05-12 19:17:35 [log] [ManagerDrivers] [Plug] [0] instantaneousDemand -158 -15.8
2019-05-12 19:17:46 [log] [ManagerDrivers] [Plug] [0] currentSummDelivered [ 0, 0 ] 0
2019-05-12 19:17:46 [log] [ManagerDrivers] [Plug] [0] oncurrentSummReceived [ 0, 28580 ] 0.164
2019-05-12 19:19:40 [log] [ManagerDrivers] [Plug] [0] [dbg] Polling clusterId 'haElectricalMeasurement' for capabilityId 'alarm_poweroverload'

@kasteleman
Copy link
Owner

oncurrentSummReceived [ 0, 28610 ] 0.194 gaat fout met formatering middels readUIntBE
Waarde wordt elke keer weer gereset. Zou je ook moeten terugzien in de "InSights" van Homey.
Ik wacht nog op terugkoppeling van Athom, maar heb nu even "const parsedValue = value[1] / 100;" gebruikt en gepushed. Weet niet zeker of dat m.b.t. de waarden goed gaat.

@MischaKluin
Copy link

MischaKluin commented May 12, 2019

oncurrentSummReceived had ook te maken met een foute implementatie van Plugwise in de firmware van de Plug: een te kleine variabele genomen (2 bytes).
Zouden ze in een nieuwe firmware oplossen, maar ik heb nog niks van ze vernomen.

Morgenochtend is er weer zon ...

@MischaKluin
Copy link

Data ziet er nu goed uit, oncurrentSummReceived is werkbaar zo.
Nog mooier zou zijn om de waarde *10 te communiceren, dan is het in Wh

De onChange kaart in Homey Flow voor "Ontvangen meterstand is veranderd" werkt nu nog niet.

AthomAppRun20190512b2.txt

@kasteleman
Copy link
Owner

kasteleman commented May 13, 2019 via email

@MischaKluin
Copy link

2019-05-13 09:38:32 [log] [ManagerDrivers] [Plug] [0] currentSummDelivered [ 0, 0 ] 0
2019-05-13 09:38:32 [log] [ManagerDrivers] [Plug] [0] oncurrentSummReceived [ 0, 29380 ] 293.8

Alleen de decimaal iets verplaatsen zou voor de GUI toch geen probleem moeten zijn?
Dus van [ 0, 29380 ] 293.8 naar bv [ 0, 29380 ] 2938.0

onChange kan te maken hebben met de naamgeving in de logging?
currentSumm... vs oncurrentSumm...

@kasteleman
Copy link
Owner

kasteleman commented May 13, 2019 via email

@kasteleman
Copy link
Owner

Aanpassing gedaan. Ik heb zelf nog niet kunnen achterhalen waarom de flow het niet doet. Ook wordt icoon van ontvangen stroom niet goed weergegeven in de GUI.

@MischaKluin
Copy link

MischaKluin commented May 13, 2019

Geïnstalleerd en getest, doorgeven van waarden werkt prima nu.
onChange werkt nog niet...

20190513_1546 HomeyPVplug

AthomAppRun20190513.txt

@kasteleman
Copy link
Owner

Fixed icons for the plug. Weet nog niet waarom de onChange niet werkt.

@MischaKluin
Copy link

MischaKluin commented May 13, 2019

Vandaag de nauwkeurigheid van de meter geverifieerd en werkt prima zo.
Voor de iconen en naamgeving heb ik nog wel wat ideeën:
20190513_2 HomeyPlugwiseZigbee

ENERGIEMETER
Dit is de hoeveelheid energie die verbruikt is door het apparaat dat via de Plug gekoppeld is.
VERBRUIK VERBRUIKT (ENERGY USAGE CONSUMPTION) in Wh

ONTVANGEN
Dit is de hoeveelheid energie die opgewekt is door bv zonnepanelen en teruggeleverd is via de Plug.
OPGEWEKT OPWEKKING (ENERGY PRODUCED GENERATED) in Wh

ENERGIE
Dit is het huidige vermogen dat door de Plug stroomt.
VERMOGEN (POWER) in W(att)

Voorbeeld:
20190513_4_HomeyPlugwiseZigbee

Ik kan evt de iconen in hoge resolutie maken.
Waarschijnlijk is het uiteindelijk handig om de bovenste 2 waarden (meters) uit te drukken in kWh (met 3 decimalen) i.p.v. Wh, omdat mensen dat beter herkennen. Voor mij werkt deze Wh voorlopig fijner....

20190513_5_HomeyPlugwiseZigbee

MeterIcons.zip

@kasteleman
Copy link
Owner

pushed new version: Power_received_changed trigger changed

@MischaKluin
Copy link

MischaKluin commented May 19, 2019

Mooi.
Ik heb de nieuwe versie geïnstalleerd, maar zon was al onder dus beperkte resultaten...
Morgenochtend zal ik opnieuw run doen en logfile posten.

AthomAppRun20190519.txt

2e run: helaas geen workflow afgegaan door trigger meterReceived ....
AthomAppRun20190520.txt

@MischaKluin
Copy link

In Homey Insights zijn nu slechts 2 waarden zichtbaar:
Energie (vermogen)
Energiemeter (geleverde energie)
Ontvangen meter is niet meer zichtbaar.

@kasteleman
Copy link
Owner

Kleine aanpassing gedaan. Alledrie zijn in mijn opstelling zichtbaar.

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

No branches or pull requests

3 participants