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

Python and python framework

Moderator: leecollings

Post Reply
malarcy
Posts: 50
Joined: Sunday 15 November 2015 13:36
Target OS: Linux
Domoticz version:
Contact:

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

Post 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.
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

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

Post by blauwebuis »

Have a look at the Smart Virtual Thermostat plugin and go from there?
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

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

Post 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.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
mzhur
Posts: 1
Joined: Tuesday 27 February 2018 13:00
Target OS: Linux
Domoticz version:
Contact:

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

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest