creating setpoint device Topic is solved

Python and python framework

Moderator: leecollings

Post Reply
JanJaap
Posts: 199
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

creating setpoint device

Post by JanJaap »

Hi,

I'm (trying to) create a setpoint device from a plugin. Works fine, except the ValueMin does not get created correctly:

Code: Select all

            Options = {'ValueStep':'100', ' ValueMin':str(-1 * self.maxPower * len(self.devices_dict)), 'ValueMax':str(self.maxPower * len(self.devices_dict)), 'ValueUnit':'W'}
            #Options = {'ValueStep':'100', ' ValueMin':'-4400', 'ValueMax':'4400', 'ValueUnit':'W'}
            logging.debug("options to create power setpoint: "+ str(Options))
            Domoticz.Unit(Name=deviceId + ' - Battery power setpoint', Unit=self.batPowerSetpointUnit, Type=242, Subtype=1, Options=Options, DeviceID=deviceId).Create()

So the commented line gives the outcome of the formula's in my setup. However, regardless of what I enter, the created setpoint device always has the default value of -200 as minimum. This a bug?
Schermafbeelding 2025-01-11 150246.png
Schermafbeelding 2025-01-11 150246.png (30.32 KiB) Viewed 176 times
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: creating setpoint device

Post by waltervl »

Do you see this behavior on classic plugin framework or the new DomoticzEx?

If on the new framework make a simple demo plugin and create a GitHub issue so a developer can reproduce and hopefully fix the issue...
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
JanJaap
Posts: 199
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: creating setpoint device

Post by JanJaap »

Sorry forgot to mention. Yes it's on the Ex framework. Will make bug. Tnx
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: creating setpoint device

Post by waltervl »

Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest