This project is not ready to use and still in development. There is no setup script or so. The code is just a snapshot to show how it could work. Search for the string "# WARNING". You need to add your credentials for MQTT broker, WIFI and database where you find this string with an applicable note.
- Switch plugwise plugs on and off via RFID chips
- Access control via ESP8266 and RFID-reader
- Device management of plugwise devices, RFID chips and ESP8266 via webinterface
- Usermanagement via webinterface
- Communication between ESPs and backend via MQTT
Implementation for the ESPs that controls the RFID-Reader and sends MQTT commands to the broker
Paths where you have to add credentials: FabLabESP/FabLabESP.ino
Open Source project. Description copied from the readme: Plugwise-2-py evolved in a monitoring and control server for plugwise devices.
You need to configure your plubwise devices in Plugwise-2-py/config/pw-control.json and Plugwise-2-py/config/pw-conf.json
Paths where you have to add credentials: Plugwise-2-py/config/pw-hostconfig.json
Django-based webinterface
-
Python 2 or 3
-
Python-Packages:
- Django (Version 1.11)
- paho-mqtt
- channels (Version <1.x)
- simplejson
- django_extensions
- Pillow
- django-bootstrap-ui
- django-widget-tweaks
- django-template-debug
-
MQTT broker - for example mosquitto
Search for the string "# WARNING". You need to add your credentials for MQTT broker, WIFI and database where you find this string with an applicable note.
Paths where you have to add credentials: fablab-webif/fablab-webif/settings.py fablab-webif/fablab-webif/fablabcontrol.py fablab-webif/fablab-webif/mqtt.py
-
Install Python
-
Install required python packages via
pip install packagename. To install Django version 1.11 use the commandpip install django==1.11pip install django==1.11 paho-mqtt "channels<2.0\ simplejson django_extensions pillow django-bootstrap-ui django-widget-tweaks django-template-debug
-
Install an MQTT broker
pip install mosquitto
- Change the database in
fablab-webif/fablab-webif/settings.pyto the SQLite database - Setup a user with the password from the
settings.pyin the MQTT broker- for Mosquitto use the command
mosquitto_passwd -c /path/to/pwfile
- for Mosquitto use the command
- Migrate your database
python2 manage.py makemigrationspython2 manage.py migrate
- Run server via
python manage.py runserver
The server should now run locally.