Hyperion (Υπερίων) was probably the god of observation in ancient Greece.
Fast-forward to the present, Hyperion is a system that observes a 'Smart Meter' system.
Using Hyperion you can read your smart meter from your computer or Raspberry Pi.
To do so, you need a connection between your smart meter to the computer.
The smart meter has a P1 port, which is in fact an RJ11 connector.
You can connect to the serial port or the USB-port as long as your operating system supports reading from it.
On a Raspberry Pi, using a RJ11-to-USB cable, the serial port will become visible on
IO(Serial)extension (from akka-serial); it starts it and reacts to the messages it sends.
- When a
Serial.Receivedcomes in, the
MeterAgentconverts its payload to an UTF-8 string and sends it to the
Collectingthat collects pieces of data coming in until it thinks there is complete P1 Telegram. It then parses the content of its buffer using the
P1Parser(not an actor). If that succeeds, it sends the telegram using
- Actors that want to do something with the data subscribe themselves for incoming telegrams by sending
MessageDistributor. All actors that are subscribed will receive the
TelegramRecivedmessages that the
MessageDistributorreceives from the
There are also some actors that process data from the smart meter:
RecentHistoryActorkeeps a limited buffer of received telegrams. Using that buffer, it can report on the last 30 minutes (for example) of energy usage. Useful for seeing how a certain device influences energy usage.
DailyHistoryActorwill schedule itself to sleep when it starts, and awake at a fixed time once a day. It will then wait for one
TelegramRecived, log some metrics in a database and go to sleep again. Useful for generating daily/monthly/yearly reports.
ActualValuesHandlerActoris created once a WebSocket is connected at its endpoint. From then on, it will pass on all
TelegramRecivedto that WebSocket. Useful for having a "life" view on the energy meter.
There is also a web front-end to Hyperion. It is maintained in a separate Git repository.
About the code
Hyperion is written in Scala using the Akka-framework.
Pre-built Debian packages can be downloaded from CircleCI.
Click on the latest green build and move to the 'Artifacts' tab.
The packages are located in the
Hyperion integration tests
The integration tests are written using Rest Assured and stored in
Test data is injected using an SQL script (found in
To run the tests locally, issue
sbt \ -Dconfig.file=app/src/test/resources/environment.conf \ integrationTest/test
Hyperion is licensed under the MIT License. See the
LICENSE file for details.