Velbus Domogik module

Finally we got there!

I tested the fuctionallity of the switch: works ok
Tested the dimmer: no good luck, I don’t know wich dimmer you’ve implemented because there are several dimmer types at the moment (mine are vmbdmE).
I will later on test the blinds.

Second remark, when adding a device, by the feature select I find velbus but in the list there is nothing displayed. I have to select them blind with my arrows.

Thirth remark, they feedback messages aren’t proceesed correctly, I always get an error.

ok, I’ve tested the blinds also, those seems to be working ok in every way (incl message feedback)

hmm,

the feedback for relays i have to check.
The dimmers are tested by Golfy, so no idea which one he tested …

i only have relays here at home, so no support for testing anything else so its hard to improve the code …

Maikel

hello,

I was wrong about the dimmers, they work, but …only half :slight_smile:.
What is wrong is that you’re sending an 8 bit value to the dimmers (setdimvalue command for the dme and dmi are the same). This will work just untill 50% (that’s why half :slight_smile:). They expect the dimvalue to be between 0 (0%) and 64 (100% converted from hex to dec).
Maybe that’s also the reason that the message received isn’t correct?
Also one thing to keep in mind. When switching the dimmer from zero to full or vice versa, you use the switch relay on/off command on a dimmer (02 command). This will not work!

I hope you can adjust those tings and the dimmers should be working fine.
If I knew in wich file I 've to change those things … I did a locate velbus, pft a lot of files :slight_smile:

aha,
I 've looked in the velbus.py file in the lib directory and I think I’ve found the reason why the packets are’nt received correctly.
You expect to receive in your buffer only 1 nicely formed packet, This is far from the very thruth (I 've made this mistaka also with my very first programs). You’ll have to imort your receive buffer and cut and process the received data into packets. Have a look at my perl or the C code of my programs.

hello,
I’ve found again a small bug.
In /lib/velbus.py:
def _process_238(self, data):
“”"
Process a 251 Message
Dimmer status => send out when the dimmer status is changed
“”"
device = str(ord(data[2])) + “-” + str(ord(data[5]))

should be:
device = str(ord(data[2])) + “-” + str(ord(data[5])-1)

Otherwise the feedback message is never reveived correctly as it is seen as adress - (channel+1)

When I change this, the slider goes with the receeved dimvalue, not perfectly, but it’s moving :slight_smile:

I don’t know where you’re from, otherwise I could loan you a leddimmer, those react the same way a dimmer does.

[quote=“jeroends”]
I don’t know where you’re from, otherwise I could loan you a leddimmer, those react the same way a dimmer does.[/quote]

thanks for the fix,
i’ll commit it one of the folowing days.

I’m from belgium, mol, but i work in antwerp. so if you could loan me the dimmer it would be great, at least i have a way to test them then. From where are you?

I asked velleman for some support, a possibility to loan some devices for a few weeks, but they don’t see the need for it, so there is no other way then buying them :slight_smile:

I work and live in Antwerp (near Ekeren), but I’m from Lommel and my wife is from Olen so I come often in the neighborhood.
I also have an vmbts extra, if your interrested …

my mail add is: be.skynet(apest)schepper.de.jeroen but backwards

Hi Jeroends, Hi Cereal !

as you are probably the best users of Velbus protocol, I’m asking you a favor :
could you test my PB_Velbus-server under your favorite environment : Linux ? I need to enhance this program (maybe, prefill with ttyACME0 and other things like : how to launch it on just clicking ? Currently, need to open terminal and write ./PB_Velbus-server.exe :frowning: ).

See Here for details but it’s my first compilation under LinuxMint13 x64 :
https://forumtest.velbus.eu/t/an-other-velbus-server-purebasic/5523/37

Thanks for your help and I hope my tool will help you in all days (don’t hesitate to send me screenshots, comments, etc. at – Golfy @] free . fr – and you can check PDF manual : golfy.olympe.in/PB_Velbus-Server_3_manual.pdf)

Hi ,

I’ve installed domogik and got the plugin installed,
but when I send a command it says in the log that the device is not known at address 2.

I have a relay at address 02 and want to switch on the lights at 02-2 , but I get this error.

Also when I start the plugin , just 3 modules are recognised.

here is a output log,
the strange thing is that when i push the buttons the bus is captured.
can you help me?

2013-09-04 22:25:46,874 domogik-velbus INFO write packet
2013-09-04 22:25:46,876 domogik-velbus INFO write packet
2013-09-04 22:25:46,877 domogik-velbus INFO Bus scan finished
2013-09-04 22:25:46,899 domogik-velbus INFO Start listening VELBUS
2013-09-04 22:25:46,901 domogik-velbus INFO Found node with address 0 and module_type VMB4PD
2013-09-04 22:25:46,910 domogik-velbus INFO Found node with address 7 and module_type VMB2PBN
2013-09-04 22:26:01,936 domogik-velbus INFO Found node with address 254 and module_type VMB6IN
2013-09-04 22:26:46,110 domogik-velbus ERROR Request to set a level on a device, but the device is not known. address 2
2013-09-04 22:26:46,308 domogik-velbus ERROR Request to set a level on a device, but the device is not known. address 2
2013-09-04 22:26:47,260 domogik-velbus ERROR Request to set a level on a device, but the device is not known. address 2
2013-09-04 22:28:05,672 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-1’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:05,694 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘2-2’, ‘level’: 100}
2013-09-04 22:28:05,708 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘2-2’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:05,831 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-1’, ‘current’: ‘LOW’, ‘type’: ‘input’}
2013-09-04 22:28:06,000 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-2’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:06,055 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘3-1’, ‘level’: 100}
2013-09-04 22:28:06,068 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘3-2’, ‘level’: 100}
2013-09-04 22:28:06,085 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘3-3’, ‘level’: 100}
2013-09-04 22:28:06,159 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-2’, ‘current’: ‘LOW’, ‘type’: ‘input’}
2013-09-04 22:28:06,275 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-3’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:06,328 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘3-1’, ‘level’: 0}
2013-09-04 22:28:06,342 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘3-2’, ‘level’: 0}
2013-09-04 22:28:06,356 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘3-3’, ‘level’: 0}
2013-09-04 22:28:06,421 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-3’, ‘current’: ‘LOW’, ‘type’: ‘input’}
2013-09-04 22:28:08,750 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘5-1’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:08,773 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘2-3’, ‘level’: 100}
2013-09-04 22:28:08,785 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘2-3’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:08,972 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘5-1’, ‘current’: ‘LOW’, ‘type’: ‘input’}
2013-09-04 22:28:24,044 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘5-1’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:24,067 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘2-3’, ‘current’: ‘LOW’, ‘type’: ‘input’}
2013-09-04 22:28:24,164 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘5-1’, ‘current’: ‘LOW’, ‘type’: ‘input’}
2013-09-04 22:28:26,904 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-1’, ‘current’: ‘HIGH’, ‘type’: ‘input’}
2013-09-04 22:28:26,926 domogik-velbus INFO schema:lighting.device, data:{‘device’: ‘2-2’, ‘level’: 0}
2013-09-04 22:28:26,941 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘2-2’, ‘current’: ‘LOW’, ‘type’: ‘input’}
2013-09-04 22:28:27,038 domogik-velbus INFO schema:sensor.basic, data:{‘device’: ‘6-1’, ‘current’: ‘LOW’, ‘type’: ‘input’}
^C

the velbus domogik module first scans your system, and it did not find module 2. so it doesn’t know what type of module this is, so it can not generate the correct messages.

Maikel

Can it have something to do with a terminator that’s not put wright?

no, check the logs from domogik velbus,

from the start of the module, it first scans all addresses, and see if it receives a module type message for all the channels you expect a module on

I don’t see all off them , so that seems to be the problem:

2013-09-08 14:52:30,229 domogik-velbus INFO write packet
2013-09-08 14:52:30,231 domogik-velbus INFO write packet
2013-09-08 14:52:30,232 domogik-velbus INFO Bus scan finished
2013-09-08 14:52:30,256 domogik-velbus INFO Start listening VELBUS
2013-09-08 14:52:30,260 domogik-velbus INFO Found node with address 0 and module_type VMB4PD
2013-09-08 14:52:30,265 domogik-velbus INFO Found node with address 7 and module_type VMB2PBN

I have 8 modules

0 = vmb4pd
2-3 = vmb4ryld
4-7 = vmb2pbn
254 = vmb6in

regards,
Kjell

ah,

set you log level in domogik.cfg to debug, and a lot more info will be shown

it logs this for adres 0x00 until 0x07

2013-09-08 19:08:00,690 domogik-velbus DEBUG start sending packet to 0x0
2013-09-08 19:08:00,695 domogik-velbus INFO write packet
2013-09-08 19:08:00,697 domogik-velbus INFO write packet
2013-09-08 19:08:00,699 domogik-velbus DEBUG 0ffb0040b604
2013-09-08 19:08:00,700 domogik-velbus INFO write packet
2013-09-08 19:08:00,703 domogik-velbus INFO write packet
2013-09-08 19:08:00,705 domogik-velbus INFO write packet
2013-09-08 19:08:00,707 domogik-velbus INFO write packet
2013-09-08 19:08:00,709 domogik-velbus INFO write packet
2013-09-08 19:08:00,710 domogik-velbus INFO write packet
2013-09-08 19:08:00,712 domogik-velbus INFO write packet
2013-09-08 19:08:00,714 domogik-velbus INFO write packet
2013-09-08 19:08:00,716 domogik-velbus INFO write packet
2013-09-08 19:08:00,717 domogik-velbus INFO write packet
2013-09-08 19:08:00,719 domogik-velbus INFO write packet
2013-09-08 19:08:00,720 domogik-velbus INFO write packet
2013-09-08 19:08:00,722 domogik-velbus INFO write packet
2013-09-08 19:08:00,724 domogik-velbus INFO write packet
2013-09-08 19:08:00,725 domogik-velbus INFO write packet
2013-09-08 19:08:00,727 domogik-velbus INFO write packet
2013-09-08 19:08:00,728 domogik-velbus INFO write packet
2013-09-08 19:08:00,730 domogik-velbus INFO write packet
2013-09-08 19:08:00,731 domogik-velbus INFO write packet
2013-09-08 19:08:00,732 domogik-velbus INFO write packet
2013-09-08 19:08:00,734 domogik-velbus INFO write packet
2013-09-08 19:08:00,735 domogik-velbus INFO write packet
2013-09-08 19:08:00,737 domogik-velbus INFO write packet
2013-09-08 19:08:00,739 domogik-velbus INFO write packet
2013-09-08 19:08:00,740 domogik-velbus INFO write packet
2013-09-08 19:08:00,742 domogik-velbus INFO write packet
2013-09-08 19:08:00,744 domogik-velbus INFO write packet
2013-09-08 19:08:00,745 domogik-velbus INFO write packet
2013-09-08 19:08:00,747 domogik-velbus INFO write packet
2013-09-08 19:08:00,748 domogik-velbus INFO write packet
2013-09-08 19:08:00,750 domogik-velbus INFO write packet
2013-09-08 19:08:00,752 domogik-velbus INFO write packet
2013-09-08 19:08:00,754 domogik-velbus INFO write packet
2013-09-08 19:08:00,755 domogik-velbus INFO write packet
2013-09-08 19:08:00,757 domogik-velbus INFO write packet
2013-09-08 19:08:00,759 domogik-velbus INFO write packet
2013-09-08 19:08:00,760 domogik-velbus INFO write packet
2013-09-08 19:08:00,762 domogik-velbus INFO write packet

and then :

2013-09-08 19:08:01,133 domogik-velbus INFO Bus scan finished
2013-09-08 19:08:01,136 domogik-velbus DEBUG send hbeat
2013-09-08 19:08:01,139 domogik-velbus DEBUG normal send
2013-09-08 19:08:01,156 domogik-velbus DEBUG start sending packet to 0x7
2013-09-08 19:08:01,159 domogik-velbus DEBUG 0ffb0740af04
2013-09-08 19:08:01,140 domogik-velbus INFO Start listening VELBUS
2013-09-08 19:08:01,163 domogik-velbus DEBUG xPL Message sent by thread MainThread : xpl-stat
{
hop=1
source=domogik-velbus.arm
target=*
}
hbeat.app
{
interval=5
port=43697
remote-ip=192.168.0.10
status=2
}

2013-09-08 19:08:01,165 domogik-velbus DEBUG starting parser: 0ffb0008ff0b000000082503b404
2013-09-08 19:08:01,169 domogik-velbus DEBUG Received message with type: ‘node type’ address: 0 module: UNKNO
WN
2013-09-08 19:08:01,171 domogik-velbus INFO Found node with address 0 and module_type VMB4PD
2013-09-08 19:08:01,174 domogik-velbus DEBUG starting parser: 0ffb0707ff186c180112201a04
2013-09-08 19:08:01,177 domogik-velbus DEBUG Received message with type: ‘node type’ address: 7 module: UNKNO
WN
2013-09-08 19:08:01,178 domogik-velbus INFO Found node with address 7 and module_type VMB2PBN
2013-09-08 19:08:01,222 domogik-velbus DEBUG start sending packet to 0x8
2013-09-08 19:08:01,224 domogik-velbus DEBUG 0ffb0840ae04
2013-09-08 19:08:01,286 domogik-velbus DEBUG start sending packet to 0x9
2013-09-08 19:08:01,288 domogik-velbus DEBUG 0ffb0940ad04
2013-09-08 19:08:01,350 domogik-velbus DEBUG start sending packet to 0xa

Hi!

I’ve recently installed Domogik 0.2, Domoweb 0.2.1 and the Velbus plugin 0.5.0.dev20130916.

Everything is ok, except for the Velbus plugin. I’ve saved the configuration with the default options (serial and /dev/ttyACM0) but when I try to start the plugin I get the error “RINOR : ‘No data or timeout on start plugin velbus’”.

What can I be doing wrong?

BTW, thanks for this plugin and all the work and dedication behind it. I will surely help testing it with my Velbus installation.

Best regards,
Hugo.

start with looking in /var/log/domogik for a velbus logfile and see whats in there

i suspect that the plgin is not configured or can not open the velbus device.

Hi cereal.

Looking into the log, I would say that there is a permissions problem. I’ve installed all the system with pi user, but Domogik runs with domogik user.

I’ve ran grep tool to list all serial ports and the Velbus interface is detected by the system, with the name ttyACM0 just like in the plugin’s config.

[code]2013-09-16 21:14:47,494 domogik-velbus INFO Daemonize plugin velbus
2013-09-16 21:14:47,503 domogik-velbus INFO ----------------------------------
2013-09-16 21:14:47,509 domogik-velbus INFO Starting plugin ‘velbus’ (new manager instance)
2013-09-16 21:14:48,062 domogik-velbus INFO Try to open VELBUS: /dev/ttyACM0
2013-09-16 21:14:48,067 domogik-velbus INFO write deamon
2013-09-16 21:14:48,066 domogik-velbus ERROR Error while opening Velbus : /dev/ttyACM0. Check if it is the good device or if you have the good permissions on it.
2013-09-16 21:14:48,088 domogik-velbus WARNING Malformated message received, ignoring it.
2013-09-16 21:14:48,090 domogik-velbus WARNING Error was : Invalid message packet
2013-09-16 21:14:48,092 domogik-velbus WARNING Message was : xpl-stat
{
hop=1
source=domogik-dbmgr.raspberrypi
target=*
}
domogik.config
{
technology=velbus
hostname=raspberrypi
device=/dev/ttyACM0
}

2013-09-16 21:14:48,151 domogik-velbus INFO self._should_stop set, leave.
2013-09-16 21:14:48,158 domogik-velbus INFO Close VELBUS[/code]

Best regards,
Hugo.

try chowning the device or creating an udev rule for it