Skip to content

Open-source IoT Platform - Device management, data collection, processing and visualization.

License

Notifications You must be signed in to change notification settings

lamah-co/thingsboard

 
 

Repository files navigation

ThingsBoard

This repository contains the ThingsBoard Community Edition. Follow the instructions below to set up your development environment.

Cloning the Repository

git clone git@github.com:lamah-co/thingsboard.git
cd thingsboard
mvn clean install -DskipTests

Installing Java with SDKMAN

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

Installing Java

sdk install java 11.0.23-tem

Setting Up PostgreSQL with Docker Compose

services:
  postgres:
    image: postgres:latest
    container_name: thingsboard-postgres
    environment:
      POSTGRES_DB: thingsboard
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  postgres_data:

Start the PostgreSQL container:

  docker-compose up -d

Connecting to PostgreSQL

Connect to the PostgreSQL container and create the ThingsBoard database:

psql -U postgres -d postgres -h 127.0.0.1 -W
CREATE DATABASE thingsboard;
\q

Creating the Database Schema

cd thingsboard/application/target/bin/install
chmod +x install_dev_db.sh
./install_dev_db.sh # On Linux
install_dev_db.bat # Windows

Fixing Logging Issues

If you encounter the following error:

/var/log/thingsboard/install.log (No such file or directory)

Fix it by running:

sudo mkdir /var/log/thingsboard sudo chmod 777 /var/log/thingsboard

Running the Development Environment

cd thingsboard/ui-ngx
mvn clean install -P yarn-start

Running the Server-Side Container

You can run the server in two ways:

Option 1: Using the Command Line

cd thingsboard
java -jar application/target/thingsboard-${VERSION}-boot.jar

Option 2: Using Visual Studio Code (Recommended)

1.	Install the Maven for Java Extension:
•	Extension ID: vscjava.vscode-maven
2.	Install the Spring Boot Tools Plugin Extension:
•	Extension ID: vmware.vscode-spring-boot
3.	Open the `ThingsboardServerApplication main method located in org.thingsboard.server` and run the server in Visual Studio Code.

About

Open-source IoT Platform - Device management, data collection, processing and visualization.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 59.8%
  • TypeScript 25.3%
  • HTML 9.3%
  • JavaScript 2.5%
  • SCSS 2.2%
  • Shell 0.3%
  • Other 0.6%