Hi,
i am trying to write a python plugin which derives the needed boiler temp from an outside temperature device
however i cannot find a way how to get access to a temperature sensor which was not created by the pluing (e.g. i have a idx number from the temperature sensor, how can i get the value of that sensor in a python plugin)
Does someone have some sample code i can use?
Gettign the value from a temperature device in a python plugin
Moderator: leecollings
-
- Posts: 2005
- Joined: Monday 02 April 2018 20:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: France
- Contact:
Re: Gettign the value from a temperature device in a python plugin
A plugin can only see its own devices. Is really a plugin you need ? Or a python/lua/dzVent script would be better ?
Otherwise you can use jsonnAPI inside the plugin ( which I don’t think is great)
Envoyé de mon iPhone en utilisant Tapatalk
Otherwise you can use jsonnAPI inside the plugin ( which I don’t think is great)
Envoyé de mon iPhone en utilisant Tapatalk
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices
If the plugin provides you value, you can support me with a donation Paypal.
Wiki is available here.
Zigbee for Domoticz FAQ
If the plugin provides you value, you can support me with a donation Paypal.
Wiki is available here.
Zigbee for Domoticz FAQ
-
- Posts: 359
- Joined: Friday 17 August 2018 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Gettign the value from a temperature device in a python plugin
Tx. i could fix with a python/lua/dzvents script, but i really like the fact that the plugin creates and manages it's own devices. Saves a lot of manual work creating the virtual devices.
I already used the json API as a workaround. It works, but requires that the plugin know the IP Adress and port from the domoticz instance. It is now a configurable parameter in the plugin, but it would be better if this could be retrieved from the domoticz config within the python code. Does anyone know how?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Gettign the value from a temperature device in a python plugin
A lot of work?akamming wrote: Saves a lot of manual work creating the virtual devices.
Takes about 20 seconds per device (if you type as slow as me)

Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Gettign the value from a temperature device in a python plugin
I had the same concern and created a topic : viewtopic.php?f=65&t=35121
Getting access to other devices state with read only access from a plugin would be very useful.
Getting access to other devices state with read only access from a plugin would be very useful.
- waltervl
- Posts: 5714
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Gettign the value from a temperature device in a python plugin
A plugin is only to be used to create and control the related hardware. Of you want to control/modify devices based on other devices you need scripting like Blockly, Lua, DzVents etc who have a view over all Domoticz devices.Masure wrote: ↑Wednesday 25 August 2021 14:36 I had the same concern and created a topic : viewtopic.php?f=65&t=35121
Getting access to other devices state with read only access from a plugin would be very useful.
If you accidentally would like to use one then the http API way of working would do.
It is the same for C++ Hardware plugins I presume.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest