How to change the interval from a One-Wire sensor on the UniPi
Sometimes the default interval of the One-Wire sensor might be to slow. Here is a quick guide to change the value.
- Find the correct address of the One-Wire sensor
curl http://192.168.119.236:8088/rest/all [{"circuit": "1_01", "debounce": 50, "counter": 0, "value": 0, "dev": "input", "counter_mode": "disabled"}, {"circuit": "1_02", "debounce": 50, "counter": 0, "value": 0, "dev": "input", "counter_mode": "disabled"}, {"circuit": "1_03", "debounce": 50, "counter": 0, "value": 0, "dev": "input", "counter_mode": "disabled"}, {"circuit": "1_04", "debounce": 50, "counter": 0, "value": 0, "dev": "input", "counter_mode": "disabled"}, {"value": 0, "pending": false, "circuit": "1_01", "dev": "relay"}, {"value": 0, "pending": false, "circuit": "1_02", "dev": "relay"}, {"value": 0, "pending": false, "circuit": "1_03", "dev": "relay"}, {"value": 0, "pending": false, "circuit": "1_04", "dev": "relay"}, {"value": 0.028138793129200895, "circuit": "1_01", "dev": "ai"}, {"value": 0.01768108541555532, "circuit": "1_02", "dev": "ai"}, {"value": 0.006, "circuit": "1_01", "dev": "ao"}, {"interval": 15, "value": 23.95, "circuit": "2", "address": "282B63C1070000C3", "time": 1513704665.414423, "typ": "DS18B20", "lost": false, "dev": "temp"}]
- The DS18B20 is our One-Wire sensor. It has the address 282B63C1070000C3. In the same line, we can see the interval being set to 15.
- Now we change the configuration of the UniPi itself. Open up the evok-neuron.conf file.
sudo nano /etc/evok-neuron.conf
Now add the following to the file (all the way at the bottom).
[1WDEVICE_2] bus = 1 address = 282B63C1070000C3 type = DS18B20 interval = 1
- Make sure to change the address accordingly.
Now just restart the required service.
sudo service evok restart
- Now the One-Wire sensor should read about every 2-3 seconds. Due to limitations, it does not read every second.