Skip to content
Snippets Groups Projects

Draft: docs: add energy gateway

Closed Grzegorz Gwóźdź requested to merge gwozdzcfs/docsbps:energy-gateway-docs into main
1 unresolved thread
2 files
+ 143
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 142
0
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: definitions.rst
Residential Energy Gateway Blueprint
####################################
.. contents::
:depth: 4
Overview
********
The technology industry has blossomed over the past years, and with broad consumer
support for projects that address the challenges of an aging power delivery
infrastructure, the stage is set for the rapid evolution of the energy
distribution and consumption.
The energy distribution market is currently undergoing a serious
transformation where all its stakeholders are striving for a change and as
a result we see inclusion of smart technology in energy eco system.
This change is so rapid that in order to keep the pace with growing global
energy market, the utility provider and home owners are in need of a way
to enhance the interaction between the grid and the household.
At core of all this energy industry there is a need for a smart solution
for energy consumers. The smart solution that replaces the current energy
network with a democratic business model where energy consumers manage
their own energy portfolio.
|main_project_name| provides a solution with a residential energy gateway that
improves transparency, agility, sustainability, and digital innovation.
This Blueprint builds a residential energy gateway, to gather local energy data,
provide insight of energy usage in the home. The data will be displayed on a
local web dashboard and leveraged locally, as well as, online resources for
energy management.
Use Cases
*********
The Residential energy Gateway Blueprint, is expected to be ready with the
Goofy GA, and will cover the following use cases:
- Data collection of local energy consumers and producers
(PV, electric vehicles, heat pumps, HVAC, appliances, smart plugs, etc.).
To collect this data Oniro will be extended to support the Modbus RTU and
TCP protocols as well as the upcoming Matter standard.
- Energy Management rule-set based on collect local data, PV energy forecast
and grid energy pricing.
Building and flashing
*********************
Building this blueprint for the Rapsberry Pi 4 is similar to
`building and flashing a base Linux image <https://docs.oniroproject.org/en/latest/oniro/hardware-support/boards/raspberrypi4.html>`_,
with the addition of two extra layers.
Linux image
-----------
1. Follow the `blueprint instructions <https://docs.oniroproject.org/projects/blueprints/en/latest/workspace.html#workspace>`_
to set up the workspace.
2. Clone the following layer to your repo's root directory:
`energy gateway repository <https://gitlab.eclipse.org/eclipse/oniro-blueprints/energy-gateway/meta-oniro-blueprints-energy-gateway>`_ by running the following commands:
.. code-block:: console
$ cd $CHECKOUT_DIR
$ git clone --recursive https://gitlab.eclipse.org/eclipse/oniro-blueprints/energy-gateway/meta-oniro-blueprints-energy-gateway
.. note::
Make sure you define or replace $CHECKOUT_DIR
3. Source the environment with proper template settings, the flavour being
*linux* and target machine being *raspberrypi4-64*. Pay attention to how
relative paths are constructed. The value of *TEMPLATECONF* is relative to
the location of the build directory *./build-linux-raspberrypi4-64*, which
is going to be created after this step:
.. code-block:: console
$ TEMPLATECONF=../oniro/flavours/linux . \
./oe-core/oe-init-build-env build-oniro-linux-raspberrypi4-64
4. You will find yourself in the newly created build directory. Change the
``conf/bblayers.conf`` file by adding the paths of layers added in the 2nd
step to the BBLAYERS variable **or** run the following two commands:
.. code-block:: console
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-core
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-energy-gateway/meta-oniro-blueprints-energy-gateway
5. Call *bitbake* to build the image by running
the following command:
.. code-block:: console
$ MACHINE=raspberrypi4-64 DISTRO="oniro-linux-blueprint-energy-gateway" bitbake blueprint-energy-gateway-image
.. note::
You can set the MACHINE and DISTRO variables in the conf/local.conf
file.
6. After the build completes, the bootloader, kernel, and rootfs image files
can be found in
``build-oniro-linux-raspberrypi4-64/tmp/deploy/images/$MACHINE/``.
In order to flash the image, make sure you have plugged in SD
card. Once that is done, note its associated device node. You can find that
using `udev`, `dmesg` or various other tools. Once the device not
associated to the microSD card is known, proceed to flash the built image.
The key file which is needed to flash into the SD card is
``oniro-image-base-raspberrypi4-64.wic.gz``. To flash it to the SD card
use `bmap-tools <https://github.com/intel/bmap-tools>`_ by running the
following commands:
.. code-block:: console
$ cd tmp/deploy/images/raspberrypi4-64
$ bmaptool copy oniro-image-base-raspberrypi4-64.wic.gz $DEVNODE
.. note::
Change/replace $DEVNODE variable with the device (probably an SD
card) you want to flash it to.
.. note::
When connecting your SD card to the computer it might get mounted,
unmount it before flashing.
Running the blueprint
*********************
Now you can boot up your Raspberry Pi 4 and log in with default credentials:
* User: ``oniro``
* Password: ``oniro``
Loading