Flex Velbus connection demo tool

Instead of running from an html page you can now also run the tool from an exe: this makes it possible to cntrol other tools on your pc from a velbus button module.
I added a proof of concept which opens notepad: looks promissing:

In a future version I will make it possible to play web radio stations and audio files, including playlist (through WMA), to inc/decrease the pc volume, and - using IRTrans - send IR commands to your AV-gear - all using velbus! How nice would that be? :wink:

The latest release r15 (running from the exe) should also solve the issue concerning security. Can anybody confirm this?

Hi Gert,

I just installed r15. It starts to look really nice, the executable runs fine. I have no problems concerning security.

However I donā€™t see (yet?) the link with notepad as test?
Also I notice that the button from my 4PB which is programmed to control my dimmer that the progrmmed button is recognized, but when I push it it doesnā€™t react as when I push the button fysically on the 4PB itself.
When I continue pushing on the 4PB itself, it dims up or down and when I stop pushing it stays at the level from that moment.
However when I push in the software tool, when pushing the dimming up or down is OK but when I stop pushing it goes toe the last level, which can be higher or lower but not the one from the moment when I stop pushing.
I hope you understand what I mean?

Great job however!

Grtz,
Bart

Bart,
Thanks for your response.

  1. the test with notepad is hardcoded with one of my buttons, so itā€™s not yet possible to change what command triggers what exe. Working on that right now ā€¦
  2. the button behaviour indeed is not yet like it should. Not a high priority right now, but I will have a look on that later on. Does a short press works as intended? It seems to work with my dimmers .

G

Gert,

With which device(s) you are working? Remote control, portable with touch screen, just PC? What will be your setup?

A short press works fine, and will set the dimmer on the latest level kept in memory

Bart

My setup:
Velbus modules: 2 4PDā€™s, 4 dimmers, 4 relays, 1 8PB.
One pc is always on and runs the Velbuslink and my VelbusSocket tool.

The main target of my tool will be to extend the capabilities of velbus:
[ul]- Advanced macroā€™s (like: dim to 75% over 30 seconds, only if the system time is after sunset)

  • Launch exeā€™s: eg. to control Windows Media Player, set itā€™s volume (can all be done using comand line params and some freeware tools like NirCmd
  • send IR commands: using IRTrans (very nice hardware!) I will be able to send IR commands to my AV equipment.
  • using IRtrans itā€™s possible to use any remote to trigger pc stuff, so this will also be build in in my tool to trigger velbus commnds from a remote.
  • nice & user-frienly PC interface to setup all this.
    [/ul]

What are you up to?

I am currently playing with my 4PD connected to 1 dimmer, and then playing and trying on the PC.
However, I have all modules ready to install for my full house being 5 relays of 5 connections and 12 dimmers.

I want to control everything via my universal remote control Pronto from Philips via IR over RF (so from everywhere in the house without direct IR visibility - I am using it now already towards my AV and MCE boxes).
I want to be able to see the status of all lights in the house via my MCE on my TV and I will be integrating my TabletPC portable somewhere in the wall of my house where I can see also the status and control of the lights Ć nd the screens from my IP camsā€¦

As you can see still a lot of work but I am quite far already in testing so the installation can start.

I am testing also the quiiq software mentioned elsewhere on the forum which supports also Velbus now, this one seems also niceā€¦

Bart

I uploaded a new version at google code (see top of this thread).

whatā€™s new:

change the xml to add events to switches:
when a switch is pressed:

  • run an exe (I use it to send IR commands to my receiver, to open a media player playlist, to open a radio stream, ā€¦)
  • change the lcd line of a vdm4pd: will be used for the menu of my playlist system: Iā€™m working on a ā€˜pluginā€™ to use the vmd4pd as a menu to select and play playlists, show whatā€™s currently playing, ā€¦

xml extract:

[code]











	</trigger>

[/code]

There are no updates in the GUI.

I added new features: See forum.velleman.be/viewtopic.php?f=13&t=1921

[quote=ā€œGertStā€]I will first try to make a nice status screen, show the status of all relays and dimmers.

Later on a touchscreen interface with several tabs and larger buttons is also on my to-do-list. But it is not a priority for me, so no promises on that.

Hello GertSt, i am looking for software to use an 15" touchscreen. I want to activate all my vellbus moduleā€™s. but programming is nothing for me, but technical and graphical i am good. I want to see a screen with different buttonā€™s ( in green are they off , in red are they on for example ) and so oneā€¦ :bulb:
I hard to tell you what i want in english :blush: , so if you contact me i explain to you where i realy looking for in dutch.
Mail to charley.caelen@scarlet.be
Thanx :smiley:[/quote]

Hi Charley,

I donā€™t have the time to customise a lot right now, but if you are able to post a screenshot of what you want may be I can have a look at it and try to help you out.

You can leave me a mail at but please also post on this forum if it helps the community.

Gert

Hey Gert,

Iā€™ m the author of the tutorial velbuslink and vb6. I know you also connect to the velbuslink server trough tcp/ip. On most computers I have no problem with my software, however on some systems I can connect, but no data is sended or received. I think itā€™s somehow blocked (firewallā€¦) but checked this. Do you have this problems also?

Iā€™m working local, so the client and server is on the same computer. Itā€™s no problem with bad format of the data, because itā€™s working and tested on most computers.

Wim

Hello,
Iā€™ve used your code vb code to debug my velbus/linux server and what Iā€™ve noticed is that the data is always been sended and received but the problem with the soft is that it canā€™t handle a bigger bulk of data. When data comes in fast it isnā€™t always a nice frame with a start and end but it can be more frame in one receive so you have to cut the frame out of the buffer. This you can do easy with first checking for the start frame, then check the numbers of bytes to receive, count them by 5 and youā€™ll have the start of the next frame.
Iā€™ve builded this mechanism in the server to let ā€œeasierā€ software work all the time. I think it has something to do on how the data is routed over the network (/internet). The pachages will always come in the right order, but itā€™s not shure if they are pasted behind each other.
Have a look at the code of the server, at line 177 youā€™ll see what I mean. leachy.dnsd.be/velbus/

That is correct. I recently disovered this problem and corrected this, but didnā€™t updated the files on the web.

I still wondering what the problem is about not receiving data using sockets on some pcā€™s. Itā€™s not a big problem, but, still I want to now.

I see some people do a great job on writing software. Iā€™m starting to think it might be a good idea to put everything together. I mean, if we have a small application like a tcpip/serial gateway starting up with the computer with some nice features, like logging data, interface with mail, other RS232 port (arduino) , winlirq, webcam etcā€¦ The goal should be that other people can benefit from this tool and donā€™t need to worry about bit and bytes and protocols. I donā€™t know just thinking about it. A simple tool with good documentation and maybe some clients in flash or linux, it might boost up the production of velbus software :slight_smile: Whatā€™s yours opinion?

Wim

100% true, but the main problems are:
1: stability
2: power use
3: compatibility
4: complexity

For point 1 to 3 I would say use linux, but I think that the most worries about point 4 when it comes on linux. Iā€™m not at all a linux gourou and like working with windows but when it comes on certainly the first 2 points, I choose for linux. Like I said before, Iā€™m using a 5 watts (at maximum) minipc wich can do it al for me (including a running webserver, ftp, mail, network drives, firewall etcetc), can be installed with a very simple install cd and managed by a webinterface (all this is called sme server contribs.org and is free).
Iā€™m running also a 1 wire interface on it wich like it says runs over 1 wire (plus a ground so that makes 2 of them) and interfaces to temperature sensors, i/o interfaces, a/d interfaces etcetc (for the wiring it simply uses a telephone cable even over long distances and splits everywhere).

So u see, there are lots of possibilities. I think itā€™s better to have a focus on clients wich are better to run under windows in combination with touchscreens etc. Maybe itā€™s better to look first a bit aroun and see whatā€™s already existing and not inventing the wheel again.

Do you have somekind of blog or website with info on your system? I might be interesting to have a look.

Inventing the weelā€¦in my search for nice features I always come down on writing it myself. There is a lot of cool stuff like your mini or slim pcā€™s, even ā€œlowā€ power asus eee, multitouch with ftir principle, winlirqā€¦ Itā€™s about combining and integration and sometimes you end up with a not so low power system or a combination of different software tools. One of the things I would like is visualization of the house, maybe in 3D, but in vb6 itā€™s to much coding. I tried with google sketchup and vb6 but not very succesful.

I see you have elektronic skills. Did you experiment with ucā€™s and can interface, writing velbusprotocol and designing own hardware modules? I think it should be perfectly possible to use the serial interface and attach a microcontroller for extra hardware features like lichtsensing, rfid reader, ir remoteā€¦ One must have extra time :slight_smile: I like the possibilities with the velbus system. Like I said before, I hope more people will write software and share.

I have some experience in linux, but I stay with vb6 and windows. For now I donā€™t have a system thatā€™s always on. Iā€™m trying to write some tools for velbus and release it on this forum when I have something

Wim

You mean connecting a ĀµP to the serial interface, maybe youā€™ll find the articles interresting wich you can find in the following directory: velleman.eu/downloads/0/velbus/general/. They are from an italian magazine and do this kind of connection.
If Iā€™ve a bit time, Iā€™ll make an image of my setup.

I really like the Linux way of controlling the Velbus system. If anyone has enough experience we could exchange lots of thoughts. I would like to use my QNAP NAS server (TS-239 Pro) running as a command & control server for the Velbus domotic installation @ home. Iā€™m using the VMB1USB to connect my laptop to Velbus and currently stay with the VELBUSLINK software till a Linux way of controlling is commonly shared.
If I could find a Linux ā€˜driverā€™ allowing me to successfully connect my Velbus installation through my VMB1USB module to one of the 3 USB ports on the QNAP NAS server I would be happy. Since the NAS server runs everything (webserver, file-, printserver, etc.) out-of-the-box, is power friendly and supports IPKG it is not necessary to run another mini server in the LAN.
And even remote connectivity over the internet is a possibility. With some port forwarding on the router or gateway it is possible to access the domotic website from everywhere anytime.
If I could have the source files from leachy.dnsd.be/velbus/ installed easily on the QNAP I could start creating a website showing a graphic overview of my Velbus components and share the results with others.
Please go on guysā€¦

Does anyone has already developed a module with a Velbus interface that allows to measure the daylight intensity and that can send any command signal over the bus? I want to improve the operation of the blinds at home. Currently I control 3 blinds with the timer inside the VMB4PD panel but this does not work well. Since daylight is changing very often it needs to be adjusted very often and such a light intensity sensor could be the ā€˜solutionā€™ for it.

An exclusive velbus driver doesnā€™t exists for linux and isnā€™t usefull to be written. When you connect the interface itā€™s been recognized as an serial port. From there you can do everything youā€™ll like.
My way is to share all data over network so for configuration I still could use velbuslink (next version of velbuslink supports connecting over ethernet). For now everyting just works fine with my soft except when scanning for modules. The data goes a bit to fast to let the program redirect it (when requesting the module status with velbuslink, all goes in one burst of data so the program is to busy with putting it on the network instead of checking the serial bus for incoming data, problably fixable with an extra tread doing both separate things).
You could test your vmbusb out on your linux machine by just plugging it in and have a look at your dmesg to see as what itā€™s been recognized (ttyAcm0 or ttyusbser, ā€¦). I donā€™t know if your machine has the developmnttools installed otherwise you could give the 2 codes a try (simply compile with gcc). As for now it runs stable for almost a week with 2 reads andwrites every 30 seconds (for my temperature monitring test)

I fixed this in software (linux). Every hour or so, I calculate the sunrise and sunset times (and add a configurable offset) and use this for controlling my blinds. Works pretty wellā€¦ It even keeps track of daylight saving timeā€¦

do you want to share your updated code. the sunset sunrise option looks promising :wink: