TRB141 Python script 1-wire


Please help me about the following situation.
I would like to run a python script, which reads out TRB141 1-wire sensor datas.
Is there any kind of help or example file about this situation?

Thanks in advance, and best regards!


1 Like


We have a Wiki example available for 1-Wire here: TRB141 1-Wire Setup/Configuration - Teltonika Networks Wiki
Hope this helps!

Best regards,

As i know this library provides an interface to communicate with 1-wire devices, including the TRB141 sensor. official website

You can install it by running sudo apt-get install owfs or by following the installation instructions specific to your operating system.

import ow

ow.init(‘localhost:4304’) # Initialize OWFS

Get a list of available 1-wire devices

devices = ow.Sensor(‘/’).sensorList()

Iterate over the devices and read their values

for device in devices:
sensor = ow.Sensor(device)
temperature = sensor.temperature
humidity = sensor.humidity
# Do something with the temperature and humidity data

ow.finish() # Clean up OWFS connection