-
Notifications
You must be signed in to change notification settings - Fork 0
/
single_file_setup
35 lines (33 loc) · 1.26 KB
/
single_file_setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# This file is part of the sensors2mqtt distribution (https://github.com/DCL777/sensors2mqtt.git).
# Copyright (c) 2020 Dries Claerbout
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
sudo apt update
sudo apt upgrade
sudo apt install git
sudo apt-get install i2c-tools
sudo apt-get install python-smbus
sudo adduser pi i2c
#sudo reboot
sudo apt install python3-rpi.gpio
sudo apt-get install python3
sudo apt-get install python3-pip
git clone https://github.com/DCL777/sensors2mqtt.git
cd sensors2mqtt
chmod +x ./start_normal
chmod +x ./start_debug
sudo pip3 install -r requirements.txt
cd sensors2mqtt
chmod +x ./sensors2mqtt.py
./sensors2mqtt.py