Homegear and scripts with params


I’m running OH2, homematic binding and homegear. In homegear I created a PHP script to create different heating programs. This script accepts one parameter to change the heating program (like default, holidays, athome).
triggering the script from OH2 works so far. I have defined the ITEM as Switch. But that means I can’t add an additional parameter like “holidays”. Changing the type of the item to string throws a java error once I trigger a change:

[ERROR] [ematic.handler.HomematicThingHandler] - org.eclipse.smarthome.core.library.types.StringType cannot be cast to org.eclipse.smarthome.core.library.types.OnOffType

Any idea whether this is possible at all?


What is your Item definition?

Typically this sort of behavior where you want to change the behavior based on time or type of day and such is done in a rule. Search for " Design Pattern Time of Day" for one approach.

I’m also searching a solution to send parameters to a homegear script.

One way is to set a variable with MQTT and have a homegear script which reacts to a variable change.