Mode-selector / multistate device

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

rjnl
Posts: 14
Joined: Friday 27 June 2014 11:08
Target OS: Linux
Domoticz version: Beta
Contact:

Mode-selector / multistate device

Post by rjnl »

Currently i'm working on improving the daikin control script for use with my urura sarara heatpump airconditioner, because the current script is not working ideally for me (i tend to fall back to the remote a lot instead of using the tablet on the wall). Also, the automatic switching between heat/cool based on a temp comparison is not working out, since it tends to flap sometimes between heat and cooling modes. e.g. during daytime when the sun starts heating the room on heating mode it switches to cooling and then back to heating. After I got it working properly i will post this to the relevant topic of course. I wish to implement some support for selecting the mode on the aircon, e.g. ideally i could select (from a dropdown, or a rotator switch, etc.) the mode using a single button. e.g. OFF/AUTO/COOL/HEAT/DRY/HUMIDIFY/DRY COOL/HUMID HEAT/FAN/FRESH. Currently I would need to create a lot of on/off switches and a lot of dirty code and sub/slave device settings to make it sort of easy to use and consistent, but its not really. Also it takes up a lot of "screen estate" on the control devices (app and tablets)

I can imagine some other applications benefiting from this, e.g. lighting scene selector, selecting ventilation settings, bundle all logitech harmony activity switches in a single device/control, displaying presence states, etc.
pj-r
Posts: 140
Joined: Wednesday 17 December 2014 17:30
Target OS: Linux
Domoticz version: V3.8650
Location: Jyväskylä, Finland
Contact:

Re: Mode-selector / multistate device

Post by pj-r »

LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
Dlanor
Posts: 67
Joined: Sunday 22 March 2015 16:18
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Mode-selector / multistate device

Post by Dlanor »

Interesting! Maybe it is possible make an multi-state custom switch!
Domoticz| Zigbee | SONOFF
zofiel
Posts: 30
Joined: Sunday 19 July 2015 10:03
Target OS: -
Domoticz version:
Contact:

Re: Mode-selector / multistate device

Post by zofiel »

yes please! we need a multistate device :)
monty
Posts: 1
Joined: Monday 21 September 2015 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mode-selector / multistate device

Post by monty »

would be so useful ..... we need it !!!!

pleeeaasseeeee add it

Regards Monty
westanfelda
Posts: 4
Joined: Thursday 08 October 2015 10:52
Target OS: -
Domoticz version:
Contact:

Re: Mode-selector / multistate device

Post by westanfelda »

I also would like to have an Switch with 3 buttons for my blinds - down, stop and up. The Blinds stops only by pressing the stop button on the remote :evil:

would be great...at least for me :D :D :D

Guido
User avatar
abalazs
Posts: 2
Joined: Sunday 03 May 2015 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Debrecen, Hungary
Contact:

Re: Mode-selector / multistate device

Post by abalazs »

I also thought about how much it could be resolved by switching to a four-speed fan.
Please be multi-state switch. :)
User avatar
SQ9MDD
Posts: 23
Joined: Friday 04 September 2015 22:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Warsaw Poland
Contact:

Re: Mode-selector / multistate device

Post by SQ9MDD »

Hi guys, i see new switch type (selector).
Is this work done now?
Because i have some issue, but not sure what i'm doing wrong.
pj-r
Posts: 140
Joined: Wednesday 17 December 2014 17:30
Target OS: Linux
Domoticz version: V3.8650
Location: Jyväskylä, Finland
Contact:

Re: Mode-selector / multistate device

Post by pj-r »

Looks like that. I did read thru the pull request and looks like it has int string mapping sql-database. Have to try it at week end.
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
nmaster
Posts: 54
Joined: Saturday 16 August 2014 17:17
Target OS: Linux
Domoticz version: 3.6304
Contact:

Re: Mode-selector / multistate device

Post by nmaster »

Hi, I was waiting for this kind of switch for a long time.

I can add a selector switch but does somebody knows how it can be used ?
User avatar
SQ9MDD
Posts: 23
Joined: Friday 04 September 2015 22:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Warsaw Poland
Contact:

Re: Mode-selector / multistate device

Post by SQ9MDD »

I cant add selector levels i think is not ready yet.
User avatar
jcjames13009
Posts: 33
Joined: Monday 09 March 2015 15:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France / Marseille
Contact:

Re: Mode-selector / multistate device

Post by jcjames13009 »

Hi

Just did a quick test to simulate heating swicth (Off / Eco / Confort). Couldn't make it working with blocky but works fine with Lua... :D

Create Selector Switch with Off / Eco / Confort level name and 3 virtual switches Heating / Heating Eco and Heating Confort
Selector SW 1.JPG
Selector SW 1.JPG (67.64 KiB) Viewed 15864 times
Selector SW 2.JPG
Selector SW 2.JPG (32.35 KiB) Viewed 15864 times
and a lua script

Code: Select all

-- script_device_SelectorSwitch_TEST.lua
-- 

commandArray = {}

-- Commande Selector Switch
if (devicechanged['Selector Switch'] == 'Off' and otherdevices['Test Chauffage'] == 'On') then
	commandArray['Test Chauffage']='Off'
	commandArray['Test Chauffage Eco']='Off'
	commandArray['Test Chauffage Confort']='Off'
	print('Test Chauffage Off')
end

if (devicechanged['Selector Switch'] == 'Eco' and otherdevices['Test Chauffage Eco'] == 'Off') then
	commandArray['Test Chauffage']='On'
	commandArray['Test Chauffage Eco']='On'
	commandArray['Test Chauffage Confort']='Off'
	print('Test Chauffage Eco')
end

if (devicechanged['Selector Switch'] == 'Confort' and otherdevices['Test Chauffage Confort'] == 'Off') then
	commandArray['Test Chauffage']='On'
	commandArray['Test Chauffage Eco']='Off'
	commandArray['Test Chauffage Confort']='On'
	print('Test Chauffage Confort')
end

return commandArray
FYI I use Domoticz V2.3852

Will use it for bathroom heating control

Thanks for this new feature :D

JC
User avatar
SQ9MDD
Posts: 23
Joined: Friday 04 September 2015 22:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Warsaw Poland
Contact:

Re: Mode-selector / multistate device

Post by SQ9MDD »

I'm confused, how can you did this?
I have a problem with selector cant add levels simply this button doesn't work, and after save dont have any option. :shock:
Attachments
selctor-after-save.png
selctor-after-save.png (13.04 KiB) Viewed 15847 times
selctor-before-save.png
selctor-before-save.png (21.61 KiB) Viewed 15847 times
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Mode-selector / multistate device

Post by Dnpwwo »

Very nice, simple to use and looks good.

Congrats!
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
User avatar
SQ9MDD
Posts: 23
Joined: Friday 04 September 2015 22:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Warsaw Poland
Contact:

Re: Mode-selector / multistate device

Post by SQ9MDD »

OK i see now, i can add selector type dummy switch. But with mysensors switch this future doesn't work.
User avatar
jcjames13009
Posts: 33
Joined: Monday 09 March 2015 15:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France / Marseille
Contact:

Re: Mode-selector / multistate device

Post by jcjames13009 »

Hi SQ9MDD

That's the config I use (Dummy switch). I don't have mysensor.

JC
Last edited by jcjames13009 on Friday 08 January 2016 8:39, edited 1 time in total.
User avatar
jcjames13009
Posts: 33
Joined: Monday 09 March 2015 15:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France / Marseille
Contact:

Re: Mode-selector / multistate device

Post by jcjames13009 »

What is missing is to have different icon for each level :D
User avatar
SQ9MDD
Posts: 23
Joined: Friday 04 September 2015 22:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Warsaw Poland
Contact:

Re: Mode-selector / multistate device

Post by SQ9MDD »

Right, and possibility to changing lvl 0 name. Sometimes we need a selector for operating modes, changing types of behavior, not only for start/mode/stop.
And another BIG question: they are plannig add selector to the mysensors?
nmaster
Posts: 54
Joined: Saturday 16 August 2014 17:17
Target OS: Linux
Domoticz version: 3.6304
Contact:

Re: Mode-selector / multistate device

Post by nmaster »

Thanks jcjames13009 it's exactly what I need for my heating system.
User avatar
jcjames13009
Posts: 33
Joined: Monday 09 March 2015 15:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France / Marseille
Contact:

Re: Mode-selector / multistate device

Post by jcjames13009 »

Still testing...

Planing is working fine with dummy selector switch
Selector Switch 2.JPG
Selector Switch 2.JPG (62.88 KiB) Viewed 15701 times
Selector Switch 3.JPG
Selector Switch 3.JPG (32.58 KiB) Viewed 15701 times
and blocky as well
Selector Switch.JPG
Selector Switch.JPG (37.56 KiB) Viewed 15701 times

Code: Select all

2015-12-23 22:06:49.445 Selector Switch sur Eco
2015-12-23 22:06:49.445 EventSystem: Event triggered: Selector SW_2
2015-12-23 22:06:49.159 (Virtuel) Light/Switch (Selector Switch 2) 

2015-12-23 22:07:34.096 Selector Switch sur Confort
2015-12-23 22:07:34.096 EventSystem: Event triggered: Selector SW_3
2015-12-23 22:07:33.871 (Virtuel) Light/Switch (Selector Switch 2) 

2015-12-23 22:08:08.050 Selector Switch sur Off
2015-12-23 22:08:08.050 EventSystem: Event triggered: Selector SW_1
2015-12-23 22:08:07.843 (Virtuel) Light/Switch (Selector Switch 2) 
Just multistate icon is missing. Sure we'll have it soon :D

JC
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest