question

dcsonka avatar image
dcsonka asked

Polling Temperature sensor with python

Hi,

I am trying to poll the connected temperature sensor with the following python script but I got the following error.

What should I modify in order to get things working?

Thank you

root@einstein:~# cat relay.py

#!/usr/bin/python

import dbus

import dbus.service

bus = dbus.SystemBus()

temp =bus.get_object('com.victronenergy.temperature.adc_builtin0_7', '/com/victronenergy/temperature/adc_builtin0_7/Temperature')

print(temp.Introspect())


root@einstein:~# python relay.py

ERROR:dbus.proxies:Introspect error on :1.61:/com/victronenergy/temperature/adc_builtin0_7/Temperature: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownObject:

Traceback (most recent call last):

File "relay.py", line 6, in <module>

print(temp.Introspect())

File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 72, in __call__

return self._proxy_method(*args, **keywords)

File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 141, in __call__

return self._connection.call_blocking(self._named_service,

File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 652, in call_blocking

reply_message = self.send_message_with_reply_and_block(

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownObject: org.freedesktop.DBus.Error.UnknownObject


Modbus TCPTemperature Sensorpython
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kevgermany avatar image kevgermany ♦♦ commented ·
@dcsonka

Moved to modifications space.

0 Likes 0 ·
0 Answers

Related Resources

Additional resources still need to be added for this topic

Modbus TCP Basics

Victron temperature sensor disambiguation table - which product supports which sensor