HomeSmartMesh / IoT_Frameworks

Sensor Node STM8, Server C++ Raspberry pi, Webclient with d3js and websockets
56 stars 15 forks source link

website with overview, tutorials, mind maps,...

More recent github for Raspberry Pi scripts and nRF52

Status

This repo is no longer in active maintenance, its main topics are :

Hardware

Wireless Sensor Tag

STM32 IoT Dongle

Software running on the Raspberry pi

C++ RF Gateway

submodule rf_gateway

Python Database proxies

scripts in the submodule py_db_proxy

React D3js webapp

submodule web_react current status :

Configuration

Configuration for the following software is available in the config subdirectory

Startup Launch on the Raspberry pi

to enable once

sudo systemctl enable openhab2
sudo systemctl enable influxdb

Others require manual startup added in

sudo nano /etc/rc.local

Debugging the rc.local log with adding the following lines

exec 2> /home/pi/share/rc.local.log   # send stderr from rc.local to a log file
exec 1>&2                             # send stdout to the same log file
set -x                                # tell sh to display commands before execution
#grafana
sudo systemctl start grafana-server.service
#iot_db
/home/pi/IoT_Frameworks/raspi_mesh_server/iot_db/iot_db &
#rf_gateway
sleep 2 && /home/pi/IoT_Frameworks/raspi_mesh_server/rf_gateway/gateway &
#mongodb : for some reason, mongodb service do not attempt reconnection on startup, but works when started a bit later
sleep 15 && sudo systemctl start mongodb.service
#mqtt_mongo
sleep 5 && python /home/pi/IoT_Frameworks/raspi_mesh_server/py_db_proxy/mqtt_mongo.py &
sleep 1 && python /home/pi/IoT_Frameworks/raspi_mesh_server/py_net_gateway/wemo_client.py &
sleep 5 && python /home/pi/IoT_Frameworks/raspi_mesh_server/py_net_gateway/milight_gateway.py &

Another example

/home/pi/IoT_Frameworks/raspi_mesh_server/rf_gateway/gateway &

python /home/pi/IoT_Frameworks/raspi_mesh_server/py_net_gateway/wemo_client.py &

python /home/pi/IoT_Frameworks/raspi_mesh_server/py_net_gateway/milight_gateway.py &

python /home/pi/IoT_Frameworks/raspi_mesh_server/ruler/ruler.py &

python /home/pi/IoT_Frameworks/raspi_mesh_server/py_net_gateway/raspi_status.py &

sleep 15 && python /home/pi/IoT_Frameworks/raspi_mesh_server/py_db_proxy/influx_client.py &

Protocol helper

0x05 : Alive 0x07 : light 0x0A : bme280

0x06 : 6 - Living room 0x0F : 15- Workplace 0x1A : 26- Sleeping room 0x1D : 29 0x26 : 38- Rep test