This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Blind control on Wiser for KNX via Enocean
#1
Hello,
 
i want to use the Wiser Enocean functionality to control blinds with Enocean rockers.
The Enocean USB-Stick works fine on my Wiser and my Enocean push button switches are identified.
I can choose between several Enocean profiles whitch are perdefined on Wiser.
But i can only choose the profile itself, no further functionality, like what i want to control with the rocker
(switching light, dimming light, controling blinds …).
On other Enocean gateways it is possible to define subfunctions under the chosen profile.
 
So the problem is now, that i can not choose a functionality for blind control.
Therefore Wiser now gives me only one object for the rocker, not two as needed for a blind for the short
and the long push button press to make the blind move up/down (long press) or to stop/change lamella (short press).
 
The Enocean rocker sends a telegramm with „1“ when pressing and a telegramm with „0“ when releasing the button.
I guess what i now need is a script to differ between an short and a long press on the Enocean rocker
when receiving the 1 or the 0 on the same object.
 
Does anyone have a proposal for such a script or has anyone allready a blind control working on Wiser via Enocean?
 
Thanks and kind regards
Reply
#2
Hi
Did you try to use F6-01-03 Rocker Switch, 1 Rocker (separate)? It gives you 2 object which you could use or long press up and down seperately
BR
------------------------------
Ctrl+F5
Reply
#3
Hi Daniel,
thanks for our answer and your proposar.

Yes i tried the profile F6-01-03 Rocker Switch, 1 Rocker (separate) and yes, it gives me two objects.
Unfortunately these two objekts are not usable for short and long push button press.

What profile F6-01-03 gives you, are two separete push buttons on the rocker, each one working separate (thats why this profile is called "separate").
Pressing the rocker on the upper side brings you a "1" on the first object, releasing it bings you a "0" on the first object.
Pressing the rocker on the lower side brings you a "1" on the second object, releasing it bings you a "0" on the second object.
There is no differentiation between shot and long pressing.
Enocean-KNX-Gateways usually have subfunctions to choose below the chosen profile e.g. for blind control.
So the Gateway knows what you need (short and long press) and makes the analysis of the push-time itself and gives the right comand to the blind-objekts of the profile.
Wiser does not do this, it only gives you the "stupid" objects of your buttons without any further preparation.  

Therefore my only idea is a script which registrates the pushing time by measuring the time between the 1 when pressing and the 0 when releasing.
Is it under a certain limit (e.g. 1sec) the script brings a short command and is it bejond the limit the script brings the long command for blinds.
LUA and i ... well, we are not the best friends, so i do no have a clune about how to get such a script working.

Kind regards
Reply
#4
Hi
Something like that will do. Use separate profile and attach event script to one output and write to your blind object what necessary

Code:
short = 0.6 --in seconds
outGrp = '32/1/55'

value = event.getvalue()
if (value == true) then

tsec, tusec = os.microtime()  
 storage.set('pressTimeSec', tsec)
 storage.set('pressTimeMicro', tusec)
end


if (value == false and os.udifftime( storage.get('pressTimeSec'),storage.get('pressTimeMicro')) < short) then
  grp.write(outGrp,true)
 elseif (value ==false)  then
  grp.write(outGrp,false)
end
BR
------------------------------
Ctrl+F5
Reply
#5
Hi Daniel,

thanks again for your quick answer and the proposal.
It looks promising to me ... i will try it an will give feedback soon.

Kind regards
Reply
#6
Hi Daniel,

i tried your script and it works fine, thanks for this great help.
It gives me the determination between short and long press and the blinds can be controled now.

But there is a little difference in the behavior according to other KNX blind switches.

The script gives me the object for long press only after the release of the rocker (when the Enocean side brings a 0 on this rocker).
Controling the blinds with a KNX switch, the long command comes right after the time for differentiation between short and long press,
when you are still holding the rocker pressed down.
You can see the blind staring to move (after long command) and this tells you that you can release the rocker.
This a more understandable behavior, because you see the reaction of the blind and so you know you can release now.

Is it possible to modify the script in a way, that the long command will come right after the pass of the differentiation time,
not waiting for the 0 from Enocean, to get the behavior like KNX switches have for blind control?  

Thanks and kind regards
Reply
#7
Time to learn scripting ;Wink
this should do, just change short and the action for short and long press

Code:
short = 8  -- in 100ms

value = event.getvalue()
address=event.dst
log(address)
short = 8


if (value) then
     
    for i = 1, short, 1 do
 
        value = grp.getvalue(address)
     
       if (value == false) then
         grp.write('32/1/55', false) --short press action
     
         break
            end
    -- wait for 0.1 seconds
        os.sleep(0.1)
   
    end
 value = grp.getvalue(address)
 if (value) then
   grp.write('32/1/55', true) --long press action
   
    end
end
------------------------------
Ctrl+F5
Reply
#8
Hi Daniel,

and thanks again for your prepared script.
What should i say ... it works excellent and does exactly what it should do.
The Enocean rockers now have exactly the same behaviour like KNX rockers have ... great job :-)

I can only program simple functions in LUA, like those descriped in the manual.
What concerns learning more LUA-Scripting ... well i think this should not be necessary if Wiser would be equiped with the functions it should have.

There is an Enocean gateway function integrated ... fantastic ... you want to get a simple blind to work ... well, sorry its not possible without writing a specific script for it.
Is this the way it should work? I dont think so.
I cant use my time developing scripts for simple functions, which other devices have as a matter of course and the customers dont understand why they should pay for such a work.
I am a craftsman, programing KNX every day and the Wiser is sold to me as a device to create a visualisation on top of the KNX system.
It is sold in the market for craftsman, so it should come ready to be used in this sector with all functions needed and without the need for special knowhow.
But unfortunately in several cases with several projects on Wiser over the last years, i had to learn, that there are often not more than basic functions provided :-(

But thanks to this forum and especially to helpful people like you, there always seems to be a way to force this device to do its job :-)

Thanks again and kind regards.
Reply
#9
Hi Daniel,

as i posted in my other thread
https://forum.logicmachine.net/showthrea...9#pid12449
the Enocean stick works only a few days and then i have to restart wiser.
I have several system messages in the wiser concerning the scripts for differentiaiton of shot and long button press.
The messages can bee seen in the picture attached and says for example: "*string: 32/1/7".
32/1/7 is the bit-object which is send by the Enocean profile when pressing the button for blind down and is the trigger for the script.
The text in my scripts is almost like you wrote me:

short = 6  -- Differentiation time short/long press in 100ms 
value = event.getvalue()
address=event.dst
log(address)
short = 6
if (value) then
    for i = 1, short, 1 do
        value = grp.getvalue(address)
        if (value == false) then
      grp.write('1/0/230', false) -- short time adress
          break
            end
    --  waiting time 0.1 seconds
        os.sleep(0.1)
    end
  value = grp.getvalue(address)
  if (value) then
    grp.write('1/0/229', false) -- long time adress
    end
end

Can you tell me, what the system message would tell me and what could be the solution?

Kind regards

Attached Files Thumbnail(s)
   
Reply
#10
Hi
This is just log from this line log(address) and you can delete it as it is not needed.
BR
------------------------------
Ctrl+F5
Reply
#11
Oh ... OK ... i had no idea, it could be so easy ...  Wink

Thanks!
Reply


Forum Jump: