Skip to content

josemotta/iot-tofu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iot Tofu

This is a development platform using:

  • hardware based on Raspberry Pi CM4 mounted on the Tofu board, as shown below,
  • a backend generated by IBM LoopBack4 framework, and
  • a frontend based on HomeAssistant framework as an example.

tofu-board

The architecture is based on raspberrypi.com but the network is supposed to be already set as follows:

  • There is a main network conected through the cloud, composed of 'regions'.
  • Each 'region' has a local LAN that includes a boot server handling up to dozens RPis.
  • Tofu is the boot server for all RPis in the regional LAN.
  • Each RPi has sensors & actuators for an Internet of Things application.
  • Each region connects to the main network & then to the Internet cloud.
  • Region
    • router: dedicated LAN for Tofu & RPis (192.168.10.1)
    • dns: nameserver 127.0.0.1 to force using dnsmasq dns
  • Main
    • router: connected to Internet (gateway 192.168.1.254)
    • dns: 192.168.1.254 to be set at dnsmasq server

Boot-Back

This is the backend. It runs on the x86-64 machine for development but the final app runs on the Tofu Raspberry Pi board.

  • the build action 'on push' creates the image 'josemottalopes/boot-back:latest' at docker hub
  • the action uses a GitHub self-hosted runner installed at the local Tofu board

LoopBack 4

The backend application is generated using LoopBack 4 CLI, please check out the README.

As shown below, the LB4 provides automatic generation of a swagger-like frontend showing all the API details. It runs on both x86 (for development) and arm64 (for production) hardware.

x86

Home-Assistant

This is the frontend. It may use for example the well known Home Assistant.