Hi Guys,
I’ve looked around and can’t find this so I’ve probably not used the correct terminology or key phrases as I just can’t believe no one has wanted to do this before.
I am just playing with Hassio at the moment (0.57.2) and am waiting on an imminent move and then purchase of appropriate kit (though on the basis of what I learn, I will want to get some ‘test’ kit - maybe for Christmas ;-))) )
My thought is :-
I have a ‘family member’ who never switches lights off (I bet we all have one of those) but this is equally applicable for (say) switching ALL lights OFF (or ON).
So what I’d like to do is have a Z-Wave switch change state based on a switch BUT (this idea is an extension of the concept using a Fibaro Dimmer 2 to control a lamp (or lamps) in a multi access room or a stair way using multiple switches. So here in the standard set up if the circuit is closed the light is on (probably … not done the test with real kit, could be open = on) regardless I would like the switch to continue to change state if the circuit changes state, but I would like to be able to test the state of the circuit (W>=5) and if ON switch it off and if OFF
So I was thinking of using a virtual bit to flip the state the switch is looking for.
So anyone locally could over ride the state just by flipping the switch again (once not twice)
But this also allows me to (say) trigger a timer when a specific light comes on (downstairs cloakroom is my pet issue) and if it has not been turned ‘off’ after 10 mins - switch it ‘off’ from Hassio - But allow the next person to operate the switch and have it come on. this ideally would not mean changing all the light switches to momentary but leave the standard face place switches in place (a lot cheaper and thus more widely acceptable) also you sometimes can’t get the design of switch you need in momentary.
Is this doable ? How ?
Is there a switch you could just disconnect the inputs from the outputs and do it with a script or is there a switch where you can set the mode to be in a given state that switches on ANY change of state (hard-wired or virtual) If not there should be, can I get a firmware update ??? ; - )))))))))
Regards
Mutt
Well, I solved this one eventually (you don’t need the toggle bit).
I bought an AeonLabs Light Dimmer which was the cheapest Z-Wave Light Switch Dimmer I could find. Note this is NOT a Z-Wave Plus device, so will not notify on change - so I thought I’d have to institute polling for this and any other switches requiring turning off after ‘x’ minutes … but see later)
I wired it up in a temporary rig close to my Raspberry Pi 3 rig running hass.io (now ver 0.59.2 as of 20171206)
Without pairing the device worked in default mode, i.e. switch on (closed) - light on
I paired it to my AeonTec Z-Stick and after a reboot (it wouldn’t show up before) it appeared as :-
zwave.aeotec_dsc19103_micro_smart_dimmer_2nd_edition (I assume others would just change the dsc19103 bit ???)
AND i then configured the Z-Wave device and it’s attributes in customize.yaml :-
zwave.aeotec_dsc19103_micro_smart_dimmer_2nd_edition: friendly_name: Cloak Room Light # hidden: true light.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_level: friendly_name: Cloak Room Light sensor.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_voltage: friendly_name: Cloak Room Light Voltage sensor.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_current: friendly_name: Cloak Room Light Current sensor.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_power: friendly_name: Cloak Room Light Power sensor.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_energy: friendly_name: Cloak Room Light Energy sensor.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_previous_reading: friendly_name: Cloak Room Light Previous Energy
Note: not ALL attributes appeared at first, but everything turned up after the 3rd reboot.
I could then operate the light from the switch and/or operate it from HA. Though HA did not see when I operated the actual switch ; - ((((
I then opened ‘Z-Wave’ from the ‘Configuration’ side bar Tab in ‘Home Assistant’. - From the ‘Nodes’, I clicked and selected the device, I then went down to ‘Node config options’ (you may have to jiggle the scrolling so that it displays what you want) to select ‘80: Notification status’ and changed that from ‘none’ to ‘hail’ I restarted the ‘Server Management’ (not sure if that was necessary) and I could then operate the switch and about 4 to 6 seconds later the changed state showed up in HA. Further to that, sometimes previously, I’d change the state in HA and nothing would happen, that is no longer the case.
I then did A LOT of reading on automations/timers and got thoroughly confused but I persisted with countless invalid config ERRORS ! and eventually arrived at (to be pasted into automations.yaml) :-
- alias: Light_F0_CR_OFF #this should start with a dash
trigger:
platform: state
entity_id: light.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_level
to: ‘on’
for:
seconds: 600
action:
#service: homeassistant.turn_off
service: light.turn_off
entity_id: light.aeotec_dsc19103_micro_smart_dimmer_2nd_edition_level
I came across two different examples using ‘homeassistant.turn_off’ and ‘light.turn_off’ and they both seem to work okay. I like the shorter one and it’s actually more descriptive.
Notes about the device: 1) Though it is sold under the name ‘AeonLabs’ it reports on the network as ‘AeonTec’ 2) it just has one switch detection input, two contacts you can either short or not - and this loop is ELV, so do NOT hook up these to the mains. but this allows you to use multiple switches, say on each floor of a house, and when operated they change the state of the short. 1st Sw 1pCO last Sw 1pCO and all the intermediary switches Swapping these two lines (it’s a DPDT but only 4 contacts are exposed, google it). So it doesn’t matter that this device needs a live and neutral as you can either put this at a light fitting (the first if serving multiple fittings) or in the switch box (though it would have to be the first (with live, neutral and earth down AND a switched Live back) if at the light fitting, you’d just need 2 wires down and 3 wires between each Sw and the next.
I hope that saves the next guy a bit of the time I spent on it
- I am disappointed that a standard ‘new’ installation does not come with some of the standard configurations (even commented out if required) in the various files to get you going
- Why do the standard examples show you ‘configuration.yaml’ inclusions rather than what you should put in the included files as clearly they are trying to push us toward (I can get a lot of stuff to work in the main file, then it takes a fair amount of pratting about to get it to work with a sub-file - still haven’t sorted zones out yet though)
- Still not happy with polling as that seems to just case config errors.
- Timers - Wow that’s hard, followed the examples given and just got errors (even when matched exactly)
- Oh! and I still have problems getting cards to appear under a specific view AND NOT on the first tab TOO,
-
That’s next
Regards
Mutt