Python plugin: Linky

Python and python framework
Barberousse
Posts: 117
Joined: Wednesday 02 December 2015 22:47
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Python plugin: Linky

Post by Barberousse » Tuesday 29 May 2018 22:03

Hello,

I made a plugin for Domoticz to grab history for french meter Linky and put them in a Domoticz Device. No real-time data, but no need for teleinfo hardware, the data are collected from Enedis website.

Cf. https://github.com/guillaumezin/DomoticzLinky

gerardosamara
Posts: 61
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 4.9701
Contact:

Re: Python plugin: Linky

Post by gerardosamara » Monday 13 August 2018 14:23

Thanks @barberousse for the plugin .

I have installed the domoticz software on my Synology DSM6.2 (without python]) using the wiki ... https://www.domoticz.com/wiki/Synology and then the plugin Linky https://www.domoticz.com/wiki/Synology.

Q1 : Is there anything else to perform on the Synology ?

The Enedis data are downloaded in Domoticz stable V4.9700 ... Observation on going

Q2 : Is this plugin now the official Linky plugin after the one from @epierre ?

Thank you
Last edited by gerardosamara on Tuesday 14 August 2018 10:15, edited 1 time in total.
Domoticz Remote server RPi3B+ & WD PI Drive Beta V4.9701 , Domoticz Slave Beta RPI3B V4.9701 + App Android Domoticz Lite V0.1.452 & Imperihome Pro V40107
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle

gerardosamara
Posts: 61
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 4.9701
Contact:

Re: Python plugin: Linky

Post by gerardosamara » Tuesday 14 August 2018 10:11

Result after 1 day of observation :

- The data are not displayed in the day graph ( always 0 ) , for yesterday and today = NOK
- The "day" data are displayed in the graph week for monday in my case = correct

Cf screenshot attached
Plugin Linky.PNG
Plugin Linky.PNG (113 KiB) Viewed 1733 times
Last edited by gerardosamara on Wednesday 15 August 2018 12:48, edited 1 time in total.
Domoticz Remote server RPi3B+ & WD PI Drive Beta V4.9701 , Domoticz Slave Beta RPI3B V4.9701 + App Android Domoticz Lite V0.1.452 & Imperihome Pro V40107
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle

gerardosamara
Posts: 61
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 4.9701
Contact:

Re: Python plugin: Linky

Post by gerardosamara » Wednesday 15 August 2018 8:54

Sounds like the plugin connects to Enedis site only once a day

2018-08-15 05:04:29.803 (Linky meter) Getting data...
2018-08-15 05:05:01.656 (Linky meter) Done
2018-08-15 05:05:01.656 (Linky meter) Next connection: 2018-08-16 05:24:29
Domoticz Remote server RPi3B+ & WD PI Drive Beta V4.9701 , Domoticz Slave Beta RPI3B V4.9701 + App Android Domoticz Lite V0.1.452 & Imperihome Pro V40107
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle

User avatar
trandbert
Posts: 9
Joined: Tuesday 05 September 2017 9:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France
Contact:

Re: Python plugin: Linky

Post by trandbert » Wednesday 15 August 2018 9:42

Hello,
It's normal because on enedis website we don't have today's values..

User avatar
trandbert
Posts: 9
Joined: Tuesday 05 September 2017 9:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France
Contact:

Re: Python plugin: Linky

Post by trandbert » Wednesday 15 August 2018 12:00

Sorry, I wrote to quick.. I thinck you have to enable hourly report in your Enedis account.

gerardosamara
Posts: 61
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 4.9701
Contact:

Re: Python plugin: Linky

Post by gerardosamara » Wednesday 15 August 2018 12:18

Yes
linky enedis.PNG
linky enedis.PNG (41.44 KiB) Viewed 1663 times
Domoticz Remote server RPi3B+ & WD PI Drive Beta V4.9701 , Domoticz Slave Beta RPI3B V4.9701 + App Android Domoticz Lite V0.1.452 & Imperihome Pro V40107
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle

User avatar
trandbert
Posts: 9
Joined: Tuesday 05 September 2017 9:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France
Contact:

Re: Python plugin: Linky

Post by trandbert » Wednesday 15 August 2018 12:35

It works for me with this configuration
Attachments
Capture du 2018-08-15 12-33-45.png
Capture du 2018-08-15 12-33-45.png (129.2 KiB) Viewed 1660 times

User avatar
trandbert
Posts: 9
Joined: Tuesday 05 September 2017 9:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France
Contact:

Re: Python plugin: Linky

Post by trandbert » Saturday 18 August 2018 3:32

You may look up before the script running ?

gerardosamara
Posts: 61
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 4.9701
Contact:

Re: Python plugin: Linky

Post by gerardosamara » Tuesday 21 August 2018 11:32

Thanks for the reply.

As said before

Sounds like the plugin connects to Enedis site only once a day

2018-08-15 05:04:29.803 (Linky meter) Getting data...
2018-08-15 05:05:01.656 (Linky meter) Done
2018-08-15 05:05:01.656 (Linky meter) Next connection: 2018-08-16 05:24:29


What do you mean @ tranbert by "look up before the script running ?"

Thank you
Domoticz Remote server RPi3B+ & WD PI Drive Beta V4.9701 , Domoticz Slave Beta RPI3B V4.9701 + App Android Domoticz Lite V0.1.452 & Imperihome Pro V40107
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle

User avatar
trandbert
Posts: 9
Joined: Tuesday 05 September 2017 9:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France
Contact:

Re: Python plugin: Linky

Post by trandbert » Tuesday 21 August 2018 12:04

Sorry, I don't remember why I said that

ArnoBZH
Posts: 1
Joined: Thursday 23 August 2018 22:19
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Linky

Post by ArnoBZH » Thursday 23 August 2018 22:45

gerardosamara wrote:
Tuesday 14 August 2018 10:11
Result after 1 day of observation :

- The data are not displayed in the day graph ( always 0 ) , for yesterday and today = NOK
- The "day" data are displayed in the graph week for monday in my case = correct

Cf screenshot attached

Plugin Linky.PNG
Hi,

I get exactly the same thing... Week graph is OK, but not the Day graph...
I stop domoticz on my Raspberry

Code: Select all

/etc/init.d/domoticz.sh stop
and start the script manually to view log details

Code: Select all

/home/pi/domoticz/domoticz
and i get this two error messages :

Code: Select all

Error: (Linky): Async Secure Read Exception: 1, stream truncated
Error: (Linky) No transport, write directive to 'HTTPS connection' ignored.
I specify that I have already activated the time report in my Enedis account.
Someone know why ?
Thanks a lot.

My Domoticz version is the last v4.97.

PS : Pourquoi tout le monde écrit en Anglais vu que le compteur Linky est une technologie purement française ? Je n'ai rien contre l'anglais, mais cela permettrait d'élargir le sujet aux personnes mal à l'aise avec la langue de Shakespeare. ;)

xavierlp
Posts: 16
Joined: Tuesday 01 November 2016 17:22
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Linky

Post by xavierlp » Wednesday 24 October 2018 14:12

Hello
J'ai une erreur dans les log de Domoticz : Error in received JSON data during step getdatahours from 15/10/2018 to 23/10/2018
J'ai bien activé la courbe de charge coté Enedis et d'ailleurs je peux y lire les données par tranche de 30 minutes.

J'ai par contre toutes les données OK par jour.

Version du script 1.0.5 et celle de domoticz stable 4.97
Que dois je vérifier dans les logs et ou se trouvent les fichiers de détails?

Merci

jpcasta
Posts: 2
Joined: Saturday 24 November 2018 19:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Linky

Post by jpcasta » Saturday 24 November 2018 19:43

Hello,

I am getting the same issue than gerardosamara, ArnoBZH and xavierlp.
I mean no data in the by hours graph.
Barberousse, do you have an idea why it works for trandbert and not for others?
Thanks

PS: J'ai écrit en anglais car lors de l'inscription il est specifié que la langue du site est l'anglais…..

jpcasta
Posts: 2
Joined: Saturday 24 November 2018 19:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Linky

Post by jpcasta » Saturday 24 November 2018 23:11

Hello,

Actually after reading the readme.md file, I found we need to use the latest beta version to make it work:
-------------
"Domoticz version must be at least 3.9517, but short log view (hours view) will f
ail on release version 4.9700 (you'll need a more recent release or beta version
if you already installed the version 4.9700 to get short log view working)."
-------------
So, I updated Domoticz to Beta V4.10228 and the daily hours graph works now.
Regards

Barberousse
Posts: 117
Joined: Wednesday 02 December 2015 22:47
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Linky

Post by Barberousse » Tuesday 27 November 2018 21:53

You're right, you need beta versions for hours view, because of a bug introduced in Domoticz just before release. Sorry for not having answered sooner, I had forgotten to subscribe to this topic.

gerardosamara
Posts: 61
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 4.9701
Contact:

Re: Python plugin: Linky

Post by gerardosamara » Monday 03 December 2018 18:29

I have upgraded to last Beta and the hours graph is displayed now.

But is it normal that the update of the graph is performed only once a day ?

Code: Select all

2018-12-02 05:59:16.473 (Linky meter) Getting data...
2018-12-02 05:59:46.895 (Linky meter) Done
2018-12-02 05:59:46.895 (Linky meter) Next connection: 2018-12-03 06:46:16

2018-12-03 06:46:21.098 (Linky meter) Getting data...
2018-12-03 06:46:51.559 (Linky meter) Done
2018-12-03 06:46:51.560 (Linky meter) Next connection: 2018-12-04 05:56:21 
Domoticz Remote server RPi3B+ & WD PI Drive Beta V4.9701 , Domoticz Slave Beta RPI3B V4.9701 + App Android Domoticz Lite V0.1.452 & Imperihome Pro V40107
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle

Barberousse
Posts: 117
Joined: Wednesday 02 December 2015 22:47
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Linky

Post by Barberousse » Friday 07 December 2018 11:41

Yes, it is the expected behavior, Enedis gives the data only for the previous day and the days before, even for hours view, we can't have "realtime" data.

xavierlp
Posts: 16
Joined: Tuesday 01 November 2016 17:22
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Linky

Post by xavierlp » Saturday 15 December 2018 17:50

Hello

I can see a difference betwwen the value of a day and the sum of the values by hours on the samed day.

For instance

2018-12-08 23:00:00 898
2018-12-09 00:00:00 743
2018-12-09 01:00:00 780
2018-12-09 02:00:00 387
2018-12-09 03:00:00 668
2018-12-09 04:00:00 219
2018-12-09 05:00:00 219
2018-12-09 06:00:00 214
2018-12-09 07:00:00 1228
2018-12-09 08:00:00 1195
2018-12-09 09:00:00 1246
2018-12-09 10:00:00 814
2018-12-09 11:00:00 278
2018-12-09 12:00:00 1053
2018-12-09 13:00:00 1198
2018-12-09 14:00:00 619
2018-12-09 15:00:00 787
2018-12-09 16:00:00 1208
2018-12-09 17:00:00 1013
2018-12-09 18:00:00 1652
2018-12-09 19:00:00 2423
2018-12-09 20:00:00 2117
2018-12-09 21:00:00 1605
2018-12-09 22:00:00 1607
2018-12-09 23:00:00 1198
2018-12-10 00:00:00 799

The sum for the 9th of decembre is 24471

And by day I can read

2018-12-09 00:00:00 24.8

Do you know where this difference can come from ?

Thanks a lot

Barberousse
Posts: 117
Joined: Wednesday 02 December 2015 22:47
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Linky

Post by Barberousse » Saturday 15 December 2018 21:18

xavierlp wrote:
Saturday 15 December 2018 17:50
I can see a difference betwwen the value of a day and the sum of the values by hours on the samed day.
You're right! I checked, I see the same inconsistency with my data, but I see the inconsistency on Enedis website too: I receive inconsistent data from Enedis, between hours view with 24 hours data and days view data for yesterday. Please note the data are not inconsistency anymore for the day before yesterday...

Post Reply

Who is online

Users browsing this forum: dextm80 and 2 guests