Download the PHP package rogerthomas84/php-octopus-mini-api without Composer
On this page you can find all versions of the php package rogerthomas84/php-octopus-mini-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rogerthomas84/php-octopus-mini-api
More information about rogerthomas84/php-octopus-mini-api
Files in rogerthomas84/php-octopus-mini-api
Package php-octopus-mini-api
Short Description A working example of getting live consumption data from the Octopus API using PHP
License mit
Homepage https://github.com/rogerthomas84/php-octopus-mini-api
Informations about the package php-octopus-mini-api
Octopus Mini API library
Description...
This is a simple library, with a basic implementation of the Octopus API, as well as a small part of their GraphQL API. It's original purpose was primarily to serve as a documentation of how to retrieve the live consumption data from the Octopus Energy GraphQL API, but has since been expanded to include some other basic functionality, such as retrieval of half-hourly consumption data, as well as account information.
In order to retrieve the live consumption data, you must have an Octopus Mini device, and (obviously) you need to have an account with Octopus Energy. If you have an Octopus account, but don't have a Mini device, you can request a free one from Octopus Energy here.
Much of this library has been written using the documentation available from Octopus:
- https://developer.octopus.energy/rest/
- https://developer.octopus.energy/rest/reference
- https://developer.octopus.energy/rest/guides/endpoints
- https://developer.octopus.energy/graphql/guides
Usage...
Testing...
To test this, you'll need to set the following environment variables:
OCTOPUS_EMAIL
OCTOPUS_PASSWORD
OCTOPUS_ACCOUNT_NUMBER
OCTOPUS_API_KEY
OCTOPUS_MPAN
OCTOPUS_SERIAL_NUMBER
Then run the following commands: