I managed to figure this out. (To someone who knows more about electronics and programming, it would probably have taken a few seconds.)
I can only open / close and stop my curtains, but that is all I wished for. The Stop command is sometimes a bit slow, depending on how busy the hub is, but my goal was to be able to open and close curtains via webCoRE.
The “secret” lies in this information from the Somfy documentation:
In other words, Connecting the “Close” wire (Pin 6) to the Common Ground (Pin 3), starts the Somfy motor in the closing direction. The same with “Open” (Pin 1). Connecting the “Stop” button to ground, stops the motor. There is however an alternative way in which the motor can be stopped, and that is to connect both the Open and Close wires simultaneously to Ground.
The only dry contact relay I’m aware of, is the FGS-222 from Fibaro. (I’m not sure if the RGBW controller has dry contacts, but if it does, that could also possibly be used. It appears that people are using the Fibaro Roller Shutter to control the Glydea 35, but since it does not have dry contacts as far as I know, I was unable to figure out how after many hours of searching the web.). Since the FGS-222 only has two contacts, we must use the alternative option described above to stop the motor mid-way, i.e. close both switches/contacts at the same time.
Using the FGS-222 with ############ device handler works perfectly for what we wish to accomplish. [Edit: Try this DTH instead: [RELEASE] Fibaro FGS-222 Double Relay Device Handler (Also Philio PAN 02/04) ]
So, I got a RJ12 cable made by our IT guys (I have not mastered the art of crimping connectors) using the pinouts in the image above and wired the relay as follows:
The rest was easy. I included the FGS222 to the hub, using @anon36505037’s DTH. (For some reason, the two child devices were not created – perhaps it is because I already have another FGS222 on my system, but it is not important – don’t think I’ll ever use the child devices.)
In the Device Settings, I set the contacts to auto close after a few milli-seconds (i.e. Parameter 3 to 0; Parameter 4 to 5 and Parameter 5 to 5) to emulate the push of a button on the remote control.
So, now, when pressing “Switch 1”, contact Q1 of the relay is closed momentarily, which sets the motor in motion and the curtains open. Same procedure to close them, using the Switch 2 button. No here comes the nice part: Pressing the main “ON/OFF” button (which controls both switches at the same time), stops the curtains mid-way during opening/closing. Otherwise, they simply open/close all the way to the positions to which the Glydea motor was programmed
Since I was on the roll, I got brave and tried to customise @anon36505037’s DTH to change the appearance of the Device in the ST app. I have no programming background, but by reading a few posts, I managed to come up with the Device looking like this in the Smart Things App:
I would have liked to change the main “On/Off” to “STOP”, but I have not been able to figure out how to do that. (I’ll appreciate any assistance in that regard.)
All one must do to control the curtains in webCoRE, is to trigger “Switch 1” of the Device to Open the Curtains and trigger “Switch 2” to Close them: