Helvar Router

Hello :slight_smile:
Have anyone tried to make a binding for Helvar routers? I have a Helvar Digidim 905 router that I want to communicate with using Openhab. I’ve poked around a bit, and the router sends out UDP broadcast messages that is ASCII. It is also possible to send out custom messages from the router based on what group address that is triggered on the Dali bus. But then it is just feedback, and I want to control the lights also. The downside with the routing entries is that you have to make 1 entry for each group address and scene you want to send out to ethernet.

So my hope is that some smart people out there have already figured this out. :slight_smile:

found something useful: http://docplayer.net/53084037-Demo-board-for-a-dali-router-system-helvar.html

but it doesn’t include any “Helvranet”? protocol info :frowning:

Maybe you can use a middle-ware like an OPC server for integration?

or:

The Designer is not free for download, so I couldn’t find the help file to see the commands :frowning:

I am also interested in DALI but I think that I will integrate it via KNX (not directly)

Hello. Designer is a free software. Just contact your local Helvar dealer and you will get a downloadable link.
I found this page about the helvarnet protocol. I will check it out some time when I have the time, problem is i’m not that good at coding bindings :stuck_out_tongue: .
By the way, here is the help file from Designer. Let me know if you can’t read it.

PDF version of the help file

I think Dali through a KNX gateway is easier with Openhab.

By the way i got it to work :slight_smile:
If i send a TCP packet to port 50000 with this command:

V:1,C:11,G:17,K:1,B:2,S:5,F:9000#
I can actually communicate with the dali bus :smiley:

From the documentation page 418:
Command
Command (11), Group (1…16383), Block (1…8), Scene (1…16), Constant Light (1=ON, 0=OFF), Fade
Time (0…6553.5s)
ASCII Example
To recall constant light scene 5 in scene block 2, across group 17, with a fade time of 90 seconds:

V:1,C:11,G:17,K:1,B:2,S:5,F:9000#

Now all i’ve got to do is learn how to make a binding that sends ASCII tcp packtets . :smiley:

1 Like

that’s some really good progress !

and I prefer TCP over UDP for such integrations

Now… all you need is: a developer who has a similar DALI system to start creating a Helvar binding :slight_smile:
(although I am sure that you can make it work with the existing TCP Binding)

Yes I made it work, but it produces some errors. But I can control the device and set the scenes. :slight_smile:

Sitemap:
Switch item=Dali label=“Dali” mappings=[ON=“ON”]
Switch item=Dali2 label=“Dali2” mappings=[ON=“ON”]
Switch item=Dali3 label=“Dali3” mappings=[OFF=“OFF”]

Items:
Switch Dali “Dali” {tcp=“>[ON:192.168.1.230:50000:‘>V:2,C:11,G:1,K:1,B:1,S:1,F:900#’]”}
Switch Dali2 “Dali 2” {tcp=“>[ON:192.168.1.230:50000:‘>V:2,C:11,G:1,K:1,B:1,S:3,F:900#’]”}
Switch Dali3 “Dali 16” {tcp=“>[OFF:192.168.1.230:50000:‘>V:2,C:11,G:1,K:1,B:1,S:16,F:900#’]”}

I’m not sure why, but you need the > in the string that is getting sent as well as in the beginning or it will not work.

08:43:41.265 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘Dali’ received command ON
08:43:41.759 [WARN ] [ding.tcp.protocol.internal.TCPBinding] - Cannot parse input >V:2,C:11,G:1,B:1,S:1,F:900# to match command ON on item Dali2
08:43:41.762 [WARN ] [ding.tcp.protocol.internal.TCPBinding] - Cannot parse input >V:2,C:11,G:1,B:1,S:1,F:900# to match command ON on item Dali
08:43:41.764 [WARN ] [ding.tcp.protocol.internal.TCPBinding] - Cannot parse input >V:2,C:11,G:1,B:1,S:1,F:900# to match command OFF on item Dali3

I’ve tried to create a mapping file with no luck.

default.map:

V:2,C:11,G:1,B:1,S:16,F:900#=ON
V:2,C:11,G:1,B:1,S:1,F:900#=ON
V:2,C:11,G:1,B:1,S:3,F:900#=OFF
ON=>V:2,C:11,G:1,K:1,B:1,S:1,F:900#
OFF=>V:2,C:11,G:1,K:1,B:1,S:16,F:900#

try to escape it with \ (or \\) not sure if it will work…

Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#`]"}

Nope does not work. Because i send ASCII characters Helvar will think that I am sending the \ character. But i think the problem is the reply from the server and not the transmission.
If i look at the error and use wireshark i see that it is the reply it’s complaining about.

Sending:

V:2,C:11,G:1,K:1,B:1,S:1,F:900#

Error:

V:2,C:11,G:1,B:1,S:1,F:900#

As you can see it is missing the “K:1” parameter in the string. When I analyze the transmission with wireshark i see that the string without the “K:1” parameter is the reply from the Dali router.

So i guess the problem is the handling of the response.

My opinion:
No, it shouldn’t be. openHAB2 does not care about the response. It doesn’t expect it.
It just sends an ASCII string to a TCP destination (one way comms). You need to see (with wireshark) if the ASCII message originating from OH2 is the same as the one that you originated and succeeded before (using a bash script?)

Here is the same command using Packet sender:
As you can see #3 is the packet i send to the Dali router, #2,1 is the response from the router.

the problem is the missing >

did you try to escape it with \ ?

I’ve tried this:

Produces an error:
Switch Dali “Dali” {tcp=">[ON:192.168.1.230:50000:’\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#’]"}
Switch Dali “Dali” {tcp=">[ON:192.168.1.230:50000:\’>V:2,C:11,G:1,K:1,B:1,S:1,F:900#’]"}

No error but it does not work. I see in Wireshark that the message is wrong:
Switch Dali “Dali” {tcp=">[ON:192.168.1.230:50000:’\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#’]"}
Switch Dali “Dali” {tcp=">[ON:192.168.1.230:50000:\’>V:2,C:11,G:1,K:1,B:1,S:1,F:900#’]"}

try with double escape (or even triple)

Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:'\\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#']"}
Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:'\\\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#']"}

what is the diff between the first 2 lines and the bottom 2 lines in your post above?

Ps: When posting configs, use Code fences

I see the forums does not like the the fore slashes :stuck_out_tongue:

first line is there are 1 fore slash. Second line is 2 fore slashes.

first two lines have the quote before the slash. Second have the quote after the slash.

Produces an error:
Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:'\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#']"}
Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:\'>V:2,C:11,G:1,K:1,B:1,S:1,F:900#']"}

No error but it does not work. I see in Wireshark that the message is wrong:
Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:'\\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#']"}
Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:\\'>V:2,C:11,G:1,K:1,B:1,S:1,F:900#']"}

time for a triple escape ! :slight_smile:

Careful with the position of the single quotes (')

Why do you have the single quote outside of the ]? this gives me a error.

Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:'\\>V:2,C:11,G:1,K:1,B:1,S:1,F:900#]'"}

By the way triple slashes does not work :stuck_out_tongue: the only way i get it to work is where it produses the parse input error :stuck_out_tongue:

typo… I edited the post above :slight_smile:

ok… .let’s try another trick:

Switch Dali "Dali" {tcp=">[ON:192.168.1.230:50000:'MAP(ASCII.map)'"}

install MAP transformation and use: /etc/openhab2/transform/ASCII.map

ON=>V:2,C:11,G:1,K:1,B:1,S:1,F:900#

play with escape chars :slight_smile:

Ok, I got it to work.
Had to escape the : as well as the >

Sitemap:

		Switch item=Dali1 label="Dali 100%" mappings=[ON="100%"]
		Switch item=Dali2 label="Dali 50%" mappings=[ON="50%"]
		Switch item=Dali3 label="Dali 0%" mappings=[OFF="0%"]

Items:

Switch Dali1 "Dali 100%"     {tcp=">[ON:192.168.1.230:50000:'MAP(Dali1.map)']"}
Switch Dali2 "Dali 50%"      {tcp=">[ON:192.168.1.230:50000:'MAP(Dali2.map)']"}
Switch Dali3 "Dali 0%"       {tcp=">[OFF:192.168.1.230:50000:'MAP(Dali3.map)']"}

Dali1.map

ON=\>V\:2,C\:11,G\:1,K\:1,B\:1,S\:1,F\:900#
\>V\:2,C\:11,G\:1,B\:1,S\:1,F\:900#=ON
\>V\:2,C\:11,G\:1,B\:1,S\:3,F\:900#=ON
\>V\:2,C\:11,G\:1,B\:1,S\:16,F\:900#=OFF

Dali2.map

ON=\>V\:2,C\:11,G\:1,K\:1,B\:1,S\:3,F\:900#
\>V\:2,C\:11,G\:1,B\:1,S\:1,F\:900#=ON
\>V\:2,C\:11,G\:1,B\:1,S\:3,F\:900#=ON
\>V\:2,C\:11,G\:1,B\:1,S\:16,F\:900#=OFF

Dali3.map

OFF=\>V\:2,C\:11,G\:1,K\:1,B\:1,S\:16,F\:900#
\>V\:2,C\:11,G\:1,B\:1,S\:1,F\:900#=ON
\>V\:2,C\:11,G\:1,B\:1,S\:3,F\:900#=ON
\>V\:2,C\:11,G\:1,B\:1,S\:16,F\:900#=OFF