1-Wire sensors in Evok
-
Trying to read the values from DS18B20 temperature sensors. When I connect single sensor, I can get the value in the UniPi Control panel, it is listed in the REST API (when I do the rest/all call) but I am unable to figure out the request to get just single value. I tried many variants, tried to follow schema /rest/ai/{circuit} mentioned in the documentation, but all I can get is the 500 internal error. What is the correct rest call to get this value?
Another problem I face is that if I connect 1Wire hub, I can see just the same single sensor, while others are invisible. I am using the correct topology. Any idea what could go wrong there ? How often is the 1Wire bus scanned for changes?
The third issue is that I would like to connect a different kind of sensor, which is not listed in the list of supported 1Wire devices...wouldn't it be possible to add a support of any 1Wire device and just pass the raw data through the interface? Thanks. -
@actiwerks First of all, if you want to ask evok for a value of 1Wire sensor, you have to use /rest/sensor/sensor_address - NOT /rest/ai/ which is for analog inputs. You have to substitute the sensor_addres by the address which you can find in the output of /rest/all
Do you use our hub? If so, do you follow the topology displayed on the hub and also here: https://www.unipi.technology/hardware_documentation/1-wire-network-46
The scan interval for new sensor can be configured in evok.conf, search for part [OWBUS_1]
-
Thanks for the tip, this Rest call works for me. Perhaps it is good idea to include it to the API docs (https://evok-1.api-docs.io/1.01/) I couldn't find any note about the "sensor" usage there.
I use the same hub (athough got it elsewhere) think I got the topology right, have three sensors connected, and only can see two of them. Will try to check if one of them is not faulty. -
@actiwerks Check if you see them all if only 1 is connected at each time. Also try to re-do the RJ45 connector if it will not work.
-
This is where it gets weird. My OWBUS section is as follows :
[OWBUS_1]
owbus = /dev/i2c-1 --i2c=/dev/i2c-1:ALL ; Scanned bus (--i2c=/dev/i2c-1:ALL or localhost:2122 or 'u' for USB dongle)
interval = 3 ; [s] Default sensor reading
scan_interval = 300That means the scan is 300 miliseconds, correct? I only have one sensor connected, but the Evok web interface still shows values from two sensors...looks like it stopped updating after first read. Any ideas ?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login