We will be using Phidgets in our application so you will need to install the the drivers specific to your operating system before proceeding further. Please follow the instructions found on their website and have them installed.
Once you have installed the drivers you are now ready to moving forward! Please look in your Phidgets Control Panel and please write down the following values from your devices:
- Serial Number
- Hub Port Number
- Channel Number
Here is how it would look on MacOS and the highlighted red-box is where the values can be found.
-
Clone the project.
cd ~/ git clone https://github.com/mikasoftware/mikathing.git cd ~/mikathing -
Setup our virtual environment
virtualenv -p python3.6 env -
Now lets activate virtual environment
source env/bin/activate -
Now lets install the libraries this project depends on.
pip install -r requirements.txt -
In the
srcdirectory create a file called.envand populate it with the following content:# THE FOLLOWING VARIABLES ARE SET ACCORDING TO YOUR PHIDGET DEVICE VALUES. # PLEASE REVIEW THE PHIDGETS.COM WEBSITE TO GET MORE INFORMATION HOW TO GET # THESE VALUES FROM YOUR COMPUTER. HUMIDITY_SERIAL_NUMBER=538319 HUMIDITY_VINT_HUB_PORT_NUMBER=0 HUMIDITY_CHANNEL_NUMBER=0 TEMPERATURE_SERIAL_NUMBER=538319 TEMPERATURE_VINT_HUB_PORT_NUMBER=0 TEMPERATURE_CHANNEL_NUMBER=0 # THE FOLLOWING VARIABLES ADJUST THE OPERATION OF THIS APPLICATION. APPLICATION_DATA_INTERVAL_IN_MINUTES=5 APPLICATION_DATABASE=thing.db -
Please change the contents of the
.envfile to match the configuration found in your systen.
python mikathing.py
