The application has been built for particular operating systems and architecture. The operating systems include: Linux, Windows or MacOs. The most common architecture is amd64. Start with that. If it fails then try other architecture.
- Download the executable file. To download, go to the downloads section below and choose the version, the operating system and the architecture you want. In this section, we are assuming a UNIX system. For windows the file will be 'elexonrcli.exe'.
- Open your terminal (command line) and change your directory to the place where you downloaded the app. For example for Ubuntu, it might be:
- In case you just wish to run the application on local PC, you can skip the next three steps.
- To push the executable file to your Linux debian/ubuntu server if you wish to run the app on a server, you can use the
scpcommand. For example for a server with user 'soppy' and IP address '18.104.22.168' with a folder 'apps', you can do:
scp elexonrcli firstname.lastname@example.org:/apps
- Log into your Linux debian/ubuntu server's terminal
- Enter your the directory where you pushed the file. For our example, it was 'apps'
- Ensure you have already registered with Elexon and you have an Elexon Scripting key. You can register or login with Elexon via the elexon portal. More instructions can be found in their bmrs api data push user guide.
- Run the application using the run command. For example if my Elexon scripting key is 'sopherflous' and my postgreSQL db is hosted on a server of IP address '22.214.171.124.7' running on port '5432' and the database name is 'elly_db' and the db user is 'posty' and I am interested in BOD messages of between 2021-05-31 to 2021-06-01 then
./elexonrcli run --key sopherflous --dbhost 126.96.36.199.7 --dbport 5432 --dbname elly_db --dbuser posty --service BOD --from 2021-05-31 --to 2021-06-01
- Don't worry about having to remember all these flags. They can all be seen by running the help command.
- Also to see the possible service types and the corresponding messages they return, you can just run the 'services' command like:
- You can also use abbreviated flags. For example for the command we ran earlier, it could have easily been run as:
./elexonrcli run -k sopherflous -H 188.8.131.52.7 -P 5432 -N elly_db -U posty -s BOD -f 2021-05-31 -t 2021-06-01
- You can even go further and reduce the command to only have your scripting key and the database name if your database is on the same machine (localhost) and the database user 'postgres' still exists and has enough privileges. The command we had earlier thus becomes:
./elexonrcli run -k sopherflous -N elly_db -s BOD -f 2021-05-31 -t 2021-06-01
- When the above command runs, you will be asked to feed in the password of the database user you have opted to use and then the processing will start. The terminal will print a short description of every Elexon message received.
- You can then check your database for the data being fed into it. It is pretty fast. Be warned.
- When all the data is processed, it will exit itself.
- To stop it prematurely, you can press 'Ctrl-C'
- Remember this application is free forever. We will keep maintaining it as long as God enables us to.