Code running on a single smart farm.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
The IoT Node is a part of FarmLab project. It works together with the rest of the projects to create a full scalable and modern farm.
To get a local copy up and running follow these simple steps.
Install python 3.X
sudo apt install python3
Install paho-mqtt
sudo pip install paho-mqtt
git clone https:://github.com/jp19-lafa/IoT-Node.git
sudo apt install python3
sudo pip install paho-mqtt
Edit the config.py
file to contain all settings for connecting to the mqtt broker
Simply run the network.py
file to start the connection. Make sure you build the hardware correctly as described in the wiki
python3 src/network.py
When launching bluetooth/main.py
the server will listen for all incomming bluetooth pairing requests. When such a request comes in the server will automatically accept the request.
After that it waits until a bluetooth connection is made. (Using RFCOMM)
Here is a list of command to send to the bluetooth server to establish a network connection
Type | Code | Value |
---|---|---|
Wifi standard | TYPE: | wpa2,mchap |
SSID name | SSID: | String |
Password | PWD: | String |
Username | USER: | String (mchap only) |
Try to connect | TRY: | 1 |
Here is a list of exit/success codes
Code | return type | Meaning |
---|---|---|
Error 1 | ERROR:1 | You didn't tell the server the wifi connection type |
Error 2 | ERROR:2 | The wifi connection type isn't recognized |
Error 3 | ERROR:3 | Your network connection credentials are wrong |
Error 4 | ERROR:4 | Property is not part of the connection type |
Success 1 | SUCCESS:1 | Sever connected to the network succesfully |
In a short example the Android application should listen for ERROR codes an display them correctly to the user. When a Success message has been send the bluetooth connection can be ended.
For more examples, please refer to the Documentation
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
tom - tom@odex.be
Project Link: https://github.com/jp19-lafa/IoT-Node