Active and inactive the program by script

Support for our english speaking visitors

Moderator: Co-Administratoren

Antworten
lesnijan
Beiträge: 23
Registriert: 02.04.2014, 14:14

Active and inactive the program by script

Beitrag von lesnijan » 02.04.2014, 14:36

Hello,
does anyone know, how to do by script an active or inactive the progra craeted on CCU?
I mean: Home page > Programs and connections > Programs

On the layout ofcourse we have the checkbox : active,operable,visable.
Nevertheless, I have to perform this at the level of the script

Thank you in advance for your reply.

Janusz L.

hobbyquaker
Beiträge: 3978
Registriert: 12.07.2009, 20:01
Hat sich bedankt: 17 Mal
Danksagung erhalten: 176 Mal
Kontaktdaten:

Re: Active and inactive the program by script

Beitrag von hobbyquaker » 02.04.2014, 15:31

this can be done via the Active() method (see http://www.wikimatic.de/wiki/Active and http://www.wikimatic.de/wiki/Kategorie:Methoden)

example to activate a program:

Code: Alles auswählen

object o = dom.GetObject("program-name");
o.Active(true);
Regards

Benutzeravatar
Roland M.
Beiträge: 9804
Registriert: 08.12.2012, 15:53
System: CCU
Wohnort: Graz, Österreich
Hat sich bedankt: 252 Mal
Danksagung erhalten: 1381 Mal

Re: Active and inactive the program by script

Beitrag von Roland M. » 02.04.2014, 15:33

Hello janusz,
lesnijan hat geschrieben:On the layout ofcourse we have the checkbox : active,operable,visable.
Nevertheless, I have to perform this at the level of the script

I'd solve this with a (boolean) system variable and add this to the programs condition, like

IF Switch is pressed
AND execute_program is true
THEN Light on

where execute_program is the system variable with values true and false.



Roland
Zur leichteren Hilfestellung bitte unbedingt beachten:
  • Bezeichnung (HM-... bzw. HmIP-...) der betroffenen Geräte angeben (nicht Artikelnummer)
  • Kurzbeschreibung des Soll-Zustandes (Was soll erreicht werden?)
  • Kurzbeschreibung des Ist-Zustandes (Was funktioniert nicht?)
  • Fehlermeldungen genau abschreiben, besser noch...
  • Screenshots von Programmen, Geräteeinstellungen und Fehlermeldungen (direkt als jpg/png) einstellen!

-----------------------------------------------------------------------
1. CCU2 mit ~100 Geräten (in Umstellung auf RaspberryMatic-OVA auf Proxmox-Server)
2. CCU2 per VPN mit ~50 Geräten (geplant: RaspberryMatic auf Charly)
3. CCU2 per VPN mit ~40 Geräten (geplant: RaspberryMatic auf CCU3)
CCU1, Test-CCU2, Raspi 1 mit kleinem Funkmodul, RaspberryMatic als VM unter Proxmox, Access Point,...

lesnijan
Beiträge: 23
Registriert: 02.04.2014, 14:14

Re: Active and inactive the program by script

Beitrag von lesnijan » 02.04.2014, 16:06

Thank you.active function work
But, how can I get "inactive" it is not function like this.

BR
Janusz L.
hobbyquaker hat geschrieben:this can be done via the Active() method (see http://www.wikimatic.de/wiki/Active and http://www.wikimatic.de/wiki/Kategorie:Methoden)

example to activate a program:

Code: Alles auswählen

object o = dom.GetObject("program-name");
o.Active(true);
Regards

hobbyquaker
Beiträge: 3978
Registriert: 12.07.2009, 20:01
Hat sich bedankt: 17 Mal
Danksagung erhalten: 176 Mal
Kontaktdaten:

Re: Active and inactive the program by script

Beitrag von hobbyquaker » 02.04.2014, 16:09

lesnijan hat geschrieben:But, how can I get "inactive" it is not function like this.

Code: Alles auswählen

object o = dom.GetObject("program-name");
o.Active(false);

lesnijan
Beiträge: 23
Registriert: 02.04.2014, 14:14

Re: Active and inactive the program by script

Beitrag von lesnijan » 02.04.2014, 16:23

I thought so :?
Thank you for the hint

BR
Janusz L.

hobbyquaker hat geschrieben:
lesnijan hat geschrieben:But, how can I get "inactive" it is not function like this.

Code: Alles auswählen

object o = dom.GetObject("program-name");
o.Active(false);

Antworten

Zurück zu „HomeMatic - english“