Skip to content

Phil353556/ecowatt-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

ecowatt-example

Example of how to use the API made available by french compagny RTE

The goal is:

-to display values for the current day and the two days after (ie J, J+1, J+2),

-to create in the current directory, three images (png) as logo, that can be use where you want.

Create an account, then register for this API: https://data.rte-france.com/catalog/-/api/consumption/Ecowatt/v4.0

must replaced by https://data.rte-france.com/catalog/-/api/consumption/Ecowatt/v5.0

image

Create an application for this API (do create a new application for v5)

image

Select this application and get the ID client and the ID secret in base64 This is the only change to make in the script! image

image

$ ./ecowatt.php

Usage: php ecowatt.php { prod | sandbox ] [ local | web ]

first argument:
prod: url for production information will be used
sandbox: url for test information will be used

second argument:
local: information will be only displayed localy
web: information will be displayed localy, generation for web done

otherwise usage is displayed

Using URL for production:

image image

One call per quarter is allowed. Meaning:

-a call at H:01 next call possible at H+15 + 1s
-a call at H:10 next call possible at H+15 +1s
-a call at H:31 next call possible at H+45 +1s
so it is not in elapse time, strange but it is what it is.

image

Using URL for sandbox:

image image

About

Example of how to use the API made available by french compagny RTE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages