fruggy83 / openocean

27 stars 12 forks source link

How to setup a Virtual Rocker Switch? #18

Closed yoggiland closed 6 years ago

yoggiland commented 6 years ago

Hi Daniel,

I am on day 3 of learning OpenHab2 and I am trying to grasp the setup process of the "F6-02 - Virtual Rocker Switch" but I am not having any success.

List of EnOcean devices I have EnOcean Pi (connected to a Pi3) EnOcean STM 330 (Temperature Sensor) EnOcean PTM215 (Switch) EnOcean RCM250 (old unidirectional actuator)

I have gotten all the above EnOcean devices to work with your binding with the exception of the RCM250 actuator.

I am under the impression that need to use the Virtual Rocker Switch (as this is a really old actuator), but I am not so sure what things, item, rules and configuration files I need to create and configure (to place in "/etc/openhab2").

Could you please create a bullet list of requirements in order to setup a actuator with Virtual Rocker Switch and getting it working. Also could pleas provide some examples of what to put in the files.

Better still a short tutorial (I know this is a big ask but if you have time I would appreciate it!).

I am impressed with your work and I want to thank you for it!

Yoggi

fruggy83 commented 6 years ago

Hi Yoggi (@yoggi69),

sorry for my late answer, I missed your message, and thanks a lot for your words.

You are right in case of an old unidirectional actuator you need a virtual rocker switch. I also read the docs of this actuator, it just supports rocker switches or window contacts. As I do not allow to emit window contact messages, you have to use a virtual rocker.

If you are a beginner, it is the best to use the paperui of openhab. In this case you do not have to create any config files. I just wanted to check the process of creating and linking a virtual rocker switch on my installation. However I saw that they added a new feature to the unstable 2.4 version, profile selection during item linking. There seems to be a problem with my binding and this new feature as it is currently not possible to link a switch item to my virtual rockers. Let me check this on this weekend and I will give you the answer to your question afterwards.

Best regards Daniel

ps: Please use '@fruggy83' in you messages, in this way I should get informed by mail about your message

yoggiland commented 6 years ago

Hi @fruggy83

I am using openHAB 2.3.0-1 (Release Build) openhabian image.

I don't mind using the paper ui but I plan to get into the nitty-gritty of openHAB so I think I need to figure out how the config files works, so any pointers you could give me would be appreciated.

Looking forward to see if you made any progress after this weekend.

Yoggi

fruggy83 commented 6 years ago

Hi Yoggi (@yoggi69),

I could solve the problem with profile selection for (virtual) rocker switches. So make sure that you install the newest version of this binding. Next you find a config file for your things:

Bridge openocean:serialbridge:usb300 "OpenOcean Gateway" [ port="/dev/ttyUSB0" ] {
   Thing virtualRockerSwitch AABBCCDD "Virtual_Rocker" @ "Room A" [ senderIdOffset=XYZ, sendingEEPId="F6_02_01_Virtual", broadcastMessages=true, suppressRepeating=false ] {Channels: Type virtualRockerswitch:virtualRockerswitchA [duration=300, switchMode="rockerSwitch"]}   
}

You can choose any thingId (AABBCCDD) you want. SenderIdOffset must be set to valid value (for ex 1). This SenderIdOffset is later used to generate an EnoceanId which is teached into your RCM250. If you change this senderidoffset afterwards, your RCM250 will not react to messages any longer. Duration is the time (in ms) between a rocker switch press and release message. SwitchMode defines which message should be send on an on or off. RockerSwitch means that you an upper button message is send on on command and lower button on off command. You can also define toggleButtonDir1 or toggleButtonDir1. In these cases you always send an upper botton or lower button messages indepent of you command (hence toggle button).

This is the config file for your item

Switch RCM_Switch "RCM 250" {channel="openocean:virtualRockerSwitch:usb300:AABBCCDD:virtualRockerswitchA" [profile="openocean:rockerswitch-from-on-off"]}

Next step is to set your RCM into learning mode and switch your RCM_Switch item in openhab. Afterwards you should be able to control your RCM from within openhab. Hope this helps.

Best regards Daniel

yoggiland commented 6 years ago

Hi Daniel (@fruggy83),

I appreciate that you took the time and looked at it. Unfortunately I felt that I had to jump ship (I decided to go with IP-Symcon), to many devices that I wanted to integrate were either lacking bindings or not up to the job because of old bindings (devices that has change interface technology).

I hope that others will benefit from what you added (on my behalf) so that you don't feel that the time spent was a waste.

Ones again thanks! Joachim

fruggy83 commented 6 years ago

Hi @yoggi69,

wish you good luck with IP-Symcom, a really impressive solution. So I close this issue now.

Best regards Daniel