You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. copy folder *api* to the machine the RESTful API should be running on
45
-
3.@todo configure API (rename example config first)
46
-
4.@todo install nodejs, ...
47
-
5.@todo run API
48
-
5. copy folder *logger* to the machine(s) where the 1wire temperature sensors are connected to (for example your Raspberry Pi(s))
49
-
6.@todo configure logger (rename example config first)
50
-
7.@todo install python3 + modules...
51
-
9.@todo
52
-
53
-
54
-
## API as systemd service
42
+
2. configure api (in the `api` folder):
43
+
- copy `config.example.json` file to `config.json`
44
+
- open the file and adjust the values in the sensors section to your wishes
45
+
- you need the sensor_ids from your 1wire sensors
46
+
- remove or add sensors here as you need
47
+
- give them names :)
48
+
3. install node.js
49
+
4. run `npm install`
50
+
5. start api by running `node api.js`
51
+
52
+
### On the client (where the sensors are attached and the logger should be running)
53
+
54
+
1. configure logger (in the `logger` folder):
55
+
- copy `config.example.ini` file to `config.ini`
56
+
- open the file and replace the HOST and PORT values with the one from the machine your RESTful API is running on
57
+
2. Install python3.6+
58
+
3. (optional) if you want to use DHT22 sensors you need to install the Adafruit_Python_DHT module. See: [Adafruit_Python_DHT#install-with-pip](https://github.com/adafruit/Adafruit_Python_DHT#install-with-pip)
59
+
4. Run the logger by executing `python3 log.py sqlite` or `python3 log.py restful`
60
+
61
+
62
+
## Run the RESTful API as systemd service
55
63
56
64
If you want the RESTful API run as a systemd service you can do the following:
0 commit comments