General Approach Question - Events/Manual Control

Moderator: leecollings

Post Reply
lake
Posts: 3
Joined: Wednesday 01 February 2017 9:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

General Approach Question - Events/Manual Control

Post by lake »

Hi all, new to domoticz and getting on well so far, so thanks for the great project.

I do however have a question about approach with regard to events/scripts.

Situation:

I have an outside light on a z-wave switch. I can control that switch though domoticz.
I create an event to turn on the outside light between 17:30 and 19:00 (as long as within nighttime window - after sunset)

This all works well.

However I may want to turn the light on after 19:00 manually, or turn the light off between 17:30 and 19:00 manually, and what I find at the moment is the event fights against my manual control of the light (eg. turning the light off again just after I have turned it on).

So the question is what is the preferred approach to cope with situation where event based and manual control is required simultaneously?

Thanks

Ian
User avatar
jvdz
Posts: 2334
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: General Approach Question - Events/Manual Control

Post by jvdz »

There should be no issue when you turn it on ones at 17:30 and turn it Off ones at 19:00 ... right?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

General Approach Question - Events/Manual Control

Post by pvm »

I did experience the same problem. I have extensive blockly scripts checking for light level, availability of phones, movement, active mediaplayer(s) etc. (With some virtual switches combining these categories). This resulted in the issue you describe.
I created a new virtual switch 'manual mode' to override all automatic scheduling. This with some scene buttons on a tablet.
I wonder whether other users have more simple solutions...

Edit: possibly involving exact times in blockly...

Edit 2: that would not work. It should be possible to automatically switch at every moment during the day
Last edited by pvm on Wednesday 01 February 2017 18:47, edited 1 time in total.
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: General Approach Question - Events/Manual Control

Post by StanHD »

I have an Auto/Manual switch for each of my Blockly events. That way it's quick and easy to disable and go manual if needed. As I use Amazon Alexa for my overide, then:- "Alexa, turn on the kitchen light" turns off the Auto/Manual switch, disabling the Blockly and turns on the kitchen light for as long as needed. And so on.

Works well for us
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
lake
Posts: 3
Joined: Wednesday 01 February 2017 9:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: General Approach Question - Events/Manual Control

Post by lake »

Thanks all for the responses, I get that one can create a dummy "manual over switch" and for 100% digitial control that would work perfectly. However the z-wave device also has a manual on/off toggle. This acts on the device directly, thus would not toggle "manual switch", but rather the actual lights state. Then the scripts end up fighting against it and turning the device on/off against manual will.

There may not be an elegant solution for this but thought I would ask the community before investing a lot of time/ignoring an easy approach.

Thanks
lake
Posts: 3
Joined: Wednesday 01 February 2017 9:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: General Approach Question - Events/Manual Control

Post by lake »

Just thinking about this some more;

Thought 1 - it would be nice if the reason for last state change was available to the scripts. Then in the scripts the "turn off" script could trigger only if the last state change was caused by another script (rather than detected state change - manual).

- This would need development I think as part of the solution

Thought 2 - The scripts could be updated with logic to only run once in a given day, thus if the "turn on" script has already reached a threshold where the state is changed to on, if the user manually turns off the light, the script will not try and turn it back on again until the next day.

- This could be done using variables I believe.

Just thinking out load...
User avatar
jvdz
Posts: 2334
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: General Approach Question - Events/Manual Control

Post by jvdz »

Isn't your thought 2 the same as doing it what I stated, only one On and one Off action at the beginning/end of the period?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
markjgabb
Posts: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: General Approach Question - Events/Manual Control

Post by markjgabb »

Correct me if I'm wrong but doesn't blocky scripts run once per minute as a default?

So for this particular scenario if you used if time = exact time. It would only switch once per day at that time?
Then else if time = later time turn off. The if you switch it between those times it should be manual...I think?

Sent from my SM-G900F using Tapatalk
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
EddieT
Posts: 5
Joined: Monday 30 January 2017 18:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Manchester
Contact:

Re: General Approach Question - Events/Manual Control

Post by EddieT »

StanHD wrote:I have an Auto/Manual switch for each of my Blockly events. That way it's quick and easy to disable and go manual if needed. As I use Amazon Alexa for my overide, then:- "Alexa, turn on the kitchen light" turns off the Auto/Manual switch, disabling the Blockly and turns on the kitchen light for as long as needed. And so on.

Works well for us Image

Can you show a pic of the blocky script please, taken 10 day's of brain melt just to something to work badly, but getting there.

Cheer's

Eddie.
Raspi 2b, Aeon labs gen 5 Z stick, 2 x gen 5 fibaro multi sensor, Fibaro dual relay,
Foxx, Hue, RFXcom 433E, plus a few others.
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: General Approach Question - Events/Manual Control

Post by StanHD »

Here you go:-

Image

Image
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: General Approach Question - Events/Manual Control

Post by StanHD »

Looks like this in Floor Plan:-

Image
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest