Skip to content

makoeppel/midasHome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup MIDAS

install

sudo apt-get install bluez bluez-hcidump tmux git cmake libcurl4-openssl-dev libcap-dev
pip install picamzero ruuvitag-sensor --break-system-packages

find sensors

"""
Find RuuviTags
"""

import os

os.environ["RUUVI_BLE_ADAPTER"] = "bluez"

import ruuvitag_sensor.log
from ruuvitag_sensor.ruuvi import RuuviTagSensor

ruuvitag_sensor.log.enable_console()

# This will print sensor's mac and state when new sensor is found
if __name__ == "__main__":
    RuuviTagSensor.find_ruuvitags()

midas

git clone https://@bitbucket.org/tmidas/midas.git
cd midas
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make -j4
make install
cd ../..
vim .bashrc

Add the following to the end:

export MIDASSYS=$HOME/midas
export MIDAS_EXPTAB=$HOME/midasHome/exptab
export MIDAS_EXPT_NAME=midasHome
export PATH=$PATH:$MIDASSYS/bin
export PYTHONPATH=$PYTHONPATH:$MIDASSYS/python
export RUUVI_BLE_ADAPTER="bluez"
source .bashrc

Setup extab file

`echo "midasHome /home/pi/midasHome eg" > /home/pi/midasHome/exptab`

Setup webserver

mhttpd
# kill it again
odbedit -c "set 'WebServer/Enable insecure port' 'y'"
odbedit -c "set 'WebServer/insecure port passwords' 'n'"
odbedit -c "set 'WebServer/insecure port host list' 'n'"

Setup systemd

sudo nano /etc/systemd/system/mhttpd.service
[Unit]
Description=MIDAS Web Server (mhttpd)
After=network.target

[Service]
Type=forking
User=pi
Group=pi
WorkingDirectory=/home/pi
ExecStart=/home/pi/midasHome/start-mhttpd.sh
PIDFile=/tmp/mhttpd.pid
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable mhttpd
sudo systemctl start mhttpd
sudo systemctl status mhttpd

Find tags

python find_tag.py

Add MAC to ruuvi_fe.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published