Skip to content

Commit ebc255a

Browse files
committed
shared-docs: Add shared files and images
These are shared files and images that are used in multiple read-the-docs projects. Signed-off-by: Fabian Hartung <[email protected]>
1 parent d70821c commit ebc255a

18 files changed

+990
-0
lines changed

_static/files/toolchain.cmake

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
set(CMAKE_SYSTEM_NAME Linux)
2+
3+
if(EXISTS ${CMAKE_SYSROOT} AND IS_DIRECTORY ${CMAKE_SYSROOT})
4+
execute_process(COMMAND file ${CMAKE_SYSROOT}/bin/bash.bash
5+
OUTPUT_VARIABLE TARGET_BASH_OUTPUT)
6+
if(TARGET_BASH_OUTPUT MATCHES aarch64)
7+
message(STATUS "Setting architecture to aarch64")
8+
set(CMAKE_SYSTEM_PROCESSOR aarch64)
9+
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
10+
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)
11+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " CACHE STRING "" FORCE )
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " CACHE STRING "" FORCE )
13+
else()
14+
message(STATUS "Setting architecture to arm")
15+
set(CMAKE_SYSTEM_PROCESSOR arm)
16+
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
17+
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
18+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-psabi" CACHE STRING "" FORCE )
19+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi" CACHE STRING "" FORCE )
20+
endif()
21+
else()
22+
message(FATAL_ERROR "ERROR: SYSROOT '${CMAKE_SYSROOT}' not found!!!")
23+
endif()
24+
25+
if(CMAKE_BUILD_TYPE MATCHES Debug)
26+
# Debug flags
27+
message("Enabling Debug build")
28+
set(CMAKE_CXX_FLAGS_DEBUG "-g")
29+
else()
30+
# Enable compiler optimization flags
31+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
32+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os")
33+
34+
# Strip debug symbols
35+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s")
36+
endif()
37+
38+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -L${CMAKE_SYSROOT}/usr/lib")
39+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SYSROOT}/usr/lib")
40+
41+
set(ENV{PKG_CONFIG_PATH} "${CMAKE_SYSROOT}/usr/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
42+
43+
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_SYSROOT}/usr/lib/libstdc++.so")
44+
45+
set(NODEJS_INCLUDE_DIR /usr/include/node) # make sure that nodejs is installed. If not, sudo apt-get install nodejs-dev
46+
47+
set(PYTHON_INCLUDE_DIRS "${CMAKE_SYSROOT}/usr/include/python3.10")
48+
set(PYTHON_LIBRARIES "${CMAKE_SYSROOT}/usr/lib/libpython3.10.so")
49+
50+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
51+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
52+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

_static/images/cbenergy/discover.png

528 KB
Loading

_static/images/cbenergy/home.png

517 KB
Loading

_static/images/cbenergy/manual.png

480 KB
Loading
696 KB
Loading
470 KB
Loading

_static/images/cbenergy/setup.png

678 KB
Loading

_static/images/cbenergy/user.png

488 KB
Loading

cb_energy.inc

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
.. _introduction_nymea:
2+
3+
Introduction CB energy
4+
======================
5+
CB energy is a (home) energy management system.
6+
A CB energy installation consists of two parts:
7+
8+
The first part is the nymea:core (nymead) which is a server application running on the wallbox.
9+
The main application of the nymea:core is to connect the wallbox with 3rd party local energy assets (PV, meters, home storage, ...) and enables features like:
10+
11+
* load balancing
12+
* overload protection
13+
* surplus charging
14+
* energy management
15+
* spot market charging
16+
* remote access
17+
* providing charging reports
18+
* target time charging
19+
* and more
20+
21+
The second part is the CB energy app running on end user platforms like iOS and Android. The app is used to control
22+
nymea:core.
23+
The nymea:core and the different integration plugins for wallbox, meters and inverters are open source
24+
and can be found on `Github <https://github.com/nymea>`_.
25+
Features like generating charging session report and the energy management are closed source and require a license
26+
from chargebyte GmbH. For more information have a look `on our website <https://chargebyte.com/software/energy-manager>`_.
27+
28+
29+
Both parts have to be in the same network. In order to monitor and control the wallboxes, the EVerest charging stack is needed. The EVerest stack provides an API module, that is used by CB Energy either on localhost (on the same hardware) or to access other instances in the same local network.
30+
31+
Note: This documentation is a quick start to get the nymea ecosystem running as fast as possible with EVerest charging stack. If you are testing CB Energy on one of chargebyte's Linux controllers, both EVerest and CB Energy are preinstalled in the latest firmware images. A more detailed documentation can be found `on the nymea website <https://nymea.io>`_.
32+
33+
.. important::
34+
The `API module <https://github.com/EVerest/everest-core/tree/main/modules/API>`_ must be installed and active in the EVerest configuration.
35+
36+
37+
.. _cb_energy_app:
38+
39+
CB energy app
40+
=============
41+
42+
The CB energy app can be installed from the official stores.
43+
44+
.. raw:: html
45+
46+
<table border="0" align="center">
47+
<tr>
48+
<td>
49+
<p>
50+
<a href="https://apps.apple.com/us/app/cb-energy/id6503952899">
51+
<img border="0" align="middle" alt="iOS Badge" src="https://developer.apple.com/app-store/marketing/guidelines/images/badge-example-preferred_2x.png" width=200>
52+
</p>
53+
</td>
54+
<td>
55+
<p>
56+
<a href="https://play.google.com/store/apps/details?id=com.chargebyte.cbenergy&hl=en">
57+
<img border="0" align="middle" alt="Android Badge" src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" width=256>
58+
</p>
59+
</td>
60+
</tr>
61+
</table>
62+
63+
.. _setup_and_configuration:
64+
65+
Setup and configuration
66+
=======================
67+
68+
On a chargebyte controller, the nymea daemon will start automatically, together with the EVerest stack while the system is booting up.
69+
Once the services are running the app will be able to detect the instance automatically on localhost or in the local network.
70+
71+
72+
.. _client_discovery:
73+
74+
Client discovery
75+
================
76+
77+
The CB energy app (client) automatically discovers available instances (servers) in your local network. Please make sure to allow the smartphone app to have access to your local network devices after installing it.
78+
79+
.. figure:: ../../includes/_static/images/cbenergy/discover.png
80+
:height: 600px
81+
82+
If the discovery has not found any wallbox in the local network you can try to set up a manual connection as described in :ref:`connection_option`.
83+
84+
85+
.. _user_setup:
86+
87+
User setup
88+
================
89+
90+
Once you are connected to the nymea:core, you can start to set up your system.
91+
92+
.. figure:: ../../includes/_static/images/cbenergy/user.png
93+
:height: 600px
94+
95+
It is time to create login credentials to keep the CB energy setup protected. When connecting to the system for the first time, it will prompt for a username and a password. Optionally, you can also provide your name and e-mail address.
96+
This information is stored locally.
97+
98+
99+
100+
.. _setup:
101+
102+
Setup of ecosystem
103+
=========================
104+
105+
In the next step, nymea:core starts a discovery for EV chargers. This might be the same machine (localhost) or any other supported charger in the local network.
106+
107+
.. figure:: ../../includes/_static/images/cbenergy/setup.png
108+
109+
If you are trying CB energy on a chargebyte controller an EVerest connector will be discovered.
110+
111+
112+
After discovering and setting up the wallbox, CB Energy tries to discover other assets like solar inverters and meters. If there aren't any of these devices around, you can skip this step.
113+
114+
.. figure:: ../../includes/_static/images/cbenergy/setup-skip.png
115+
:height: 600px
116+
117+
Basically, you don't need solar inverters or meters for controlling the wallbox. If you want to make use of the ``Eco mode``, you need to add at least one meter measuring the overall consumption of the house.
118+
119+
120+
The final steps of the wizard are
121+
122+
* to set a grid limit for overload protection
123+
* add your initial EV parameters with name, netto battery capacity and minimum charging current as well as phase count of the on-board-charger
124+
125+
.. figure:: ../../includes/_static/images/cbenergy/setup-final.png
126+
127+
You can change this option later in the settings as well.
128+
129+
130+
131+
.. _home:
132+
133+
Home screen
134+
===========
135+
136+
Well done! At this point you are ready to explore the Home Screen, the charging modes (``Eco`` and ``Quick``) and all the other capabilities of CB energy.
137+
As mentioned in `setup`_, ``Eco mode`` is only available if at least one root meter is registered in the system. With ``Quick mode`` however, you should be able to control basic charging features like starting and stopping a charging session as well as adjusting the charging power. Give it a try!
138+
139+
.. figure:: ../../includes/_static/images/cbenergy/home.png
140+
141+
142+
143+
.. _supported_devices:
144+
145+
Supported devices
146+
=================
147+
148+
Here you find a list of `supported devices <https://www.nymea.energy/integrations/>`_.
149+
CB energy comes with license, maintenance, support and service level agreement. So for the number of integrations you want to use in your final product (e.g. smart EV charger with embedded HEMS), we make sure all integrations are maintained and work as intended.
150+
151+
Since the fundamental IoT middleware of CB energy - nymea - is open source, you can add your own integration to the stack. The developer guide can be found `here <https://nymea.io/documentation/developers/integrations/getting-started-integration>`_.
152+
153+
154+
155+
.. _connection_option:
156+
157+
Manual connection option
158+
========================
159+
160+
If discovery between CB energy app (client) and nymea:core (server) fails for some reason (e.g. blocked UPnP/ZeroConf in company network), you can still enter the endpoints manually.
161+
There are three options for the connection protocol:
162+
163+
#. TCP
164+
#. Websocket
165+
#. RemoteProxy
166+
167+
For simply hooking up client and server locally, choose TCP and enter the IP address of your nymea:core instance. For the first
168+
time you can keep the port at 2222.
169+
170+
.. figure:: ../../includes/_static/images/cbenergy/manual.png
171+
:height: 600px

connecting.inc

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
.. _connecting-via-ssh-or-serial-interface:
2+
3+
Connecting via SSH or Serial Interface
4+
--------------------------------------
5+
6+
For debugging, there are two ways to connect the developer computer to the Charge controller: via SSH
7+
or via serial interface. The following sections explain how to connect to the Charge controller using
8+
PuTTY. You can also use other terminal programs (like e.g. MobaXTerm) to connect to the
9+
Charge controller.
10+
11+
12+
SSH Connection with PuTTY
13+
^^^^^^^^^^^^^^^^^^^^^^^^^
14+
15+
Here are the steps to connect to the Charge controller via SSH using PuTTY:
16+
17+
#. Install PuTTY on your computer. You can download PuTTY from the following link:
18+
`PuTTY Download <https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html>`_.
19+
#. Connect the Charge controller over Ethernet to your computer.
20+
#. Start PuTTY and enter the IPv4 fallback address "169.254.12.53" of the Charge controller in
21+
the "Host Name (or IP address)" field (See figure :ref:`PuTTY SSH Configuration <PuTTY_Serial_Configuration_2>`).
22+
#. Click on "Save" to save the configuration and then click on "Open" to start the connection.
23+
#. A PuTTY Security Alert window will appear. Click on "Accept" to continue.
24+
#. Enter the username "root" and the password "zebematado" to log in to the Charge controller.
25+
26+
.. note::
27+
The username can also be stored under "Connection -> Data -> Auto-login username" in the
28+
PuTTY configuration.
29+
30+
.. note::
31+
It is also possible to install an SSH key on the Charge controller to log in without a
32+
password. Please look online for instructions on how to do this on a Linux system.
33+
34+
.. figure:: _static/images/putty_config_ssh_fallback_ip.png
35+
:width: 300pt
36+
37+
Figure: PuTTY SSH Configuration
38+
39+
40+
Serial Connection with PuTTY
41+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
Here are the steps to connect to the Charge controller via serial interface using PuTTY:
44+
45+
#. Install PuTTY on your computer. You can download PuTTY from the following link:
46+
`PuTTY Download <https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html>`_.
47+
#. Connect the Charge controller to your computer via USB to serial adapter.
48+
#. Start PuTTY and configure the COM port of the USB to serial adapter (e.g. "COM1") in the
49+
"Serial line" field.
50+
Note: You can find the COM port of the USB to serial adapter in the Windows Device Manager
51+
under "Ports (COM & LPT)".
52+
#. Switch to Connection -> Serial configuration and set the "Speed" to 115200, "Data bits" to 8,
53+
"Stop bits" to 1, "Parity" to "None" and "Flow control" to "None" (See figure
54+
:ref:`PuTTY Serial Configuration <PuTTY_Serial_Configuration_1>`).
55+
#. Switch back to the "Session" and click on "Save" to save the configuration
56+
(See figure :ref:`PuTTY Save Serial Connection <PuTTY_Serial_Configuration_2>`).
57+
#. Click on "Open" to start the connection.
58+
#. Now a black window will appear. Press enter to get the login prompt.
59+
#. Enter the username "root" and the password "zebematado" to log in to the Charge controller.
60+
61+
.. figure:: _static/images/putty_config_serial_1.png
62+
:width: 300pt
63+
:name: PuTTY_Serial_Configuration_1
64+
65+
Figure: PuTTY Serial Configuration
66+
67+
.. figure:: _static/images/putty_config_serial_2.png
68+
:width: 300pt
69+
:name: PuTTY_Serial_Configuration_2
70+
71+
Figure: PuTTY Save Serial Connection

0 commit comments

Comments
 (0)