KNX IP interface setup

Hopefully someone can help me out. I’m currently evaluating ‘The Home Remote’ and running into the following problem:

I’ve setup a KNX IP interface device in Home Remote Designer.


Then, as a child, I’ve added a KNX Variable with WriteAddress 3/0/0 and ReadAddress 3/0/1.
But I can’t get it to work.

I’m 99% sure that the KNX IP interface is working correctly because I am able to connect to it from ETS, Node RED and Home Assistant at the same time. The KNX IP Interface has 6 simultaneous tunneling devices. So I don’t think this is the cause.

I am able to setup a working Fibaro device on the same network.

If I start the debug function in Home Remote Designer I get each of the following mesages after the knx timeout: ‘Failed to get status for 3/0/0’ and ‘Failed to get status for 3/0/1’

I don’t know where to start searching and debugging.

All ideas are welcome.

Thanks !

Try increasing your Timeout. I’m looking at an old example I had used when building/testing the KNX integration & it looks like I was using 3000 ms. Those errors are basically saying it wasn’t able to read those addresses in the 1000 ms you have defined. Although for me, I was testing on a remote system thousands of miles away. If this is on your local network I’d think 1000 ms would be enough. Regardless, try increasing it to see if it helps.

Here’s the entire example you can look over.
KnxExample.hrp (4.7 KB)

Hi Bill,

Thanks for your reply.

3000ms is the default timeout when adding a KNX device. I already tried this value, but same negative result.
Also compared your example. Nothing different from mine…

Have you tried other ReadAddresses? Maybe it can read some of your other devices. I would definitely try as many addresses as you can. See if you can at least get this working for 1 address on your network.

If you want to set up port forwarding so I can try connecting remotely, maybe I can find out why it’s failing.

And try loading your project in the actual Android or iOS app. The Designer’s Simulator can be more prone to issues like this. PCs can have multiple network adapters, firewalls, etc. Networking issues like this are less common on Android & iOS tablets.

I’ve loaded the project in my Android device, and it worked right away. Did some further testing and everything seems to work fine for now :slight_smile:

Another question: What is the best appoarch to use tiles for KNX devices ? Since KNX devices are only variables of a KNX device source. It’s not possible to link a tile to such a variable.

The KNX integration doesn’t officially support Device objects yet. I’m still debating just how that should work & be configured. For the time being, what I recommend is creating a Plugin & adding a bunch of dummy/placeholder Devices to it. Then create a unique tile for each Device. You won’t be able to use the @Device templating features so you’ll need to reference your actual KNX variables.

Attached is an example.
KNX_Tiles.hrp (9.4 KB)

Thanks !

If I can help you out with KNX, just let me know ! Would be very nice to have KNX Device objects :slight_smile:

Question: How do get the value of the KNX Variable into a Capability Object of a KNX Device ? Is that done with a script assigned to a KNX Variable ? Can you provide me an example ?

Thanks !

Oops :grimacing:

There is a automatically generated script when adding a virtual device. But, never the less, some examples are welcome :wink:

Didn’t I just show you how to do this? Look closer at my last response & the example I shared. Use that plugin & script I shared. You don’t not need to add any code to that script. With that example, I showed you how to link the variable KnxSwitch1 to the KnxSwitch1Tile.xaml file. Just copy & paste that KnxSwitch1Device in the Plugin & create as many Device objects as you need. Then copy & paste KnxSwitch1Tile & create as many files as you need.

Clear, after reading twice I know what you ment. This methode works so far, but is far from ideal. Such as the @Device template would be very welcome.

I got some switches working now. And got a HAVC control up and running :partying_face:

Next device I’m struggling with is a RGBW LED:

  • The only available KNX DPT to use in this case is: 232.600 - RGB. But I need DPT 251.600 - RGBW :thinking:
  • The color wheel and -picker generates a 4-byte value. Does that represent a 24-bit RGB value ? Or RGBA ?
  • The value from the color pickers are HEX values. And the KNX DPT is a DEC value. What will be the best way to convert this ?

Thanks in advance !

The ColorWheel & ColorPicker controls use standard 7 character hex strings. Red for example is #FF0000. When writing to a KNX RGB address, the leading # is removed & the hex characters are converted to bytes.

Is there any chance you could split this into 2 values?

If you can, use RGB DPT 232.600 for the color & then any single byte DPT for the temperature (“5.010 - Unsigned count” for example). I’m pretty sure the RGBW DPT was intentionally excluded because it wouldn’t be compatible with the existing color controls which require separate Color & ColorTemperature fields. Those controls don’t work with a combined value.

In regards to @Device support, I’m certainly open to adding it. The reason it hasn’t been included is this. If you look at how Device objects are used with other integrations, Id & Capabilities are the core properties that define how they work. The most logical choice for a KNX device Id is its address. This will be fine for devices with only a single Capability, but what about devices that have multiple capabilities? That’s where the problem is. For example, your RGBW lightbulb probably also has on/off & dimming control. Ideally we’d want all of those Capabilities on a single Device object & not spread across multiple. This is something I need to think about. I’m certainly open to any suggestions.

I was able to split the RGB and W values on the KNX device side. So I have DPT 232.600 for the RGB value and 4x DTP 5.001 for the seperate R, G, B and W values :smiley:

But there’s another issue with the RGB value. When I pick a color on the wheel I get the message “232.600 RGB: invalid color: #xxxxxx” See attached screenshot. Happens on both the simulator and a real Android device.
Controlling the knx RGBW device with the individual sliders works excellent.

When I project the actual RGB value read from the KNX device as text on the screen it displays it in the followng syntax:“r:171 g:61 b:123”

Hopefully you can help me out.

After taking a closer look, I don’t think you’re going to be able to get it working with either of the color controls. I think it’s going to require that exact same “r:171 g:61 b:123” syntax for writes. I’m honestly not sure why that syntax was chosen. Standard hex is used by every other lighting device. It’s been a few years since I worked on that part of the KNX integration. I’ll try to find a solution for you in the next week or so.

According to the KNX Datapoint Types documentation it is just a binary coded value. So direct writing the hex value should be obvious :thinking:

Thanks for thinking along, and I’ll work out my HAVC control tile in the mean time.

Have a nice weekend !

I just published Designer version 3.12.1.1 to thehomeremote.com This will use the standard hex representation for this DPT. Please test in the simulator to see if this works.

The fix has not been submitted to the app stores yet. I just started rolling out the 3.12.1.0 updates to the stores yesterday so this change was a day late. It’ll most likely be in either the next 3.13.0 or 3.12.2 release which could be a week or 2.

First shot: Is it an option to link every Device Capability to/as a KNX variable ? And the Device Id as a random unique number.
In that manner the core properties can stay in tact. And you can access KNX adresses from multiple devices :smiley:

Works excellent in the Designer. Thanks ! Please let me know when this will be rolled out in the app stores.

  • Can you please add KNX DPT 20.102 “HVAC Mode” ? Of course I got it working with a byte value trough DPT 5.010, but it’s better to use things as the are designed for :wink:

  • When I use the app everything works fine. But when I put my phone away for, let’s say, 30min, and re-open the app the behavior is inconsequent. Sometimes the KNX data is instant available. Sometimes it takes 10s. Sometimes the message ‘Failed to stop KNX’ pops up and I have to kill the app and re-open it.
    Is there a work around methode to fix this ?

  • Minor detail: There is an inconsistency with using capitals. For example DPT 1.001: The KNX specs says “On” or “Off”, but the syntax for conditional statements in the Designer is without capitals “on” or “off”. While build-in templates of other devices do use capitals in the statements :thinking:

Thanks for your help !

  1. I can probably add support for KNX DPT 20.102 “HVAC Mode” to a future release.
  2. Your tablet’s network adapters go to sleep after long periods of inactivity. As mentioned in the post below, the app will wait for the adapter to report back online status. Otherwise, it’ll wait 10 seconds & force reconnect.
  3. That would be a breaking change to switch the casing & there are a lot of people using theat DPT. I’ll probably need to create a new DPT. Either that, or I’ll wait until I implement Device Objects.

The next 3.13.0 release will have some changes to help fix the “Failed to stop KNX” error. I found a few places that could be triggering the error. You shouldn’t have to kill & reopen the app with 3.13.0 once it’s released.