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.
- Webots 2023a -> https://github.com/cyberbotics/webots/releases/tag/R2023a
- python 3.10
- git
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
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
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 https://github.com/git-for-windows/git/releases/download/v2.40.0.windows.1/Git-2.40.0-64-bit.exe
download and follow install instructions at https://cyberbotics.com/doc/guide/installation-procedure#installation-on-windows
clone this repository using git bash
git clone https://github.com/goch/smarthome-webots.git
switch into the repository and set your pythonpath
cd smarthome-webots
setx PYTHONPATH $(pwd)
install project requirements
pip install -r requirements.txt
start webots
File -> Open World
you can find demo worlds in this location:
C:\Users\<Username>\smarthome-webots\worlds\empty.wbt
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.
A Plugin which enables communication with ioBroker can be found here