As part of the development of some bricks of the DAISEE program, two of the main technological bricks are:
- How to make Smart Energy Monitoring/Meter IoTs as Ethereum blockchain nodes that can talk to each other via a blockchain and make and validate transactions ?
- How to automate the transactions management ?
Documentation can be found here (documentation is still mainly in french, we'll do our best to translate it - if by any chance you wanna help you're more than welcome):
- For the
- For the Design & Deployment of SmartContrat Peer-to-peer Energy
- For the Design & Deployment of DApp
You'll also found more detail instruction on the instruction web page.
Building Ethereum Nodes
Documentation: Ethereum Installation (RaspberryPi) using GETH and an alternative way for the Installation of an Ethereum node on a Raspberry Pi using PARITY
In the related documentation, you'll find the process for the installation of an Ethereum node on a Raspberry PI using various techniques. It also focuses on the problems and difficulties we've been facing and how to overcome some of them.
Please note that the first attempts have been carried out on the emonpi which is a costumed raspberry pi for the Open Energi Monitor. However, the process is further described in the document for Raspberry Pi in general.
3 ethereum nodes on Raspberry PI talking to each other on a common private blockchain
Building a peer-to-peer energy transaction smart-contract
Documentation: Design & Deployment of SmartContrat Peer-to-peer Energy
The first step before building the smart-contract is to define
- why do we need a smartcontract
- what does it need to do
- how does it do it and when
Why do we need a smartcontract ?
We need a smartcontract in order to automate the energy and currency transaction processes between peers. Indeed, the aim is to make it simple for the prosumer to manage the transactions with other prosumer while keeping the process transparent and appropriable.
What does it need to do ?
For us and at the moment, it need to automate transactions while called automatically by a prosumer either selling or buying energy.
How does is do it and when ?
It does it while comparing on an "energy market" who's producing to much and who needs energy for consumption. Then it triggers the transaction while being called by a prosumer automatically. Finally, it updates the energy and currency account while providing both account with the necessary (positive or negative) balance.
Building a dApp
Documentation: Design & Deployment of DApp
The dApp enables to have a user interface to manage the smartcontract and, thus, the transaction process. The related documentation focuses on the development of decentralized application based on Ehtereum Javascrip API WEB3.
The dApp makes it possible to see :
- The ether balance of the prosumer account
- The energy account of the prosumer account
- The latest transaction
- Other information about the blockchain
The accounts are updated each time there is a transaction from a producer to a consumer. Here is a video showing the transaction virtually happening between two accounts:
From now, we are able to :
- make Raspberry PI ethereum nodes talking with a common private blockchain
- build an energy smartcontract making it possible for two or more prosumers to make virtual energy transaction on a private blockchain
- have an user interface making it more appropriable and visual (some more work remains to be done on the UX side)
Our problems :
- CItizenWatt IoT sensor are not yet ready since we still got issues to build them and make them work
- Raspberry PI are ethereum node but are not yet able to validate and transmit transaction because it requires to mine once to initiate a block while generating a DAG file, which is necessary for the Raspberry PI, as a node, to participate to the network. This is due to lack of memory and power of the Raspberry PI 3
What's remaining to be done :
- one of the priority is to articulate the CitizenWatt and OEM sensors with the blockchain
- fixing the technological choices
- investigating IPFS and BigChainDB for hydridization with a blockchain
Extracted from the BlockChainDB