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 'elexonpcli.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 '184.108.40.206' with a folder 'apps', you can do:
scp elexonpcli email@example.com:/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 '220.127.116.11.7' running on port '5432' and the database name is 'elly_db' and the db user is 'posty' then
./elexonpcli run --key sopherflous --dbhost 18.104.22.168.7 --dbport 5432 --dbname elly_db --dbuser posty
- Don't worry about having to remember all these flags. They can all be seen by running the help command.
- That command will also show you that you can use abbreviated flags. For example for the command we ran earlier, it could have easily been run as:
./elexonpcli run -k sopherflous -H 22.214.171.124.7 -P 5432 -N elly_db -U posty
- 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:
./elexonpcli run -k sopherflous -N elly_db
- 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.
- For a quick connection to the running ElexonPCLI, you can visit the link
http://IP_ADDRESS>:8080?subscriberId=hottestSuperFly .For our example, it would be
http://126.96.36.199:8080?subscriberId=hottestSuperFlywhile for a local PC, it would be
- Other applications can connect to it using their HTTP packages or modules that allow connecting to servers with Server-side events enabled.
- You can stop it by hitting 'Ctrl-C'
- When your trial license expires, your application will stop and ask you to pay for the license. Please do pay for the license so that we can keep improving ElexonPCLI (and SopherApps itself).