Homematic IP garage door operator integration in IP-Symcon

Hi,

I’m trying to integrate a Homematic IP garage door operator in IP-Symcon. I’ve added and configured the Homematic Configurator with succces. The Homematic IP garage door operator has been added in IP-symcon. However, I don’t see any commands to operate the garage door operator, I only see variables. The following commands are available in Homematic IP:


In IP-Symcon I can only find commands for switching on/off the light.

Hello DennisM,
you have to create some boolean variables and bind an action script on it.
For example:
Variable:
NOP - Command 0
Stopp - Command 2
Close - Command 3
Open - Command 1
Ventilation - Command 4
(values from the documentation from eQ-3)

Action Scripts:

SetValue($_IPS[‚VARIABLE‘], $_IPS[‚VALUE‘]);
HM_WriteValueInteger(#####,„DOOR_COMMAND“,CommandNumber);
SetValue($_IPS[‚VARIABLE‘], false);

'##### ID from Channel 1

After that you can switch the garage door, switching the variables.

Hope this helps.
Greetings
Jörg

Thanks. I couldn’t find the documentation. Do you know the difference between „NOP - Command 0“ and „Close - Command 3“?
The action script I use (with help from @ubittner)

<?php

//Documentation: https://www.symcon.de/en/service/documentation/concepts/scripts/action-scripts/
SetValue($_IPS['VARIABLE'], $_IPS['VALUE']);

$id = 12345;  // This is the instance id of channel :1 of the homematic device 

switch ($_IPS['VALUE']) {

    case 0: # NOP

        $action = 0;

        break;
    
    
    case 1: # Open

        $action = 1;

        break;


    case 2: # Stop

        $action = 2;

        break;


    case 3: # Close

        $action = 3;

        break;
    

    case 4: # Ventilation

        $action = 4;

        break;

    }

HM_WriteValueInteger($id,"DOOR_COMMAND", $action);
?>

Cheers,
Dennis.

Hello Dennis,
documentation you can get here page 5018.
I don’t know NOP is for.

1 „Gefällt mir“

Hi,

I want to add a physical button (EnOcean PTM200) to open and close the garage door on change of the boolean variable.
boolean false = command open
boolean true = command close
I’m having a hard time creating an action script that triggers these simple commands. I hope someone can help me out. I tried the following action script, which obviously doesn’t work:

<?php

//Documentation: https://www.symcon.de/en/service/documentation/concepts/scripts/action-scripts/
SetValue($_IPS['VARIABLE'], $_IPS['VALUE']);

$id = 12345;  // This is the instance id of channel :1 of the homematic device 

switch ($_IPS['VALUE']) {
  
    case ($_IPS['VALUE'] == false): # Open
        $action = 1;
        break;

    case ($_IPS['VALUE'] == true): # Close
        $action = 3;
        break;
    
    }

HM_WriteValueInteger($id, "DOOR_COMMAND", $action);
?>

Cheers,
Dennis.

Hi Dennis,

do you still need help?

So does the state of your EnOcean PTM200 changes in IP-Symcon by pressing the button?

If so, add an event that triggers the change of the variable value and the execute in this event a script code like this:

<?php

$id = 12345;  // This is the instance id of channel :1 of the homematic device 

if ($_IPS['VALUE']) {
     $action = 1; # Open
} else {
     $action = 3; # Close
}

HM_WriteValueInteger($id, "DOOR_COMMAND", $action);

Should look like this:

Sorry screenshot is in German!

Uli

Thanks @ubittner!

Your code works. Could you explain why the script triggered by an event works, but the action script doesn’t? I’m probably missing something really fundamental. :wink:

(I swapped the open/close actions. I believe in Germany switches are positioned the other way round than in The Netherlands. In The Netherlands normally the „Top/Upside“ = I / ON / Up, "Bottom/Downside "= 0 / OFF / Down :grinning:)

Cheers,
Dennis.

Hi Dennis,

that’s the way I will do it.

In your posted script:

  1. Maybe this throws an error , because your variable is a read only.
  2. For a boolean trigger I would recommend to use if statement and not the switch statement. Normally you use the switch statement for >= 3 conditions.

Fine, that this fits your needs right now :blush:

Uli

1 „Gefällt mir“