Velbus Domogik module

dmengplug -f velbus, that will help :slight_smile:

hello,
still no luck with your plugin.
dmgenplug velbus enables the plug in the config file but doesn’t show up in the admin panel.

For golfy: I did today an instal on a fitpc (since I got 2 of them). Works like a charme. You could always make a second partition on your fitpc and install ubuntu 10.10 on it, then you could always go back to windows if you’d like. The only thing that did give a problem was the xplhub, but you can simply download it from xpl4linux (compiled ready) and follow the installation notes. From there on no probs at all.
When working unther linux and when cereal adjusted his plugin for network usage, you could use my erver to connect the whole velbus network through a stable system :slight_smile:.

When you start domogik (with init.d script) do you see anything about the velbus plugin?

try starting it manual:
python /usr/share/domogik/xpl/bin/velbys.py -f
-f => foreground will display any errors
so if no errors just run it without the -f, and then the plugin should show up

Hello,

This week I have installed Domogik on a Debian VM running on a headless VirtualBox in my QNAP NAS server this.
I have registered myself as LeGiGi on the Domogik portal.

In the mean time I have setup my floorplan, added a few areas, rooms and devices but Domogik is not communicating with my Velbus interface VMB1USB.

I have modified the config file (within the plugin chapter I did add “velbus = enabled”)
I suppose the interface is using /dev/ttyACM0 but I’m not sure. Are you sure ttyACM0 is used or can you give me some command to test it.

I did read the Velbus_ProtocolSummary.pdf but I do not know how to configure the devices to communicate with the Velbus relays and switches in Domogik config.
Can you help me and send me some screenshots eventually.

Thank you,

Geert

ok,

to find out what device velbus is using:

1- unplug the usb device
2- wait a couple of seconds
3- do tail -f /var/log/messages
4- replug the device
5- in the logging (from point 3) you will see what new device is created, this is the needed device.

To start velbus plugin (if its not starting with domogik:
run /usr/share/domogik/xpl/bin/velbus.py

To configure a multi-channel relay in domogik:
1- translate the hex adress to decimal
2- get the channel you want to switch on/off (channel is 1 indexed)
3- adress = <part 1>-

example:
velbuslink shows adress 54 and you want to switch channel 3
adress will be 84-3

To see some debug output when you hit a switch on the webinterface:
tail -f /var/log/domogik/rest.log, it should tell you what its sending to the velbus plugin
tail -f /var/log/domogik/velbus.log will tell you what the velbus plugin is doing

hello,
today I’ve tried a bit further more:

first part:
The velbus.py script is at my installation at a complete different location as you’ve mentionned:

domogik@domotica:~$ locate velbus.py
/home/domogik/dmg/domogik/.hg/store/data/src/domogik/xpl/bin/velbus.py.i
/home/domogik/dmg/domogik/.hg/store/data/src/domogik/xpl/lib/velbus.py.i
/home/domogik/dmg/domogik/build/lib.linux-i586-2.6/domogik/xpl/bin/velbus.py
/home/domogik/dmg/domogik/build/lib.linux-i586-2.6/domogik/xpl/lib/velbus.py
/home/domogik/dmg/domogik/src/domogik/xpl/bin/velbus.py
/home/domogik/dmg/domogik/src/domogik/xpl/lib/velbus.py
/usr/local/lib/python2.6/dist-packages/Domogik-0.2.0-py2.6.egg/domogik/xpl/bin/velbus.py
/usr/local/lib/python2.6/dist-packages/Domogik-0.2.0-py2.6.egg/domogik/xpl/bin/velbus.pyc

so I ran: sudo python /home/domogik/dmg/domogik/src/domogik/xpl/bin/velbus.py -f
This is the output, a few warnings:

new query for t = velbus, k = device
Answer received
Exception in thread velbus-process-reader:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Domogik-0.2.0-py2.6.egg/domogik/xpl/lib/velbus.py", line 217, in listen
    self.read()
  File "/usr/local/lib/python2.6/dist-packages/Domogik-0.2.0-py2.6.egg/domogik/xpl/lib/velbus.py", line 231, in read
    self._parser(data[0:6+size])
  File "/usr/local/lib/python2.6/dist-packages/Domogik-0.2.0-py2.6.egg/domogik/xpl/lib/velbus.py", line 265, in _parser
    if not self._checksum(data:-2]) == data-2]:
  File "/usr/local/lib/python2.6/dist-packages/Domogik-0.2.0-py2.6.egg/domogik/xpl/lib/velbus.py", line 242, in _checksum
    return chr(__checksum)
ValueError: chr() arg not in range(256)

But I get some respone in the velbus.log file, wich is a good thing (I think :slight_smile:)

Second part:
When enabling the plugin (dmgenplug velbus, not -f because that doesn’t do anything) I finally mannaged to have it shown up at the plugin section. I can adjust the parameters, but, there’s nothing showing up at the devices configuration section. So nothing to try out there.

Thirth part:
With enabling the plugin, the restart of the server stalls at the velbusplugin startup (waited for more than an hour). When disabling, everything starts back as expected. I’ve the onewire plugin installed to get some results to compare with.

So I think that there are some things seriously wrong. Are the links in the files wrong, because the files are installed in my installation at a complete different location?
btw, I’ve noticed a missing link in the velbus.xml file, there’s a link to lighting.basic-velbus.xml, but that files doesn’t exists, in that dir there’s a lighting.device-velbus.xml file, so I renamed it to the “basic”, also no reaction.

I hope you got something on the output given here because I hope you 'll get it going. I 'm not going to dig in deeper into the code because I simply don’t have the time to do so. I’m alway willing to try things out. I’ve got almost all possible modules from velbus, exept for the last new ones (but there are almost the same as the old ones)

greets

hmm, looks like some stuff is going wrong

mostprobebly because of the package maintenance thats going on …
when i am back in belgium , thats tomorow, i will have a look at it …

jeroen, also you probebly need to load the velbus.xml file, there is a script that does this for you in one of the package dirs, its called loadalldata or something, if you run it it should show the config options.

Hello Cereal,

I have unplugged, waited for about 15sec then re-plugged the VMB1USB module but the command “tail -f /var/log/messages” did not show any output.
I then ran the other commands that you have mentioned and tried to control some sun blinds in the living room and a light in the kitchen but nothing happened. The tail of logs rest and velbus do show some events (see below)

What could be wrong and how to troubleshoot?

root@domogik:/var/log/domogik# tail -f /var/log/domogik/rest.log
2012-01-31 20:56:41,859 domogik-rest DEBUG Process request : init
2012-01-31 20:56:41,875 domogik-rest INFO Request : /account/user/list//
2012-01-31 20:56:41,883 domogik-rest DEBUG Account action
2012-01-31 20:56:41,927 domogik-rest DEBUG Send HTTP header for OK
2012-01-31 20:56:42,071 domogik-rest DEBUG Send HTTP data : {“status” : “OK”, “code” : 0, “description” : “None”, “account” : {“skin_used” : “”,“person” : {“last_name” : “Admin”,“first_name” : “Admin”,“id” : 1,“birthdate” : “1900-01-01”},“is_admin” : “True”,“person_id” : 1,“login” : “admin”,“id” : 1}]}
2012-01-31 20:56:44,009 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:57:00,098 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:57:16,103 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:57:32,104 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:57:33,901 domogik-rest DEBUG New message received : xpl-stat
2012-01-31 20:57:43,062 domogik-rest DEBUG New message received : xpl-stat
2012-01-31 20:57:48,141 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:58:00,279 domogik-rest DEBUG New message received : xpl-stat
2012-01-31 20:58:04,290 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:58:04,978 domogik-rest DEBUG Process request : init
2012-01-31 20:58:04,978 domogik-rest INFO Request : /account/auth/admin/123//
2012-01-31 20:58:04,986 domogik-rest DEBUG Account action
2012-01-31 20:58:04,990 domogik-rest INFO Try to authenticate as admin
2012-01-31 20:58:05,010 domogik-rest INFO Authentication OK
2012-01-31 20:58:05,034 domogik-rest DEBUG Send HTTP header for OK
2012-01-31 20:58:05,082 domogik-rest DEBUG Send HTTP data : {“status” : “OK”, “code” : 0, “description” : “Authentification granted”, “account” : {“skin_used” : “”,“person” : {“last_name” : “Admin”,“first_name” : “Admin”,“id” : 1,“birthdate” : “1900-01-01”},“is_admin” : “True”,“person_id” : 1,“login” : “admin”,“id” : 1}]}
2012-01-31 20:58:05,242 domogik-rest DEBUG Process request : init
2012-01-31 20:58:05,246 domogik-rest INFO Request : /base/ui_config/list//
2012-01-31 20:58:05,250 domogik-rest DEBUG Process base request
2012-01-31 20:58:05,302 domogik-rest DEBUG Send HTTP header for OK
2012-01-31 20:58:05,330 domogik-rest DEBUG Send HTTP data : {“status” : “OK”, “code” : 0, “description” : “None”, “ui_config” : {“key” : “name”,“value” : “Ons huis”,“name” : “house”,“reference” : “0”},{“key” : “icon”,“value” : “kitchen”,“name” : “room”,“reference” : “2”},{“key” : “widget”,“value” : “dmg_1x1_basicActuatorBinary”,“name” : “association”,“reference” : “1”},{“key” : “place”,“value” : “otheractions”,“name” : “association”,“reference” : “1”},{“key” : “icon”,“value” : “tvlounge”,“name” : “room”,“reference” : “1”},{“key” : “icon”,“value” : “bathroom”,“name” : “room”,“reference” : “3”},{“key” : “icon”,“value” : “garage”,“name” : “room”,“reference” : “4”},{“key” : “icon”,“value” : “garage”,“name” : “room”,“reference” : “5”},{“key” : “icon”,“value” : “office”,“name” : “room”,“reference” : “6”},{“key” : “icon”,“value” : “kidsroom”,“name” : “room”,“reference” : “7”},{“key” : “icon”,“value” : “kidsroom”,“name” : “room”,“reference” : “8”},{“key” : “icon”,“value” : “bedroom”,“name” : “room”,“reference” : “9”},{“key” : “icon”,“value” : “area”,"… [truncated because data too long for logs]
2012-01-31 20:58:06,279 domogik-rest DEBUG Process request : init
2012-01-31 20:58:06,283 domogik-rest INFO Request : /plugin/list//
2012-01-31 20:58:06,287 domogik-rest DEBUG Plugin action
2012-01-31 20:58:06,291 domogik-rest DEBUG Plugin : ask for plugin list
2012-01-31 20:58:06,291 domogik-rest DEBUG normal send
2012-01-31 20:58:06,315 domogik-rest DEBUG xPL Message sent by thread Thread-1032 : xpl-cmnd
{
hop=1
source=domogik-rest.domogik
target=*
}
domogik.system
{
command=list
host=*
}

2012-01-31 20:58:06,315 domogik-rest DEBUG Plugin list : wait for first answer…
2012-01-31 20:58:06,403 domogik-rest DEBUG New message received : xpl-trig
2012-01-31 20:58:06,431 domogik-rest DEBUG Plugin list : wait for other answers during ‘1’ seconds…
2012-01-31 20:58:07,535 domogik-rest DEBUG Plugin list : empty queue
2012-01-31 20:58:07,535 domogik-rest DEBUG Plugin list : end waiting for answers
2012-01-31 20:58:07,535 domogik-rest DEBUG Plugin list : messages received : <domogik.xpl.common.xplmessage.XplMessage object at 0x9befdec>]
2012-01-31 20:58:07,535 domogik-rest DEBUG Send HTTP header for OK
2012-01-31 20:58:07,563 domogik-rest DEBUG Send HTTP data : {“status” : “OK”, “code” : 0, “description” : “None”, “plugin” : {“host” : “domogik”,“list” : {“status” : “ON”,“type” : “plugin”,“host” : “domogik”,“technology” : “online_service”,“id” : “yweather”},{“status” : “ON”,“type” : “plugin”,“host” : “domogik”,“technology” : “velbus”,“id” : “velbus”}]}]}
2012-01-31 20:58:20,267 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:58:36,332 domogik-rest DEBUG New message received : xpl-cmnd
2012-01-31 20:58:38,769 domogik-rest DEBUG New message received : xpl-stat
^C
root@domogik:/var/log/domogik#

root@domogik:/var/log/domogik# tail -f /var/log/domogik/velbus.log
2012-01-31 20:58:06,363 domogik-velbus DEBUG New message received : xpl-trig
2012-01-31 20:58:20,247 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 20:58:36,272 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 20:58:38,749 domogik-velbus DEBUG New message received : xpl-stat
2012-01-31 20:58:52,285 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 20:59:08,286 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 20:59:24,287 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 20:59:40,356 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 20:59:56,357 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:00:12,374 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:00:28,395 domogik-velbus DEBUG New message received : xpl-cmnd
^C
root@domogik:/var/log/domogik#

root@domogik:/var/log/domogik# tail -f /var/log/domogik/velbus.log
target=*
}
lighting.device
{
level=0
device=03-1
}

2012-01-31 21:05:20,343 domogik-velbus DEBUG set relay off
2012-01-31 21:05:20,343 domogik-velbus INFO write packet
2012-01-31 21:05:32,998 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:05:38,165 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:05:38,173 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘100’), (‘device’, ‘03-1’)])
2012-01-31 21:05:38,185 domogik-velbus DEBUG normal send
2012-01-31 21:05:38,205 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=100
device=03-1
}

2012-01-31 21:05:38,205 domogik-velbus DEBUG set relay on
2012-01-31 21:05:38,209 domogik-velbus INFO write packet
2012-01-31 21:05:49,047 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:05,148 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:14,037 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:14,041 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘100’), (‘device’, ‘06-1’)])
2012-01-31 21:06:14,057 domogik-velbus DEBUG normal send
2012-01-31 21:06:14,065 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=100
device=06-1
}

2012-01-31 21:06:14,069 domogik-velbus DEBUG set relay on
2012-01-31 21:06:14,069 domogik-velbus INFO write packet
2012-01-31 21:06:21,165 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:33,228 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:33,228 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘100’), (‘device’, ‘07’)])
2012-01-31 21:06:33,244 domogik-velbus DEBUG normal send
2012-01-31 21:06:33,260 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=100
device=07
}

2012-01-31 21:06:37,174 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:44,586 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:44,586 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘0’), (‘device’, ‘06-1’)])
2012-01-31 21:06:44,590 domogik-velbus DEBUG normal send
2012-01-31 21:06:44,618 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=0
device=06-1
}

2012-01-31 21:06:44,618 domogik-velbus DEBUG set relay off
2012-01-31 21:06:44,634 domogik-velbus INFO write packet
2012-01-31 21:06:45,627 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:45,635 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘0’), (‘device’, ‘07’)])
2012-01-31 21:06:45,651 domogik-velbus DEBUG normal send
2012-01-31 21:06:45,671 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=0
device=07
}

2012-01-31 21:06:47,228 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:06:47,232 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘100’), (‘device’, ‘08 02’)])
2012-01-31 21:06:47,232 domogik-velbus DEBUG normal send
2012-01-31 21:06:47,256 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=100
device=08 02
}

2012-01-31 21:06:53,223 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:07:09,288 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:07:25,361 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:07:33,902 domogik-velbus DEBUG New message received : xpl-stat
2012-01-31 21:07:41,358 domogik-velbus DEBUG New message received : xpl-cmnd
2012-01-31 21:07:43,047 domogik-velbus DEBUG New message received : xpl-stat
^C
root@domogik:/var/log/domogik#

This is my module scheme…
Channel Device Port Note
01 TVMB4PD 1 Rolluik links
01 TVMB4PD 2 Rolluik rechts
01 TVMB4PD 1 Rolluik zijraam
01 TVMB4PD 4 Tuin
01 TVMB4PD 5 Eethoek Wand
01 TVMB4PD 6 paniek
01 TVMB4PD 7 empty
01 TVMB4PD 8 empty

02 TVMB4RY 1 bad meubelverl
02 TVMB4RY 2 bad halo plafond
02 TVMB4RY 3 keuken kolomkast
02 TVMB4RY 4 bureau plafond

03 TVMB4RY 1 keuken spoelbak
03 TVMB4RY 2 eethoek spots
03 TVMB4RY 3 keuken wandverl
03 TVMB4RY 4 bad verl plafond

04 TVMB4RY 1 eethoek wand
04 TVMB4RY 2 Living voor
04 TVMB4RY 3 eethoek tafel
04 TVMB4RY 4 wandlicht buiten

05 TVMB6IN 1 badkamer_knop1
05 TVMB6IN 1 buitenvl_achter
05 TVMB6IN 1 badkamer_knop3
05 TVMB6IN 1 badkamer_knop4
05 TVMB6IN 1 badkamer_knop2
05 TVMB6IN 1 Paniek knop

06 TVMB1BL Blind Zijraam

07 TVMB1BL 1 Blind Links
07 TVMB1BL 2 Blind Rechts

08 TVMB1DM Living Midden

10 TVMB8PB 1 keuken achter
10 TVMB8PB 2 keuken kolomkast
10 TVMB8PB 3 keuken wandverl
10 TVMB8PB 4 eethoek wand
10 TVMB8PB 5 Living midden
10 TVMB8PB 6 eethoek wand
10 TVMB8PB 7 Living voor
10 TVMB8PB 8 eethoek tafel

11 TVMB8PB 1 plafond eethoek
11 TVMB8PB 2 spots eethoek
11 TVMB8PB 3 keuken kolomkas
11 TVMB8PB 4 Living voor
11 TVMB8PB 5 Living midden
11 TVMB8PB 6 keuken achter
11 TVMB8PB 7 Living middem
11 TVMB8PB 8 Living voor

12 TVMB8PB 1 bureau vooraan
12 TVMB8PB 2 bureau achter
12 TVMB8PB 3 unused
12 TVMB8PB 4 unused
12 TVMB8PB 5 unused
12 TVMB8PB 6 unused
12 TVMB8PB 7 unused
12 TVMB8PB 8 unused

can you just start the velbus.py module?

and make an action in the velbus system, switch a light of/on and see if you see the coresponding data in the velbus log?

all actions on velbus should be showed in the log …

Hi,

I have started the velbus.py module and made some actions in the velbus system like control the sun blinds and switch a light of/on.
The coresponding data is in the velbus log here below.

The light did not go on/off, neither did the sun blinds.

root@domogik:~# su root
root@domogik:~# cd /home/configure-hgrc/domogik/src/domogik/xpl/bin/
root@domogik:/home/configure-hgrc/domogik/src/domogik/xpl/bin# python velbus.py
root@domogik:/home/configure-hgrc/domogik/src/domogik/xpl/bin# tail -f /var/log/ domogik/velbus.log
}
lighting.device
{
level=0
device=03-1
}

2012-02-01 09:06:09,341 domogik-velbus DEBUG set relay off
2012-02-01 09:06:09,357 domogik-velbus INFO write packet
2012-02-01 09:06:20,463 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:06:36,488 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:06:45,149 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘100’), (‘device’, ‘03-1’)])
2012-02-01 09:06:45,169 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:06:45,173 domogik-velbus DEBUG normal send
2012-02-01 09:06:45,181 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=100
device=03-1
}

2012-02-01 09:06:45,181 domogik-velbus DEBUG set relay on
2012-02-01 09:06:45,181 domogik-velbus INFO write packet
2012-02-01 09:06:52,505 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:06:57,488 domogik-velbus INFO schema:lighting.device, data:OrderedDict((‘level’, ‘0’), (‘device’, ‘03-1’)])
2012-02-01 09:06:57,488 domogik-velbus DEBUG normal send
2012-02-01 09:06:57,516 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:06:57,492 domogik-velbus DEBUG xPL Message sent by thread Manager-new-message-cb : xpl-trig
{
hop=1
source=domogik-velbus.domogik
target=*
}
lighting.device
{
level=0
device=03-1
}

2012-02-01 09:06:57,536 domogik-velbus DEBUG set relay off
2012-02-01 09:06:57,540 domogik-velbus INFO write packet
2012-02-01 09:07:08,598 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:07:24,711 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:07:34,028 domogik-velbus DEBUG New message received : xpl-stat
2012-02-01 09:07:40,672 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 09:07:43,173 domogik-velbus DEBUG New message received : xpl-stat
^C
root@domogik:/home/configure-hgrc/domogik/src/domogik/xpl/bin#

the plugin is not receiving data from velbus …

otherwise there should be other debug info in there

Any instructions or work around to solve this? I do not know how to proceed now…

if you use some test programs (here on the forum are some small progys found), does it work then?

Can you comunicate without domogik?
Try to see in the beginnning of the log (velbus.py), there should be something like “velbus deviced opend”

ok i just tested it,

and it seems that on the first run the velbus module is not receiving its port to connect to.
so, to have a quick fix, edit vebus.py

after the

device= self._config....

add

device='/dev/ttyACM0'

of course update this with the correct path

Also if velbus does not start together with domogik, make sure domogic user has the right permissions to write to the device,
on debian this can be solved if you add domogic to the dialout group.

On the tcp connection, i’m working with the domogik devs to make some sort of enum field for plugins, this way it would be possible to have serial or socket connection in the velbus module

Got it to work now. 8)
I have modified and saved the velbus.py script and added after the statement device= self._config… the code device=’/dev/ttyACM0’

I have verified the group membership for account ‘domogik’ and it is part of the dialout group and a lot other groups. This is not an issue anymore.

I have rebooted the Domogik VM but apprently the velbus.py did not start.
Is this normal? Can I modify something so I can be assured that it loads automatically.

I was able to turn on/off a light in the kitchen successfully but controlling the shutters does not work (see log details below)

:stuck_out_tongue: Do you also support other Velbus components like TVMB1BL (shutter/blinds), VMB1DM (dimmers) and others? :stuck_out_tongue:

2012-02-01 19:32:38,180 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 19:32:39,548 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 19:32:48,779 domogik-velbus INFO Daemonize plugin velbus
2012-02-01 19:32:48,848 domogik-velbus DEBUG watcher fork
2012-02-01 19:32:48,855 domogik-velbus INFO ----------------------------------
2012-02-01 19:32:48,913 domogik-velbus INFO Starting plugin ‘velbus’ (new manager instance)
2012-02-01 19:32:48,946 domogik-velbus DEBUG Write pid file for pid ‘2788’ in file ‘/var/run/domogik/velbus.pid’
2012-02-01 19:32:48,988 domogik-velbus DEBUG xPL plugin velbus socket bound to 192.168.1.80, port 52448
2012-02-01 19:32:49,066 domogik-velbus DEBUG xPL thread started for velbus
2012-02-01 19:32:49,070 domogik-velbus DEBUG New listener, filter : {‘xpltype’: ‘xpl-cmnd’, ‘schema’: ‘domogik.system’}
2012-02-01 19:32:49,082 domogik-velbus DEBUG end single xpl plugin
2012-02-01 19:32:49,110 domogik-velbus DEBUG Init config query instance
2012-02-01 19:32:49,125 domogik-velbus DEBUG New listener, filter : {‘xpltype’: ‘xpl-stat’, ‘technology’: ‘velbus’, ‘hostname’: ‘domogik’, ‘schema’: ‘domogik.config’}
2012-02-01 19:32:49,136 domogik-velbus DEBUG normal send
2012-02-01 19:32:49,172 domogik-velbus DEBUG xPL Message sent by thread MainThread : xpl-cmnd
{
hop=1
source=domogik-velbus.domogik
target=*
}
domogik.config
{
technology=velbus
hostname=domogik
key=device
}

2012-02-01 19:32:49,353 domogik-velbus DEBUG New message received : xpl-stat
2012-02-01 19:32:49,371 domogik-velbus DEBUG Config value received : device : /dev/ttyACM0
2012-02-01 19:32:49,373 domogik-velbus DEBUG New message received : xpl-stat
2012-02-01 19:32:49,444 domogik-velbus DEBUG New listener, filter : {‘xpltype’: ‘xpl-cmnd’, ‘schema’: ‘lighting.basic’}
2012-02-01 19:32:49,450 domogik-velbus INFO Try to open VELBUS: /dev/ttyACM0
2012-02-01 19:32:49,449 domogik-velbus INFO write deamon
2012-02-01 19:32:49,467 domogik-velbus INFO VELBUS opened
2012-02-01 19:32:49,488 domogik-velbus DEBUG Try to enable Heartbeat
2012-02-01 19:32:49,493 domogik-velbus INFO Start listening VELBUS
2012-02-01 19:32:49,537 domogik-velbus DEBUG New timer registered : <domogik.xpl.common.xplconnector.XplTimer instance at 0x9297cec>
2012-02-01 19:32:49,540 domogik-velbus DEBUG New timer created : <domogik.xpl.common.xplconnector.XplTimer instance at 0x9297cec>
2012-02-01 19:32:49,603 domogik-velbus DEBUG New listener, filter : {‘xpltype’: ‘xpl-cmnd’, ‘schema’: ‘hbeat.request’}
2012-02-01 19:32:49,606 domogik-velbus DEBUG Heartbeat enabled
2012-02-01 19:32:56,874 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 19:32:56,954 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 19:32:57,121 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 19:32:57,137 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 19:33:09,625 domogik-velbus DEBUG New message received : xpl-cmnd
2012-02-01 19:33:09,656 domogik-velbus DEBUG New message received : xpl-cmnd

Hi cereal,

Have you seen my post reply yesterday? Due to other non-funny inviduals posting garbage this one might have slipped through your mases…

Geert

on running of the init.d script, is there any mention velbus?

Well at the moment only relays, because those are the only ones that i own :slight_smile:
if you want i can have a look at the dimmer and shutter stuff also, but then i need the commands the i need to send

  • command name/hex value
  • data
  • trigger = the command and expected value that velbus will send back

if you can provide me this info i can add them to domogik, no problem :slight_smile:

Edit: i just comitted the socket option to domogik, so update your local repo, run the insert_all_data script, restart and configure domogic correctly

hello,

I still haven’t the whole thing going.
when running manually

sudo /home/domogik/dmg/domogik/src/domogik/xpl/bin/velbus.py -f

I get the respones in the log as expected.
Than I startup domogik and enable the plugin with dmgenplug velbus.
Now I see in the plugin configuration the velbusplugin running and can adjust some settings, but I can’t see anything in the device configuratir so I can’t test that part.

I’ll try later on to reinstall the whole domogik, maybe that will help?

try to run the velbus.py as user domogik, it should not be run as root …

Hi cereal,

Do the following documents help?

Shutter/Sun blinds (VMB1BL controls one shutter, VMB2BL can control 2 shutters)
velleman.be/downloads/0/velb … vmb1bl.pdf
velleman.be/downloads/0/velb … vmb2bl.pdf

VMB1DM (dimmer)
velleman.be/downloads/0/velb … vmbdmi.pdf

I found also some xml files on my HDD in the folder where VelbusLink v6 is installed

This is the xml for the shutter module VMB1BL:

<?xml version="1.0" encoding="ISO-8859-1" ?> Blind 1 Up 00 28 Immediately Up 1C 28 Down 38 28 Immediately Down 54 28 Name 70 16

This is the xml for the shutter module VMB2BL:

<?xml version="1.0" encoding="ISO-8859-1" ?> Blind 1 Up 00 28 Immediately Up 1C 28 Down 38 28 Immediately Down 54 28 Name 70 16 Blind 2 Up 80 28 Immediately Up 9C 28 Down B8 28 Immediately Down D4 28 Name F0 16

This is the xml for the dimmer VMB1DM:

<?xml version="1.0" encoding="ISO-8859-1" ?> Actions Switch OFF 00 28 Switch ON 1C 28 Toggle (TGL) 38 28 Button Dimming (DIM) 54 28 Slider dimming (DIM) 70 28 Dim up (UP) 8C 28 Dim down (DWN) A8 28 Atmospheric (ATM) C4 28 Atmospheric Dimvalues (ADM) Atm. Dimvalue 1 E0 1 Atm. Dimvalue 2 E1 1 Atm. Dimvalue 3 E2 1 Atm. Dimvalue 4 E3 1 Atm. Dimvalue 5 E4 1 Atm. Dimvalue 6 E5 1 Atm. Dimvalue 7 E6 1 Atm. Dimvalue 8 E7 1 Atm. Dimvalue 9 E8 1 Atm. Dimvalue 10 E9 1 Atm. Dimvalue 11 EA 1 Atm. Dimvalue 12 EB 1 Atm. Dimvalue 13 EC 1 Atm. Dimvalue 14 ED 1 Name Name F0 16