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

HC=1 and HP=1 at the same time #22

Open
aladin2000 opened this issue Feb 6, 2020 · 10 comments
Open

HC=1 and HP=1 at the same time #22

aladin2000 opened this issue Feb 6, 2020 · 10 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@aladin2000
Copy link

Hi, I got data are considered HC and HP in the same time ;
Is it a bug ?

My HC/HP timing are:
HP= 7h22-12h22 and 07h22-12h22
and
HC 12h22/13h52 and 01h32/07h22
my params is:
"hc":
[{
"start": { "h": 0, "m": 52 },
"end": { "h": 7, "m": 22 }
},{
"start": { "h": 12, "m": 22 },
"end": { "h": 13, "m": 52 }
}]

I use lates version of the py code 👍 2020-02-06 14:06:37,004 get Data

from Enedis from 05/02/2020 to 06/02/2020
2020-02-06 14:06:40,432 found value ordre( 1) : 1.79 kWh at 2020-02-05T00:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,434 found value ordre( 2) : 2.06 kWh at 2020-02-05T00:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 3) : 3.20 kWh at 2020-02-05T01:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 4) : 1.92 kWh at 2020-02-05T01:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 5) : 1.74 kWh at 2020-02-05T02:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,435 found value ordre( 6) : 1.83 kWh at 2020-02-05T02:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,439 found value ordre( 7) : 1.80 kWh at 2020-02-05T03:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,440 found value ordre( 8) : 2.16 kWh at 2020-02-05T03:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,440 found value ordre( 9) : 1.79 kWh at 2020-02-05T04:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,440 found value ordre( 10) : 1.62 kWh at 2020-02-05T04:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,441 found value ordre( 11) : 1.75 kWh at 2020-02-05T05:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 12) : 1.47 kWh at 2020-02-05T05:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 13) : 1.79 kWh at 2020-02-05T06:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 14) : 2.21 kWh at 2020-02-05T06:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 15) : 1.89 kWh at 2020-02-05T07:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 16) : 1.75 kWh at 2020-02-05T07:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 17) : 1.75 kWh at 2020-02-05T08:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 18) : 1.33 kWh at 2020-02-05T08:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 19) : 1.94 kWh at 2020-02-05T09:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 20) : 2.63 kWh at 2020-02-05T09:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,442 found value ordre( 21) : 2.43 kWh at 2020-02-05T10:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 22) : 1.82 kWh at 2020-02-05T10:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 23) : 0.72 kWh at 2020-02-05T11:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 24) : 0.35 kWh at 2020-02-05T11:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 25) : 0.66 kWh at 2020-02-05T12:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 26) : 1.58 kWh at 2020-02-05T12:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 27) : 0.26 kWh at 2020-02-05T13:00:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 28) : 0.18 kWh at 2020-02-05T13:30:00Z (HC:1/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 29) : 0.15 kWh at 2020-02-05T14:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 30) : 0.11 kWh at 2020-02-05T14:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 31) : 0.11 kWh at 2020-02-05T15:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 32) : 0.10 kWh at 2020-02-05T15:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,443 found value ordre( 33) : 0.12 kWh at 2020-02-05T16:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 34) : 0.11 kWh at 2020-02-05T16:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 35) : 0.14 kWh at 2020-02-05T17:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 36) : 0.13 kWh at 2020-02-05T17:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 37) : 0.92 kWh at 2020-02-05T18:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 38) : 1.88 kWh at 2020-02-05T18:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 39) : 2.00 kWh at 2020-02-05T19:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 40) : 1.88 kWh at 2020-02-05T19:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 41) : 3.11 kWh at 2020-02-05T20:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 42) : 3.00 kWh at 2020-02-05T20:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 43) : 2.94 kWh at 2020-02-05T21:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 44) : 2.98 kWh at 2020-02-05T21:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,444 found value ordre( 45) : 2.91 kWh at 2020-02-05T22:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,445 found value ordre( 46) : 3.00 kWh at 2020-02-05T22:30:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,445 found value ordre( 47) : 2.90 kWh at 2020-02-05T23:00:00Z (HC:0/HP:1/HN:0)
2020-02-06 14:06:40,445 found value ordre( 48) : 1.73 kWh at 2020-02-05T23:30:00Z (HC:0/HP:1/HN:0)

@thetux07
Copy link

Bonjour,
j'ai exactement le même problème, en plus de ça, mes heures creuses sont de 23h30 à 7h30 du matin
le problème est qu'en plus, il ne prend pas les données de 00h00 en heure creuse, pour 23h30 et 00h30 par contre c'est bon
merci en tout cas pour votre travail !

@beufanet
Copy link
Owner

beufanet commented May 3, 2020

I will have a look as soon as I have some time to check this (I've delete my contract Heures Pleines / Heures Creuses)

@beufanet beufanet added the bug Something isn't working label May 8, 2020
@beufanet beufanet self-assigned this May 8, 2020
@beufanet
Copy link
Owner

beufanet commented May 8, 2020

Please try with branch :
https://github.com/beufanet/linkyndle/tree/v0.2/fix_time_issues
Please confirm so I can close this bug ;)

And also, please fix your params to remove 1minute from the time range when moving to another HC / HP period : If period is 7h22 > 12h22 and next period (HC for example) is 12h22 > 18h, you should set :
7h22 => 12h21
12h22 => 17h59

@beufanet beufanet added this to the v0.2 milestone May 8, 2020
@aladin2000
Copy link
Author

aladin2000 commented May 11, 2020

Please try with branch :
https://github.com/beufanet/linkyndle/tree/v0.2/fix_time_issues
Please confirm so I can close this bug ;)

And also, please fix your params to remove 1minute from the time range when moving to another HC / HP period : If period is 7h22 > 12h22 and next period (HC for example) is 12h22 > 18h, you should set :
7h22 => 12h21
12h22 => 17h59

: done as requested but....
the branch did not fix the original problem... I sent you MP explaining that

Question: If I run several feed of data, does it change the total ok KwH for one day ?
As a newbie in influxdb do you have a magic command/ trick to purge old data inside the database ? ( truncate table, delete the lines or remove/create database ?)

@beufanet
Copy link
Owner

Did not received your email, working on a global fix for values inserted multiple times.

@aladin2000
Copy link
Author

the email content as is ...

1°)
Diff between the two exec files.... linkynfluxd
61c61
< date = (datetime.datetime(year=y,month=mo,day=d,hour=h,minute=m,second=0,microsecond=0))

date = (datetime.datetime(year=y,month=mo,day=d,hour=h,minute=m,second=1,microsecond=0))

65a66,67

#client = InfluxDBClient(host='localhost', port=8086, username=_db_user , password=_db_passwd )
#client.switch_database(_db_name)

2°) extract for my params

"hc":
[{
    "start":   { "h": 12, "m": 22 },
    "end":     { "h": 13, "m": 51 }
 },{
    "start":   { "h": 0, "m": 52 },
    "end":     { "h": 7, "m": 21 }
}]

3°) Output of exec file (extract)

2020-05-10 21:30:26,609 logging in InfluxDB Server Host 192.168.1.70...
2020-05-10 21:30:26,611 logged in InfluxDB Server Host 192.168.1.70 succesfully
2020-05-10 21:30:26,611 logging in Enedis URI https://espace-client-particuliers.enedis.fr/group/espace-particuliers...
2020-05-10 21:30:27,203 logged in successfully!
2020-05-10 21:30:27,216 get Data from Enedis from 08/05/2020 to 10/05/2020
2020-05-10 21:30:26,609 logging in InfluxDB Server Host ///
2020-05-10 21:30:26,611 logged in InfluxDB Server Host ///
2020-05-10 21:30:26,611 logging in Enedis URI https://espace-client-particuliers.enedis.fr/group/espace-particuliers...
2020-05-10 21:30:27,203 logged in successfully!
2020-05-10 21:30:27,216 get Data from Enedis from 08/05/2020 to 10/05/2020

2020-05-10 21*** at2020-05-08T00:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T00:30:00Z (HC:0/HP:1/HN:0)

2020-05-10 21*** at2020-05-08T01:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T01:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T02:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T02:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T03:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T03:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T04:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T04:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T05:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T05:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T06:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T06:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T07:00:00Z (HC:1/HP:1/HN:0)

2020-05-10 21*** at2020-05-08T07:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T08:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T08:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T09:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T09:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T10:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T10:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T11:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T11:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T12:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T12:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T13:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T13:30:00Z (HC:1/HP:1/HN:0)

2020-05-10 21*** at2020-05-08T14:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T14:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T15:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T15:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T16:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T16:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T17:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T17:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T18:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T18:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T19:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T19:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T20:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T20:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T21:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T21:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T22:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T22:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T23:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-08T23:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T08:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T08:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T09:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T09:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T10:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T10:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T11:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T11:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T12:00:00Z (HC:0/HP:1/HN:0)

2020-05-10 21*** at2020-05-09T12:30:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T13:00:00Z (HC:1/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T13:30:00Z (HC:1/HP:1/HN:0)

2020-05-10 21*** at2020-05-09T14:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T14:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T15:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T15:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T16:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T16:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T17:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T17:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T18:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T18:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T19:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T19:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T20:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T20:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T21:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T21:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T22:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T22:30:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T23:00:00Z (HC:0/HP:1/HN:0)
2020-05-10 21*** at2020-05-09T23:30:00Z (HC:0/HP:1/HN:0)

hope that help

Best Regards

Aladin
Le 08/05/2020 à 22:42, Fabien VINCENT a écrit :

Please try with branch :
https://github.com/beufanet/linkyndle/tree/v0.2/fix_time_issues
Please confirm so I can close this bug ;)

And also, please fix your params to remove 1minute from the time range when moving to another HC / HP period : If period is 7h22 > 12h22 and next period (HC for example) is 12h22 > 18h, you should set :
7h22 => 12h21
12h22 => 17h59

@aladin2000
Copy link
Author

aladin2000 commented May 13, 2020 via email

beufanet pushed a commit that referenced this issue May 14, 2020
@beufanet
Copy link
Owner

Could you try with my last commit on the branch v0.2/fix_time_issues please ?

@aladin2000
Copy link
Author

Could you try with my last commit on the branch v0.2/fix_time_issues please ?

ok the problem is fixed with your last code
thanks

@aladin2000
Copy link
Author

aladin2000 commented May 24, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants