Feature request > Get other devices data (not plugin managed devices)

Python and python framework

Moderator: leecollings

Post Reply
Masure
Posts: 35
Joined: Sunday 22 April 2018 11:23
Target OS: Windows
Domoticz version:
Contact:

Feature request > Get other devices data (not plugin managed devices)

Post by Masure »

Hi,

I'm developing a plugin which needs "external" device value. By "external", I mean a device which has not been created by the plugin.

I usualy access to the plugin devices like this

Code: Select all

Devices[unit]
Now I need to access another device nvalue. By idx, ID or name looping in an array, whatever.

Did not find anything in the documentation. I'm afraid the only way will be with the Domoticz web API. If it's the only way, I'll use it but going through the web API from the core plugin engine would be so sad.

edit : I turn this question into a feature request in the plugin system.
Last edited by Masure on Monday 27 December 2021 10:23, edited 2 times in total.
Masure
Posts: 35
Joined: Sunday 22 April 2018 11:23
Target OS: Windows
Domoticz version:
Contact:

Re: Python plugin, how to get a device not handled by the plugin ?

Post by Masure »

Before I can find a real solution, I implemented the sensor data retrieval from the web api. As I had assumed, this is really ugly .

I have to re specify the connection details to the domoticz server (username, password, port, ...) for the plugin to work. Whereas the plugin is running inside Domoticz, this is pure nonsense and will be confusing for the user when he will have to specify those in the plugin parameters.

Do I miss something big ? Please tell me so.
Masure
Posts: 35
Joined: Sunday 22 April 2018 11:23
Target OS: Windows
Domoticz version:
Contact:

Re: Feature request > Get other devices data (not plugin managed devices)

Post by Masure »

I up this thread and hope Dnpwwo will read ;)

This may sound weird but I really have the need.

My plugin manage Mitsubishi air conditionner units (https://github.com/Masurov/Domoticz-Mit ... QTT-Plugin). To make the regulation, the AC unit takes current temperature value from internal sensor by default. But it also allows to take another temperature value. I send the value to the AC interface from a better located temperature sensor I have in Domoticz.

My plugin allows the user to give the device idx he wants to use as the alternative temperature sensor.

Technically I have no other way to query this value from the http json interface. I'd like to have a more straightforward in the plugin system. Another dictionary "OtherDevices" alongside the plugin managed "Devices" dictionary.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest