Closed FrAcTi0N closed 10 months ago
And how you access the data? By requesting get with the consumption key only?
Can you pleas rtemve the package.json change and package-lock change from the PR? We use a release script which automates the versioning
(alternatively I can also take over the one line myself) ;-)
package-lock.json and package.json should be removed from PR. I use one time request for all data with dev.getData() and parse all the stuff i need from that afterwards.
or dev.getData('climateControlMainZone', 'consumptionData', '/electrical').heating --> to get 3 arrays (hourly, daily, monthly) with consumption values for heating. "climateControlMainZone" is used by my heatpump instead of "climateControl". Also you can use "cooling" instead of heating to get it for cooling state...
and of course, you can take that one line yourself.)
Could youplease be so kind and pos the data returned by dev.getData('climateControlMainZone', 'consumptionData', '/electrical') here? (I do not have such devices personally but want to make sure my assumption is rught about data)
sorry, once again. There you are.
{ heating: { d: [ 2, 2, 3, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 3, 2, 3, 1, 0, 1, 1, null, null, null ], w: [ 16, 15, 17, 25, 18, 22, 26, 20, 15, null, null, null, null, null ], m: [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 11, 0, 0, 230, 455, 158, null ] }, cooling: { d: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, null, null ], w: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, null, null, null, null, null ], m: [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 25, 72, 53, 46, 0, 0, 0, null ] } }
well,wait a bit please. I think it needs a bit more to work as expected...
Re your last PR: I also was thinking about how to best detect that special case. maybe go for "/electrical" and "is Object as content" as latest key for now?
Updated that one liner so it doesn't change the structure of other properties. It should be ready now. Sorry for confusion.
See my last comment ... maybe even better to include /electical as "special case end node" and do ot check for the actual "sub content"?
yep, this one looks like do the trick and doesn't kick the other stuff.) Thanks
Would it make sense to put the timestamps at each data point? I guess we can use lastUpdateReceived
as reference.
Do we have more detailed consumption data available like timestamps? Guessing all data is UTC+0 I would end up with something like this if we look at the daily metrics:
[
{ time: 2023-02-27T00:00:00.000Z, value: 7 }, // yesterday 00:00-02:00
{ time: 2023-02-27T02:00:00.000Z, value: 4 },
{ time: 2023-02-27T04:00:00.000Z, value: 4 },
{ time: 2023-02-27T06:00:00.000Z, value: 5 },
{ time: 2023-02-27T08:00:00.000Z, value: 3 },
{ time: 2023-02-27T10:00:00.000Z, value: 2 },
{ time: 2023-02-27T12:00:00.000Z, value: 2 },
{ time: 2023-02-27T14:00:00.000Z, value: 0 },
{ time: 2023-02-27T16:00:00.000Z, value: 2 },
{ time: 2023-02-27T18:00:00.000Z, value: 10 },
{ time: 2023-02-27T20:00:00.000Z, value: 7 },
{ time: 2023-02-27T22:00:00.000Z, value: 0 },
{ time: 2023-02-28T00:00:00.000Z, value: 10 }, // today 00:00-02:00
{ time: 2023-02-28T02:00:00.000Z, value: 5 },
{ time: 2023-02-28T04:00:00.000Z, value: 4 },
{ time: 2023-02-28T06:00:00.000Z, value: 4 },
{ time: 2023-02-28T08:00:00.000Z, value: 1 },
{ time: 2023-02-28T10:00:00.000Z, value: 0 },
{ time: 2023-02-28T12:00:00.000Z, value: 4 },
{ time: 2023-02-28T14:00:00.000Z, value: 2 },
{ time: 2023-02-28T16:00:00.000Z, value: 3 },
{ time: 2023-02-28T18:00:00.000Z, value: 3 },
{ time: 2023-02-28T20:00:00.000Z, value: 4 },
{ time: 2023-02-28T22:00:00.000Z, value: null }
]
@FrAcTi0N Are you still looking tinto this? me too ... I would need adebug log with the full json data I want to understand what is different
@FrAcTi0N Are you still looking tinto this? me too ... I would need adebug log with the full json data I want to understand what is different
I am a bit busy right now. I hope I will find some time in September...
@FrAcTi0N no problem, if you have a full data json log somewhere flying around that I can see the structure add id nd I might find some mins I assume the datapoint is just structured differently
PA: Kind of that line https://github.com/Apollon77/daikin-controller-cloud/blob/main/example/example.js#L75
fixed by 1.2.0
Hourly/daily/weekly consumption information is available.