T22 not going through STOP via OpenHab

32 views
Skip to first unread message

Zoltan Orosz

unread,
May 27, 2019, 11:15:23 AM5/27/19
to souliss
Hello,

I'm using the 2.5 OH2 binding released by fazio with the latest official OpenHab 2 docker image. It works well, but there is an annoying problem with my roller shutters. Little background: roller shutters have 4 wires (ground, neutral and 2 live wires - 1 wire rolls the motor up, the other rolls it down) of which the 2 live wires are connected to relays managed by Souliss. Here's the code: https://github.com/Z0l/soulissconf/blob/master/ffbridge.ino

When the roller is going in one direction, if I don't press the stop button before pressing the other direction, the motor stops and I can no longer control it without rebooting the Arduino (both relays stop accepting commands); when reading the typical definitions they state that both T21 and T22 goes through the "STOP" command when changing direction and I'm not sure if that applies to the OpenHab binding as well? Or is that done on the Souliss level before processing the new command? To be honest I'm not sure if this is a problem with OpenHab or Souliss, but it's pretty annoying. If you need more info or the OpenHab configs, let me know and I'm happy to provide.

Zoltan Orosz

unread,
May 27, 2019, 11:40:32 AM5/27/19
to souliss
Apologies for the double-post, just wanted to say I confimed it's a Souliss problem because it happens with the Android application as well, not just with OpenHab. Pressing up or down without pressing stop first makes the relay unavailable until a reboot.

Am I supposed to manually check for the status of the typical before issuing the T2n_Coil_Open or Close commands? I haven't seen any examples for them, so if the problem is between the keyboard and the chair, let me know.

Thank you.

Fulvio Spelta

unread,
May 28, 2019, 1:36:09 AM5/28/19
to souliss
Hi,
I'm using T22 from a long while without problems both locally and through openhab2 with binding 1.8xxx

Pls note that the T22 has 2 set of commands: local and remote and need a timeout or a limit switch.

Have you provided a call to the timer function suach as:
 FAST_2110ms() {
 
Timer_Windows(CURTAIN_1_SLOT);
 
Timer_Windows(CURTAIN_2_SLOT);
 
}

Zoltan Orosz

unread,
May 28, 2019, 1:40:27 AM5/28/19
to sou...@googlegroups.com
Hello,

I haven't been using the timer because it never worked for me (it never shut off the relay even after waiting for a long time). Do you say the timer would fix the problem? When you press close while T22 is opening, yours doesn't freeze?

Thanks, kind regards,

Zoltan

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/_QfZJa6M6ag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/6f6d22eb-6fe0-4b04-a5b8-29eff101e8c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fulvio Spelta

unread,
May 29, 2019, 1:13:26 PM5/29/19
to souliss
It is mandatory to use the timer because it support both functions:
  • stop motor at timeout when a limit switch is not reached (or not used)
  • exit from the stop state that is automatically entered when a movement is running and an opposite command is issued
Give a look at the code and you'll find that T22 support 2 different open/close commands:
  • local commands (when used an opposite command will put the T22 in STOP state and you have to issue the command again to start in the opposite direction)
  • software commands (when used the STOP state is temporary and the motor statr again (in opposite direction) at the timout (the timer funzion is needed)
Both OpenHab binding and Souliss App send software commands.

From T22 source code:
Command recap, using:
-  0x01(hex) as command, Software CLOSE request (stop 4 cycles if opening)
-  0x02(hex) as command, Software OPEN request (stop 4 cycles if closing)
-  0x04(hex) as command, STOP request
-  0x08(hex) as command, CLOSE request (stop if opening)
-  0x10(hex) as command, OPEN request (stop if closing)

Here a minimized sample code:
#define CURTAIN_SHORT_TIMEOUT 0xAB

// Define the slot in setup
Souliss_SetT22(memory_map, CURTAIN_1_SLOT);

FAST_50ms() {
// Read the 2 buttons for local open/close
Souliss_DigIn(IN1, Souliss_T2n_OpenCmd_Local, memory_map, CURTAIN_1_SLOT);
Souliss_DigIn(IN2, Souliss_T2n_CloseCmd_Local, memory_map, CURTAIN_1_SLOT);

// Apply the logic - pay attention at the CURTAIN_SHORT_TIMEOUT parameter
Souliss_Logic_T22(memory_map, CURTAIN_1_SLOT, &data_changed, CURTAIN_SHORT_TIMEOUT);

// Drive the open/close relais
Souliss_DigOut(OUT1, Souliss_T2n_Coil_Open, memory_map, CURTAIN_1_SLOT);
Souliss_DigOut(OUT2, Souliss_T2n_Coil_Close, memory_map, CURTAIN_1_SLOT);

FAST_2110ms() {
Timer_Windows(CURTAIN_1_SLOT);
}


Zoltan Orosz

unread,
May 29, 2019, 4:38:22 PM5/29/19
to sou...@googlegroups.com
Thanks, I will add back the timer to the code and test. In your example, you set the timeout to 0xAB; just to make sure I understand correctly, since the default value of Souliss_T2n_Timer_Off is 0xA0, in your example the total close time is (0xAB-0xA0)*2110 ms, so ~25,3 seconds altogether, correct? 

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/_QfZJa6M6ag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Fulvio Spelta

unread,
May 30, 2019, 1:24:58 AM5/30/19
to souliss
You are right. My curtains take 15/20 seconds to fully open/close so the timeout is a little more to ensure the full movement. The motors are protected by their force sensing system so they stop at the end of movement and few seconds late power goes off.

Zoltan Orosz

unread,
May 30, 2019, 2:51:48 PM5/30/19
to sou...@googlegroups.com
Thanks, adding back the timer fixed it perfectly.

On Thu, May 30, 2019, 07:25 Fulvio Spelta <fulvio...@gmail.com> wrote:
You are right. My curtains take 15/20 seconds to fully open/close so the timeout is a little more to ensure the full movement. The motors are protected by their force sensing system so they stop at the end of movement and few seconds late power goes off.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/_QfZJa6M6ag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages