Pilea - A little dashboard to analyse your electricity consumption data from Linky


#1

Hi,

I made a little app called Pilea, the idea is to display electricity consumption (from a Linky) and weather data (from Meteo France) on a little dashboard that allow the user to:

  • Better understand his electricity consumption,
  • Analise his electricity consumption throw weather data (in a first time, essentially temperature).

More info here

It seems to work well on RPi and on my dev VM but I need some testers :slight_smile:

A PR is on its way to add it to the community list, if you want to test it before, you can find the package here

Cheers
Simon


#2

Hello,
This seems a very interesting app. Thanks a lot!
I just installed it but for now but all graphes are empty, I assume I should wait for a while before it update? Does it retrieve data in the past once installed?

Also, I cannot find Paris in the meteo station list, only Orly? Where is the list fetch from? Is there a way to have more stations?

Also, it’s a little unclear what are the fields “Nom du compteur” and “Adresse du compteur” used for in the app?

Krakinou


#3

Hi @Krakinou,

Thanks for your feedback

I just installed it but for now but all graphes are empty, I assume I should wait for a while before it update?

yep ! ~10 minutes after you set up your enedis account, you should see data appears for yesterday

Does it retrieve data in the past once installed?

I didn’t developed this yet.

  • For Linky, data can be retrieve easily, I suppose I can add a field asking from when you want to retrieve data when you set up a Linky.
  • For MeteoFrance, data are archived after 2 weeks, but it’s may be possible, I didn’t check what archives look like and how i can fetch it

Also, I cannot find Paris in the meteo station list, only Orly? Where is the list fetch from? Is there a way to have more stations?

Meteo data come from MeteFrance Synop Data, and there’s only 62 observation stations (mostly airports):
https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=90&id_rubrique=32

Another feed could be implemented for Meteo data, but for now, these data give a good idea of what the weather was. Even if I understand that the temperature is certainly not the same in Orly that in the city-center of Paris

Also, it’s a little unclear what are the fields “Nom du compteur” and “Adresse du compteur” used for in the app?

It 's not used yet, in the future I want to let users add several Linky that’s why I need an name, but may be one field could be enough.


#4

Hello,
So far working good, but the graph “en moyenne sur la semaine” stay desperately empty:


#5

Hi @Krakinou,

Arf, too bad it’s one of the most interesting chart !

Is option ‘Courbe de charge’ activated in your enedis account ?
By default, this option is desactivated.
Visit this page : https://espace-client-particuliers.enedis.fr/group/espace-particuliers/suivi-de-consommation
You should be able to activate from there.

If this option is activated you should see a tab ‘Par heure’ next to ‘Par jour’ on this page

cheers


#6

Hello @enuts

My Pilea is totally empty, I already activated the option “Courbe de charge”. But there’s nothing, not even the weather. Nothing…
I noticed you’ve fixed an error about the period in the upstream app. I’ve upgraded since.
But, still I have an error in the firefox console

jQuery.Deferred exception: period is not defined @https://crudelis.fr/pilea/js/selection.js:14:7
l@https://code.jquery.com/jquery-3.3.1.min.js:2:29373
a/</c<@https://code.jquery.com/jquery-3.3.1.min.js:2:29677
 undefined jquery-3.3.1.min.js:2:30920

ReferenceError: period is not defined[Learn More] selection.js:14:7
	<anonymous> https://crudelis.fr/pilea/js/selection.js:14:7
	l https://code.jquery.com/jquery-3.3.1.min.js:2:29373
	a/</c< https://code.jquery.com/jquery-3.3.1.min.js:2:29677

#7

@Maniack_Crudelis

If you go back to config page, did the linky & meteo config still present ?

If the config is still there, maybe there’s a problem with cron job, you can try to run the command to fetch data manually:
#PILEADIR#/bin/console pilea:fetch-data false

And see whats happened.

Note that data in the homepage should appear whatever the selection you made.


#8

Hmm, indeed the “per hour” graph on the web site is also empty even when I activate the option…
Maybe I should wait a little after activation, or write them an email.
I’ll keep you posted.


#9

sudo -u pilea /var/www/pilea/bin/console pilea:fetch-data false gave me nothing, is there a verbose mode or a log ?

EDIT: In the config panel, everything is still there, except the password of course.


#10

Well in fact, the normal behavior of the command is to return nothing.

No there’s no verbose mode for now… but you can find logs in the /var/www/pilea/var/logs directory

You can run sudo -u pilea /var/www/pilea/bin/console pilea:fetch-data true '2018-12-21'
to force Pilea to fetch data for the date you want.
If everything is ok, it should take at least 10 seconds. If it’s less than 1 second then your feeds aren’t well configured.

Edit : I haven’t developed a correct validation for the linky form yet, maybe there’s an error on your password
But if it’s ok in the config page it should be good :confused:


#11

I had a look to the log /var/www/pilea/var/logs/prod.log, it says:

[2018-12-23 00:22:44] request.CRITICAL: Uncaught PHP Exception Exception: "DateTime::__construct(): Failed to parse time string (undefined-undefined-Sun Dec 23 2018 00:21:51 GMT+0100 (CET) 23:59:59) at position 0 (u): The timezone could not be found in the database" at /var/www/pilea/src/AppBundle/Controller/DataApiController.php line 117 {"exception":"[object] (Exception(code: 0): DateTime::__construct(): Failed to parse time string (undefined-undefined-Sun Dec 23 2018 00:21:51 GMT+0100 (CET) 23:59:59) at position 0 (u): The timezone could not be found in the database at /var/www/pilea/src/AppBundle/Controller/DataApiController.php:117)"} []

I also had a look to the database, which is full of data for every hours.
So, it’s clear that my pilea can fetch the data, but can’t show them.
Looks like it doesn’t like my date format…


#12

Hello,
So now the “per hour” graph is activated in the Enedis account, but all graphes are empty in the app, weather and energy… :confused:
I tryed to run the command you mention earlier #PILEADIR#/bin/console pilea:fetch-data false but nothing better happen.

Also, I don’t have a /var/log/pilea directory?


#13

@Maniack_Crudelis hum :confused:

It’s probably a timezone problem, I have to check that. What’s your server’s timezone ?
I’m gonna try ti fix it next week !


#14

@Krakinou,

logs are in /var/www/pilea/var/logs
You maybe have the same error as @Maniack_Crudelis. So same question what’s the timezone of your server ?

May be it can help me if one of you want to give me a backup of his Pilea’s database (no problem if you don’t, i’m gonna try to reproduce)

cheers


#15

Hi @enuts,
In fact, after a while they did reappear.
I think it’s because I’m on a raspberry and I was too quick on refreshing the page, without leaving enough time for it to display the data.
It’s all right now.
But I still don’t have any /var/log/pilea folder…


#16

That’s ok you don’t have a /var/log/pilea folder cause it’s /var/www/pilea/var/logs :wink:


#17

Argh. Christmas dinner was hard…
How can I send you these files?


#18

My timezone is “Europe/Paris (CET, +0100)”


#19

@Krakinou if Pilea seems to work correctly with you I won’t need your log, thanks !

@Maniack_Crudelis I think i’ve found your bug. Can you try to select another period by clicking on the menu next to enddate :

Capture%20du%202018-12-27%2014-38-07

I think that there’s a problem with the default selected dates

If it’s not that, can you send me your log file ?


#20

Indeed, playing with that menu seems to have unlock the datas on this panel and the others, except the home page.
But I’m on my phone, I can try it again later on my desktop browser and check the console if needed.