Page 1 of 1

Can we create new or custom device types via python plugin (thermostat setpoint + temperature + demandHeat)

Posted: Sunday 14 January 2018 21:37
by malarcy
I would like to create a plugin to support the following virtual device

A device I am calling "fake-o-stat" - I need a SINGLE device that can take a setpoint, return a temperature and (for now) optionally have a "demandHeat" function if current temp < setpoint (with some maths to adjust for tolerance)

The "fake-o-stat" would allow you to map other domoticz devices to the various input/out like this:

Device - fake-o-stat setpoint = Domoticz IDX of a thermostat setpoint device
Device - fake-o-stat temperature = Domoticz IDX of a temperature device
Device - fake-o-stat demandHeat = Domoticz IDX of a switch.

Why? - Because I have a hybrid solution for a couple of rooms - a heater controlled by a zwave plug, a temperature sensor from mysensors and I want the whole thing to be represented to alexa (via the EXCELLENT controlicz) as a temperature device - so voice control can say "what is the study temperature", "set study temperature to 22 degrees"

The problem - device type thermostat setpoint doesn't have current temperature, device type temperature doesn't support setpoint.

I have faked it bu having two devices (one called study temperature, one called study target) and presenting both to alexa - but it's not ideal (on has not met high WAF (wife acceptance factor) - so thinking of other approaches

I see in other threads some looking for the dummy device "thermostat setpoint" to have a current temperature attribute, this is the same thing approached from a different angle.

Thoughts, insights and suggestions welcomes.

Re: Can we create new or custom device types via python plugin (thermostat setpoint + temperature + demandHeat)

Posted: Monday 15 January 2018 9:48
by blauwebuis
Have a look at the Smart Virtual Thermostat plugin and go from there?

Re: Can we create new or custom device types via python plugin (thermostat setpoint + temperature + demandHeat)

Posted: Monday 15 January 2018 11:08
by Dnpwwo
@malarcy,

The Python plugins can't really new device types because the user interface wouldn't know what to do with them (the plugins wouldn't care because its just a 'Type' and 'SubType' as far as they are concerned).

The current devices have a lot of hardcoded logic in the web pages which you would need to uplift.

Re: Can we create new or custom device types via python plugin (thermostat setpoint + temperature + demandHeat)

Posted: Tuesday 27 February 2018 13:17
by mzhur
malarcy wrote: Sunday 14 January 2018 21:37 I would like to create a plugin to support the following virtual device

A device I am calling "fake-o-stat" - I need a SINGLE device that can take a setpoint, return a temperature and (for now) optionally have a "demandHeat" function if current temp < setpoint (with some maths to adjust for tolerance)

The "fake-o-stat" would allow you to map other domoticz devices to the various input/out like this:

Device - fake-o-stat setpoint = Domoticz IDX of a thermostat setpoint device
Device - fake-o-stat temperature = Domoticz IDX of a temperature device
Device - fake-o-stat demandHeat = Domoticz IDX of a switch.

Why? - Because I have a hybrid solution for a couple of rooms - a heater controlled by a zwave plug, a temperature sensor from mysensors and I want the whole thing to be represented to alexa (via the EXCELLENT controlicz) as a temperature device - so voice control can say "what is the study temperature", "set study temperature to 22 degrees"

The problem - device type thermostat setpoint doesn't have current temperature, device type temperature doesn't support setpoint.

I have faked it bu having two devices (one called study temperature, one called study target) and presenting both to alexa - but it's not ideal (on has not met high WAF (wife acceptance factor) - so thinking of other approaches

I see in other threads some looking for the dummy device "thermostat setpoint" to have a current temperature attribute, this is the same thing approached from a different angle.

Thoughts, insights and suggestions welcomes.
I've the same idea for the set point device. Would you found the solution is more butifull like SetPoint+Temperature device?