KNX Binding, Sitemap: Number Item is not send to bus


(David Ber) #1

Hello,

I have the problem, that a Number-Item is not send to the bus, when it is changed in a sitemap. When I send it over Karaf it was send to the bus. So I think, the channel and the item is correct?
Version: openHABian, openHAB 2.3.0-1 (Release Build)

Thing:

Type number : Ch_Hzg_Flur_EG_Temperatur_Soll "Hzg Flur EG Temperatur Soll" [ ga= "9.001:1/2/82+1/2/83" ]

Item:

Number:Temperature		Hzg_Flur_EG_Temperatur_Soll	"Solltemp Flur EG [%.1f °C]"		<temperature>	( gRaumtemp, gEG_Flur )					{ channel = "knx:device:bridge:generic:Ch_Hzg_Flur_EG_Temperatur_Soll" }

Sitemap:

Frame label="Solltemperaturen"
	{
		Setpoint item=Hzg_Flur_EG_Temperatur_Soll label="Flur EG [%.1f °C]" minValue=15 maxValue=30 step=0.5
	}

So whats wrong?
Thank you for your reply.

regards David


(Angelos) #2

Can you try with an Item type Number instead of Number:Temperature (just to eliminate this as a potential root-cause)

Number	Hzg_Flur_EG_Temperatur_Soll	"Solltemp Flur EG [%.1f °C]"	( gRaumtemp, gEG_Flur )	{channel="knx:device:bridge:generic:Ch_Hzg_Flur_EG_Temperatur_Soll"}
Frame label="Solltemperaturen"
{
	Setpoint item=Hzg_Flur_EG_Temperatur_Soll minValue=15 maxValue=30 step=0.5
}

Anything useful in the logs?

Ps: How to use code fences


(David Ber) #3

Hi,

yes, thats it. Thank you.
When i remove the :Temperature" it is working.
So is it a bug?


(Angelos) #4

No, I think that your Item configuration is wrong

I am not a heavy UoM (Unit of Measurement) user so I will call upon the expert here: @vzorglub to see if he can identify the configuration mistake :slight_smile:

I don’t even remember if UoM support was added in 2.3.0 Stable or later :stuck_out_tongue:


(Angelos) #5

can you try (but this shouldn’t be the problem…)

Number:Temperature	Hzg_Flur_EG_Temperatur_Soll	"Solltemp Flur EG [%.1f %unit%]"	( gRaumtemp, gEG_Flur )	{channel="knx:device:bridge:generic:Ch_Hzg_Flur_EG_Temperatur_Soll"}

and no label in your sitemap entry:

Setpoint item=Hzg_Flur_EG_Temperatur_Soll minValue=15 maxValue=30 step=0.5

(Vincent Regaud) #6

No, it’s not a bug: You need to add the QuantityType declaration in the thing definition
As I don’t use text things I don’t know how to do that…

Let me see

From the UoM Docs:

<channel-type id="temperature">
    <item-type>Number:Temperature</item-type>
    <label>Temperature</label>
    <description>Current temperature</description>
    <state readOnly="true" pattern="%.1f %unit%" />
</channel-type>

Try changing your Thing to:

Type number:temperature : Ch_Hzg_Flur_EG_Temperatur_Soll "Hzg Flur EG Temperatur Soll" [ ga= "9.001:1/2/82+1/2/83" ]

(Angelos) #7

I didn’t know that you can change the (KNX) Channel type to include UoM ! nice :slight_smile:

I have to read up on UoM more


(Vincent Regaud) #8

I don’t know either. I don’t use KNX. Let’s try it and see…


(David Ber) #9

I testet Dims suggestion and this is not working.


(David Ber) #10

I will try this


(David Ber) #11

This isn´t working.
But thank you very much for your answers.
In your answer with the UoM, there it is written:

<state readOnly="true" pattern="%.1f %unit%" />

Could it be that the state is readOnly and therefor it is not send to the bus. When I send it over Karaf, i say smarthome:send?

For me it would be Ok, when its working without Temperature:


(Vincent Regaud) #12

I am not sure.
It’s not the item definition and the sitemap. That works with other bindings just fine.
What we need here is a KNX specialist.


(Angelos) #13

I may be wrong, but this is what I have found out:
Most likely, the KNXv2 binding was developed prior to the introduction of the UoM functionality.
So… essentially you can’t use UoM with KNXv2 (yet)
The KNXv2 devs would have to refactor the Binding to add UoM support.

I have seen some examples of binding devs adding UoM:

  1. https://github.com/openhab/openhab2-addons/pull/4068
  2. https://github.com/openhab/openhab2-addons/pull/3846
  3. https://github.com/openhab/org.openhab.binding.zigbee/pull/197

edit: checks out… no UoM support in KNXv2 Channel types :frowning:
a) device.xml
b) MANIFEST.MF (no loading of javax.measure.quantity, org.eclipse.smarthome.core.library.dimension & org.eclipse.smarthome.core.library.unit


Ubiquiti Unifi Binding Feature Discussion
(David Ber) #14

Thank you very much for your research. Thats good work.

But the over way it is working: From KNX to OpenHAB. I test it with the Current - from the logs:

Spannungsversorgung_Messwert_Strom changed from NULL to 0.12576942145824432 mA

But i don´t create it for the channels, only for the items


(Angelos) #15

How is your Spannungsversorgung_Messwert_Strom Item (and associated Channel) defined?


(David Ber) #16

Item:

Number:ElectricCurrent	Spannungsversorgung_Messwert_Strom "Strom EIB Bus [%.1f mA]"	<pressure>	( gZF )		{ channel = "knx:device:bridge:Spg:Spannungsversorgung_Messwert_Strom" }

Channel:

Thing device Spg {
		Type number : Spannungsversorgung_Messwert_Strom "Spannungsversorgung Messwert Strom" [ ga = "14.019:0/0/3" ]
	}

(Angelos) #17

interesting :slight_smile:
I need to read up on UoM…