I’ve been playing with VelBus for about four days now and started programming for it right away.
After reading along the threads on this forum I noticed that a lot of people are complaining about the lack of
a server mode in the newest versions of VelBusLink and the costs of HomeCenter (which does implement a socket server).
That’s why I developed a little commandline tool that acts as a server.
Most likely others did the same thing before me, but I couldn’t find an implementation anywhere.
The purpose of this tool would probably be to enable controlling and configuring VelBus from remote and multiple locations.
This can be done by running the program on the pc connected to the serial interface and connect to it from VelBusLink 8.0 on the same or another computer.
The tool uses the .NET Framework 4.0 and is written in C#.
It exists of a modified version of the VelBus .NET Library (libvelbus-server.dll; basicly the class ‘Server’ is added) and a command line interface wrapped around it.
Example usage: “velbus-server.exe COM1 8445”
where COM1 could be any serial port and 8445 is the port you wish to listen on.
Running it without any parameters shows the same help and a list of serial ports that were found by the system.
You can download the tool (which includes the library) and the source code. You can do with it as you please. : )
I’ve been playing with VelBus for about four days now and started programming for it right away.
After reading along the threads on this forum I noticed that a lot of people are complaining about the lack of
a server mode in the newest versions of VelBusLink and the costs of HomeCenter (which does implement a socket server).
That’s why I developed a little commandline tool that acts as a server.
Most likely others did the same thing before me, but I couldn’t find an implementation anywhere.
The purpose of this tool would probably be to enable controlling and configuring VelBus from remote and multiple locations.
This can be done by running the program on the pc connected to the serial interface and connect to it from VelBusLink 8.0 on the same or another computer.
The tool uses the .NET Framework 4.0 and is written in C#.
It exists of a modified version of the VelBus .NET Library (libvelbus-server.dll; basicly the class ‘Server’ is added) and a command line interface wrapped around it.
Example usage: “velbus-server.exe COM1 8445”
where COM1 could be any serial port and 8445 is the port you wish to listen on.
Running it without any parameters shows the same help and a list of serial ports that were found by the system.
You can download the tool (which includes the library) and the source code. You can do with it as you please. : )
I just tested is and it seams to work I’ll keep you informed about issues. And let you know if all works just good also
Thanks a lot![/quote]
I’m glad you like it. If you find anything that’s not working quite as it’s supposed to or if you have some feature requests let me know.
Your Flex tool looks interesting to me as I see a lot of potential in web interfaces for Velbus. Certainly when it prevents running loads of software on all clients and especially when it’s flex. : )
Anyway, let me know if I can help you with the socket server part of your project. I’m definitely taking a look at your project.
Your socket server is running for about a month now and it never crashed till now and I never had an issue with it.
So it looks pretty stable and has no memory leaks.
i downloaded
:
1-now playing plugin
2-velbus-server.exe
3-VelbusSocket.exe
couldnt make it work, can you give me a step by step tutorial pls!
Launched :
velbus-server.exe
VelbusSocket.exe
named a play list “wolf”
having this message:
trying to connect to 127.0.0.1:3788
playlists found: 2
currentPlayList:[Playlist wolf]
Unable to connect: socket error.
lcd: wolf
lcd: Not playing
Try the following steps and let me know if it made a difference.
On Windows, open the start menu and click on “Run…”.
Next type ‘cmd’ without the quotes and enter. A black command prompt will popup.
Find out what the path is to ‘velbus-server.exe’ (e.g. ‘C:\directory\anotherone\velbus-server.exe’).
Type the following with the path substituted with your own:
‘cd C:\directory\anotherone’ (again without quotes) and hit enter.
Next type ‘velbus-server.exe’. A list of port names should show up.
Choose the right port and type:
‘velbus-server.exe portname portnumber’
e.g.: ‘velbus-server.exe COM1 3788’
Run ‘VelbusSocket.exe’ as you normally would.
This is the right way of launching it. If this works, you can put the complete command in a batch file. Create a text file and save it as ‘socket server.bat’ on your desktop. To do this, you would put the following line, adapted with your values, in the file:
‘C:\directory\anotherone\velbus-server.exe COM1 3788’
Save it. Now you can doubleclick the file to launch the program.
This might be to simplistic for you, but a step-by-step guide might be usefull for anyone. : )
I can’t reach the server where the image’s on. I’m not to familiar with VelbusSocket, but I believe that you can’t interact with the modules listed in the interface. To interact with channels of certain modules you have to add the necessary data in the ‘data.xml’ file in the same directory. This will make the commands for each channel show up in the uppermost list in VelbusSocket.exe. You can then activate or deactivate each channel by clicking the right command. You can visit code.google.com/p/flexvelbussocket/ for more info on the ‘data.xml’ file.
Or did you adapt the xml-file already? If you can’t figure it out, you can ask here again and I’ll try and explain that bit too.
EDIT:
Now I see the picture. As I figured, you didn’t adapt the xml-file. Visit the website, visit this thread, give it a try and if it didn’t work we’ll try to clarify things for you.
You might have noticed that GertST is the actual creator of the Flex Velbus Socket tool, not me. But you can check here for the source of the program. Maybe you can recompile it with an adapted lay-out or something.
About controlling the vmb1dm. You can only send preset commands. So the only thing you can do is use VelbusLink to give the dimmer certain commands (e.g. on, off, 50%, …), capture the data of the commands in the log window and put it as commands in the xml file. There is a command the example XML that dims lights slowly, you could check it out.
I suggest you examine the example xml-file and the homepage for more info on implementing the song status and other things in the program.
velbus-server.exe says that the connection had been closed from the other side and keeps on working besides that. It’s the flex tool that closes the connection, probably because of an error. I will investigate the packet you send, can you tell me how you obtained it? (Tout éteindre: 0FF80004002000000D504)
EDIT:
I can’t seem to reproduce your error. Maybe you should check whether your button is correctly configured to activate all lights or something?
Yes, that’s what I meant, so putting all the lights on equals one command, which equals one packet, right? I don’t see how you could get packet collision that way, but maybe I’m not seeing something…
When you keep VelbusLink open while sending the command and thus freezing VelbusSocket.exe, do you see the exact same packet in the log?
normally a ‘All On’ or ‘All Off’ pushbutton will send to each module the command to switch off the relays and dimmers. So when you have i.e 5 relaymodules and 5 dimmodules you have to address each module with his address and command. i think you can’t do it with one packet.