Skip to content

goch/smarthome-webots

Repository files navigation

Smart Home Simulation for Webots

This project is a smart home simulation for the Webots simulator. It allows you to create a custom 3D environment and add smart home devices to it. You can then connect to smart home broker software such as iobroker. The project is also extendable to other frameworks such as ioBroker, ROS2 and Home Assistant.

rockinhome_extended

Install

Prerequisites

Ubuntu 22.04

sudo apt install git python3.10-venv
git clone https://github.com/goch/smarthome-webots.git
cd smarthome-webots
python3 -m venv env
echo export PYTHONPATH=$PWD:$PYTHONPATH >> env/bin/activate
source env/bin/activate
pip install -r requirements.txt

webots worlds/home.wbt

Manjaro

sudo pacman -S git python python-pip
git clone https://github.com/goch/smarthome-webots.git
cd smarthome-webots
pip install virtualenv
python -m venv env
echo export PYTHONPATH=$PWD:$PYTHONPATH >> env/bin/activate
source env/bin/activate
pip install -r requirements.txt

webots worlds/home.wbt

Windows

install python 3.10

Download and install Python 3.10. On the first page, at the bottom, check "Add Python 3.10 to PATH!" and disable PATH limit.

https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe

Download git for windows

Download git for windows https://github.com/git-for-windows/git/releases/download/v2.40.0.windows.1/Git-2.40.0-64-bit.exe

webots 2023a

download and follow install instructions at https://cyberbotics.com/doc/guide/installation-procedure#installation-on-windows

clone repository

clone this repository using git bash

git clone https://github.com/goch/smarthome-webots.git

Add Project Path to PythonPath

switch into the repository and set your pythonpath

cd smarthome-webots
setx PYTHONPATH $(pwd)

Install requirements

install project requirements

pip install -r requirements.txt

Open simulated environment

start webots

File -> Open World

you can find demo worlds in this location:

C:\Users\<Username>\smarthome-webots\worlds\empty.wbt

Usage

cd smarthome-webots
source env/bin/activate

webots worlds/demo.wbt

In the default configuration all sensors try to connect to a websocket server running on ws://localhost:3001. This can be changed in config/config.yaml

All simulated smart home devices can be controlled via webinterface. It can be accessed from the simulation by right clicking a sensor and then selecting "show Robot Window". This opens the webinterface in your default browser.

Install ioBroker extention

A Plugin which enables communication with ioBroker can be found here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published