Niko pure feedback leds
Posted: Thu Mar 27, 2014 11:10 pm
Recently i've stumbled upon Velleman's vmb6pbn module which is designed to be used with the Niko 4 fold of 6 fold momentary switch modules.
It's a Velbus module which requires only 4 wires (12V and Canbus).
I've been using the Niko 6 fold modules for quite some time now (http://www.domoticaforum.eu/viewtopic.p ... 356#p52356). Additional eletrical piping has been installed during my newbuild so i'm able to install low voltage wiring to certain locations which are mostly used for switching lights.
Until now an Aruino Mega with Marmitek XM10E has been capturing (or trying to capure) X10 messages for a few preprogrammed DAIX12's modules. ON or DIM switched 24v to the leds. The arduino and all additional hardware takes quite a lot of space and is hasn't been very stable. Lots of messages stay unnoticed.
Using velbus would be far more flexible and requires less hardware and cabling (4 wires instead of 14 (7for leds / 7 for switches). But how to send Velbus messages from Homeseer.
About 5 years ago some forum mebers became quite enthusiastic about Velbus http://www.domoticaforum.eu/viewtopic.php?f=11&t=3334 but unfortunately noone mode a Velbus plugin for Homeseer
I'm certainly not a programmer, but after a day of googling and vb.net fiddling, homeseer is switchting some leds! And quite fast compared to X10. There are a lot of VB.Net / .Net / C# (still not sure what the difference is) examples and the VMB1USB makes it easy to send velbus messages via an emulated COM port.
[youtube]http://www.youtube.com/watch?v=RnbMRkLF ... e=youtu.be[/youtube]
This is the vb code so far.
The length of a velbus message is variable, but for most operations the message is 8 bytes long where the 7th byte is checksum.
Next i'd like to be able to receive velbus message with Homeseer so my WTW Arduino doesn't need a LAN shield anymore. Not sure yet which homeseer mode to use. There isn't a CRLF. Just a start byte H0F and an end byte H04
It's a Velbus module which requires only 4 wires (12V and Canbus).
I've been using the Niko 6 fold modules for quite some time now (http://www.domoticaforum.eu/viewtopic.p ... 356#p52356). Additional eletrical piping has been installed during my newbuild so i'm able to install low voltage wiring to certain locations which are mostly used for switching lights.
Until now an Aruino Mega with Marmitek XM10E has been capturing (or trying to capure) X10 messages for a few preprogrammed DAIX12's modules. ON or DIM switched 24v to the leds. The arduino and all additional hardware takes quite a lot of space and is hasn't been very stable. Lots of messages stay unnoticed.
Using velbus would be far more flexible and requires less hardware and cabling (4 wires instead of 14 (7for leds / 7 for switches). But how to send Velbus messages from Homeseer.
About 5 years ago some forum mebers became quite enthusiastic about Velbus http://www.domoticaforum.eu/viewtopic.php?f=11&t=3334 but unfortunately noone mode a Velbus plugin for Homeseer
I'm certainly not a programmer, but after a day of googling and vb.net fiddling, homeseer is switchting some leds! And quite fast compared to X10. There are a lot of VB.Net / .Net / C# (still not sure what the difference is) examples and the VMB1USB makes it easy to send velbus messages via an emulated COM port.
[youtube]http://www.youtube.com/watch?v=RnbMRkLF ... e=youtu.be[/youtube]
This is the vb code so far.
Code: Select all
'Niko paneel via VMB6PBN
'
'1 2 h01 H02 1 2
'5 6 H10 H20 16 32
'4 3 H08 H04 8 4
'
'A1 = 161
'A2 = 162
'A3 = 163
'A4 = 164
'A5 = 165
'
Sub VelbusUpdate(ByVal Parms As Object)
Dim VelbusOpdracht(7) As Integer
Dim Devices As String()() = New String(5)() {}
Dim i,j As Integer
' create jagged two-dimensional array
' Meerdere Panelen + Leds mogelijk, {"G1", "161|1", "161|4", "165|16"}
Devices(0) = New String() {"G1", "162|8"}
Devices(1) = New String() {"G2", "162|16"}
Devices(2) = New String() {"G3", "162|1"}
Devices(3) = New String() {"G4", "162|4"}
Devices(4) = New String() {"B1", "162|32"}
Devices(5) = New String() {"B2", "162|2"}
' Parms(2) 2 = On, 3 = Off, 4 = Dim
if Parms(2) = 2 Or Parms(2) = 4 Then
VelbusOpdracht(4) = &HF6
Else
VelbusOpdracht(4) = &HF5
End If
For i = 0 To Devices.GetUpperBound(0)
if Devices(i)(0) = Parms(0) & Parms(1) Then
hs.writelog("Velbus", "Device change "&Devices(i)(0))
For j = 1 To Devices(i).GetUpperBound(0)
dim iStr() as string = Devices(i)(j).split("|")
Dim address, led as integer
If IsNumeric(iStr(0)) then
address = Cint(iStr(0))
End if
If IsNumeric(iStr(1)) then
led = Cint(iStr(1))
End if
VelbusOpdracht(0) = &H0F
VelbusOpdracht(1) = &HFB
VelbusOpdracht(2) = address
VelbusOpdracht(3) = &H02
VelbusOpdracht(5) = led
VelbusOpdracht(7) = &H04
Dim checksum As Byte
Dim chkI As Integer = 0
For c As Integer = 0 To 5
' hs.writelog("Velbus ","Byte "&velbusOpdracht(c))
chkI += velbusOpdracht(c)
chkI = chkI And 255
Next
chkI = 255 - chkI
chkI += 1
velbusOpdracht(6) = chkI
Dim ComPort As Integer = 11
For c As Integer = 0 To 7
hs.SendToComPort(ComPort, Chr(velbusOpdracht(c)))
Next
hs.Writelog("Velbus", VelbusOpdracht(0) & " " & VelbusOpdracht(1) & " " & VelbusOpdracht(2) & " " & VelbusOpdracht(3) & " " & VelbusOpdracht(4) & " " & VelbusOpdracht(5) & " " & VelbusOpdracht(6) & " " & VelbusOpdracht(7))
Next
End if
Next
End Sub
Next i'd like to be able to receive velbus message with Homeseer so my WTW Arduino doesn't need a LAN shield anymore. Not sure yet which homeseer mode to use. There isn't a CRLF. Just a start byte H0F and an end byte H04