how to know exactly a reason for event

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
torM6
Posts: 18
Joined: Tuesday 29 May 2018 18:11
Target OS: NAS (Synology & others)
Domoticz version: 3.9390
Contact:

how to know exactly a reason for event

Post by torM6 »

I want to use Xiaomi Xiaofang camera motion detection features. Problem that it not supported by domoticz because it communicates with xiaomi gateway in limited way.
idea that I will make automation inside xiaomi app/cloud and cause something which can be detected inside domoticz.
First idea to come - use Gateway to make light off if it off and on if it on.
I try to write a dzVent script to catch the event which set state "Off" on the attached gateway device.
The problem that I can't find a place where I can detect exactly a reason for event.
it just set state of the device "changed" and I don't really know what happens - can't make a distinction between my external Off command and e.g. lux or door bell induced from outside.
In what field I can find event reason?
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: how to know exactly a reason for event

Post by dannybloe »

Well, Domoticz triggers the event system when there is a state change for a device like a switch being triggered or a temperature being changed. dzVents only gets a list of devices that have such a change. But the reason for the triggering is unknown. So if someone presses a switch in the GUI of presses a wall switch.. that information is unknown and in some situation cannot be known at all.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest