HmIP Alarm Siren

Support for our english speaking visitors

Moderator: Co-Administratoren

Helium
Beiträge: 14
Registriert: 17.01.2019, 22:18
Hat sich bedankt: 1 Mal

HmIP Alarm Siren

Beitrag von Helium » 17.01.2019, 23:01

Dear All,
I am new to Homematic and need some help. I have the HmIP Window contact and the HmIP Siren and I used the WebUI for programming.

1. Each of them work well when triggered from the WebUI. But in a Program the Siren behaves strangely.

Program 1: When the Window is "Open", Set Alarm to "Simultaneous Fast Flashing"
Program 2: When the Window is "Closed", Set Alarm to "Simultaneous Slow Flashing"

However when I open the window, the Alarm "Simultaneous Slow Flashing" plays and vice versa. I don't know why this is happening ?

2. Also I would like to understand the concept of System Variable. What various values can it take ? How do you use this ?

Any help or links in English is highly appreciated.
Regards

tomi_cc16
Beiträge: 1150
Registriert: 30.11.2013, 16:35
Wohnort: Mordor
Hat sich bedankt: 23 Mal
Danksagung erhalten: 56 Mal

Re: HmIP Alarm Siren

Beitrag von tomi_cc16 » 17.01.2019, 23:20

Regarding your program please post a screenshot to better understand. Please also write exactly which HmIP devices you are using ( I guess HmIP-ASIR and HMIP-SWDO)?
Look here with google translate how programs for the HmIP-ASIR need to be written:
https://www.elv.de/topic/ccu2-einbinden.html

More Infos about variables in:
- WebUI manual
- Part 1
- Part 2
- Part 3
You find them here:
viewtopic.php?f=49&t=45485

I also recommend for begginers to use google translate for this page into english:
viewtopic.php?f=19&t=22801
viewtopic.php?f=31&t=7597

More help on programs and variables with google translate:
https://www.schellenberger.biz/homemati ... d-aktoren/
https://technikkram.net/2016/07/homemat ... und-nutzen
https://github.com/hobbyquaker/hq-webui ... umentation
https://www.christian-luetgens.de/homem ... ierung.htm
https://files.elv.com/bilder/journal/20 ... eil_2b.pdf
https://www.siio.de/homematic-datenbank ... ds-szenen/
...

If something is unclear just ask :-)

Helium
Beiträge: 14
Registriert: 17.01.2019, 22:18
Hat sich bedankt: 1 Mal

Re: HmIP Alarm Siren

Beitrag von Helium » 18.01.2019, 22:09

Many thanks ! You have posted a wealth of Information for me to go through !

1. I have already solved my problem. The issue was that I wrote 2 programs for operating the same sensor, without realizing that a single program works bi-directional.

I moved Program 2 to Program 1's ELSE condition and the whole thing worked fantastically !

2. Now I am working on including a Timer. The use case is that When I open my window and keep it open for > 5 minutes, then an alarm should be trigerred. No alarm when the window is open for <= 5 minutes.

I will go through the shared links and see if I can get some material on this. If I am unable to find, I will again seek your help !

Thanks once again ! Regards

tomi_cc16
Beiträge: 1150
Registriert: 30.11.2013, 16:35
Wohnort: Mordor
Hat sich bedankt: 23 Mal
Danksagung erhalten: 56 Mal

Re: HmIP Alarm Siren

Beitrag von tomi_cc16 » 18.01.2019, 23:06

Good to hear you found a solution. If you post a picture of your script program also other could profit from you.

Just for information:
In General CCU Script programs should be done in this order.

IF whatever Trigger
THAN device immediately Switch on Time for 180sec
THAN Device immediately Switch Status "On"

So it will shut down automatically after 180sec

Helium
Beiträge: 14
Registriert: 17.01.2019, 22:18
Hat sich bedankt: 1 Mal

Re: HmIP Alarm Siren

Beitrag von Helium » 20.01.2019, 21:23

Pl find screenshot
Dateianhänge
Homematic1.jpg

Helium
Beiträge: 14
Registriert: 17.01.2019, 22:18
Hat sich bedankt: 1 Mal

Re: HmIP Alarm Siren

Beitrag von Helium » 21.01.2019, 20:38

Hello,

I went through the material, but I would need some clarity on the following:-

1. What is the concept of Systemvariable ? How does it behave ? How do you set the initial value of Systemvariable ?

2. How do you increment/decrement systemvariable ?

3. If I have to design a timer based on systemvariable, how do I implement it ?
Use Case: Check every 30 minutes, whether the window is open. If yes, trigger an alarm, else do nothing.

Thanks

blueznl
Beiträge: 109
Registriert: 29.11.2014, 18:09
Danksagung erhalten: 1 Mal

Re: HmIP Alarm Siren

Beitrag von blueznl » 22.01.2019, 16:57

System variable: create one using Settings / System variable / New

Once created you can use it to share values between different functions, or display its value on-screen.

If you want to manipulate a variable value you have to use a script, I think.

Scripts are somewhat hidden, and it took me ages to figure out.

In the web editor, create something like:
Condition: If...
Time Control Recurring from 16:30 o'clock starting at 21.01.2019 Trigger at point of time
Activity: Then... Stop all current delays before performing the activity (e.g. retriggering).
Script ... Immediately
As 'activity' you select the option 'script'. Then you click on the 3 dots behind 'Script' and a script editor opens up. That's where you enter your script.

Now for script documentation go to the EQ3 website. I'm not sure there is english documentation. If so they need to improve their internal search engine, because if I go to Service / Downloads and use as a search term the word 'script' it only lists the german document. Fine if you speak German :?

https://www.eq-3.com/service/downloads.html?id=29

Local variables are easy. In the script you can do something like:
integer i ;
i = i+1 ;
WriteLine(i);
I think accessing system variables is overly complex... In fact, the whole scripting thing may have some space for improvement, IMHO etc., then again, I've been using PureBasic for the last 10+ years or so, so I guess I am spoiled, and on top of that I'm not too much into object oriented languages... anyway.

When you access a script using the 'three dots' in the activity section, the CCU offers you an error check button, but you cannot 'execute' the script, unless your program executes.

If you want to execute your script outside a program you can use the 'Test script' button at the bottom. Unfortunately (and I have no clue why) there is no indication of any syntax problems when you run something in there. All the system does when something is wrong is, well, nothing. No clue what is wrong or where it is wrong.

I created a system variable called 'test' and tried to access it with the following code:
! local variables
!
integer i ;
i = i+1 ;
WriteLine(i);
!
! access a system variable
!
var x = dom.GetObject("test").Value();
WriteLine(x);
!
! set a system variable
!
x = x+1;
WriteLine(x);
dom.GetObject("test").State(x);
WriteLine("done");
!
Which seems to work... But honestly? I'd rather use something like:
Global x.i
Local i.i
... but no such luck :?

Oh. And please note EvErYtHiNg is case SENSITIVE. I try to stay away from scripts as much as possible, too hard to debug.

blueznl
Beiträge: 109
Registriert: 29.11.2014, 18:09
Danksagung erhalten: 1 Mal

Re: HmIP Alarm Siren

Beitrag von blueznl » 22.01.2019, 17:27

Now why would you want a system variable as a timer? Please explain. Maybe there is an easier way.

tomi_cc16
Beiträge: 1150
Registriert: 30.11.2013, 16:35
Wohnort: Mordor
Hat sich bedankt: 23 Mal
Danksagung erhalten: 56 Mal

Re: HmIP Alarm Siren

Beitrag von tomi_cc16 » 22.01.2019, 18:06

blueznl hat geschrieben:
22.01.2019, 16:57
Now for script documentation go to the EQ3 website. I'm not sure there is english documentation. If so they need to improve their internal search engine, because if I go to Service / Downloads and use as a search term the word 'script' it only lists the german document. Fine if you speak German :?

https://www.eq-3.com/service/downloads.html?id=29
I already translated most of it into English:
viewtopic.php?f=49&t=45485

If a document is missing yet let me know - nobody pushed me or wanted more so Im slow on it.

Helium
Beiträge: 14
Registriert: 17.01.2019, 22:18
Hat sich bedankt: 1 Mal

Re: HmIP Alarm Siren

Beitrag von Helium » 22.01.2019, 22:44

Hello,

Can someone post a screenshot of the best way to implement a timer ?

Use Case: Check every 30 minutes, whether the window is open. If yes, trigger an alarm, else do nothing.

Antworten

Zurück zu „HomeMatic - english“