cedricboon / openhab-addons

Add-ons for openHAB 2.x
Eclipse Public License 2.0
6 stars 5 forks source link

Velbus Virtual I/O module for OpenHab #26

Open bouwkarolinemaarten opened 4 years ago

bouwkarolinemaarten commented 4 years ago

Dear Cedric, I'm using your great development for a few months now, and enjoying the stable environment. Also special thanks again to include support for the 1TS module.

If you are up for additional challenges, I still have something on my wishlist that would tackle all future/add hoc requests. Not sure if even possible or potentially it’s already available in some kind of debug/logging mode, but i’m looking for: "I/O module - full passthrough of all packets send/received through the Velbus Serial Bridge"

I’m not so familiar with serial communication protocols and running multiple applications on a same serial port is challenging as well, so would like to keep your binding / Velbus Serial Bridge on the Serial Port /dev/ttyACM0 (/dev/ttyACM0) dedicated.

Goal/purpose is something like the Logging (Pakketmonitor) from VelbusLink, not for troubleshooting purpose, but to capture or send very specific events from my Velbus setup. A basic interpreter like address, protocol splitter might be helpful, but optional.

I was thinking about a basic string variable that you overwrite on every incoming event (+post in openHAB 2 Log Viewer and same to “send” a custom build string from a customer “rule”. (of course with a note: be careful what you send as we are now working directly on the bus communication) Of course if this will bring down stability of any component (too much events), happy to skip this request.

Reason for asking is that i'm interested in the low priority packets / press buttons, also from the (not yet) supported old modules ... VMB4PD and VMB1TC.

Use cases what I have in mind: Basic support for VMB4PD to capture CH1 -> CH8 PRESSED/LONG_PRESSED/RELEASED events

something similar as the inputchannel events: [vent.ChannelTriggeredEvent] - velbus:vmb8pbu:F0_BU_VB_VSB_SerialBridge:2B:input#CH1 triggered PRESSED [vent.ChannelTriggeredEvent] - velbus:vmb8pbu:F0_BU_VB_VSB_SerialBridge:2B:input#CH1 triggered LONG_PRESSED [vent.ChannelTriggeredEvent] - velbus:vmb8pbu:F0_BU_VB_VSB_SerialBridge:2B:input#CH1 triggered RELEASED

My VMB1TC module is currently controlling the VMB1TS modules. Next to the button events (ref above), it would be interesting if I can set some kind of holiday schedule through velbus. Like “overwrite” or “block/stop” the program during a period when the normal schedule is not valid (holidays).

Thanks a lot & Take care, Kind Regards, Maarten

StefCoene commented 4 years ago

Why don't you run verlserv: https://forum.velbus.eu/t/how-to-install-and-run-velserv-a-velbus-tcp-gateway/15422

This small daemon will open the USB or serial port and listen on a TCP connection for incoming connections. This allows you to use VelbusLink, OpenHAB and custom scripts to communicate with your Velbus setup at the same time!

If you want extra logging and/or send custom strings, take a look at my scripts: https://github.com/StefCoene/velserver I have my scripts, the OpenHAB binding and VelbusLink sharing the same USB device with velserver for years. Never had a problem.

Stef

MDAR commented 4 years ago

I do something similar to Stef, except I'm experimenting with NodeRed's TCP node to interact with VelServ. So I can send additional packets to Velbus.

I haven't quite worked out how to filter incoming packets from the TCP port, but I really haven't spent much time on it.

You could.. Use the TCP binding in openHAB2 if you just want to capture all the traffic from Velbus

bouwkarolinemaarten commented 4 years ago

Hi Both,

Thanks a lot for the idea's/workarounds. Happy to see it's already possibly, but unfortunately this is stretching my knowledge and during my quick tryout a few month ago, I experienced sync issues with my setup using velserv (I assume it was my fault). Anyway it's low on my prio list so will invest time to investigate if I have time. Meanwhile still hoping for an extra virtual module for dummies that I can use as "plug & play" in the rules etcs (similar as all other supported velbus modules)