Dave10
(David Ber)
December 3, 2018, 7:22pm
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
Dim
(Angelos)
December 3, 2018, 7:37pm
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
Dave10
(David Ber)
December 3, 2018, 7:49pm
3
Hi,
yes, thats it. Thank you.
When i remove the :Temperature"
it is working.
So is it a bug?
Dim
(Angelos)
December 3, 2018, 7:54pm
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
I don’t even remember if UoM support was added in 2.3.0 Stable or later
Dim
(Angelos)
December 3, 2018, 7:56pm
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
vzorglub
(Vincent Regaud)
December 3, 2018, 8:01pm
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" ]
1 Like
Dim
(Angelos)
December 3, 2018, 8:03pm
7
I didn’t know that you can change the (KNX) Channel type to include UoM ! nice
I have to read up on UoM more
vzorglub
(Vincent Regaud)
December 3, 2018, 8:04pm
8
I don’t know either. I don’t use KNX. Let’s try it and see…
1 Like
Dave10
(David Ber)
December 3, 2018, 8:05pm
9
I testet Dims suggestion and this is not working.
Dave10
(David Ber)
December 3, 2018, 8:16pm
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:
vzorglub
(Vincent Regaud)
December 3, 2018, 8:28pm
12
Dave10:
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%" />
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.
Dim
(Angelos)
December 3, 2018, 8:36pm
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:
https://github.com/openhab/openhab2-addons/pull/4068
https://github.com/openhab/openhab2-addons/pull/3846
https://github.com/openhab/org.openhab.binding.zigbee/pull/197
edit: checks out… no UoM support in KNXv2 Channel types
a) device.xml
b) MANIFEST.MF (no loading of javax.measure.quantity
, org.eclipse.smarthome.core.library.dimension
& org.eclipse.smarthome.core.library.unit
Dave10
(David Ber)
December 3, 2018, 8:49pm
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
Dim
(Angelos)
December 3, 2018, 8:50pm
15
How is your Spannungsversorgung_Messwert_Strom
Item (and associated Channel) defined?
Dave10
(David Ber)
December 3, 2018, 8:53pm
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" ]
}
1 Like
Dim
(Angelos)
December 3, 2018, 8:54pm
17
Dave10:
Number:ElectricCurrent
interesting
I need to read up on UoM…