Simon87
(Simon)
February 10, 2023, 3:19pm
1
Platform information:
Hardware: synology nas →
OS: docker image
openHAB version: 3.4.1
Hey guys,
I am grabbing my solarplant values from openDTU API.
That is working and looking fine.
BUT! I got no idea why the values/state is not shown in the basic ui (iOS App…)
Screens:
Doenst work cause I am a new user
Anybody any idea? I got this already running by using grabbing data via mqtt. But i thought API will be smarter and total-values are only to be grabbed by api. So i switched to api…
THANKS
rlkoshak
(Rich Koshak)
February 10, 2023, 4:02pm
2
Post the Item configuration and the sitemap entry showing the Item.
Simon87
(Simon)
February 13, 2023, 9:12am
3
Hey,
Page:
Group icon="sun_clouds" item=openDTU label="openDTU" {
Default icon="switch" item=Generic_MQTT_Thing_Status label="Status"
Default icon="time" item=openDTUapi_StatusUptime label="Uptime"
Default icon="qualityofservice" item=Generic_MQTT_Thing_WiFi_network_quality label="WLAN-Signal"
Default icon="temperature" item=openDTUapi_BalkonTemperature label="Balkon-Temperatur"
Default icon="solarplant" item=openDTUapi_BalkonPower label="Balkon-Power"
Default icon="batterylevel" item=openDTUapi_BalkonYieldDay label="Balkon-Heute"
Default icon="calendar" item=openDTUapi_BalkonYieldTotal label="Balkon-Gesamt"
Default icon="temperature" item=openDTUapi_Garage1Temperature label="Garage1-Temperatur"
Default icon="solarplant" item=openDTUapi_Garage1Power label="Garage1-Power"
Default icon="batterylevel" item=openDTUapi_Garage1YieldDay label="Garage1-Heute"
Default icon="calendar" item=openDTUapi_Garage1YieldTotal label="Garage1-Gesamt"
}
Thing:
UID: http:url:f83344954a
label: openDTUapi
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: http://192.168.1.222/
delay: 0
stateMethod: GET
refresh: 30
commandMethod: GET
contentType: application/json
timeout: 3000
bufferSize: 2048
channels:
id: openDTUtotalYieldTotal
channelTypeUID: http:number
label: TotalYieldTotal
description: “”
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.total.YieldTotal.v
id: openDTUtotalYieldDay
channelTypeUID: http:number
label: TotalYieldDay
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.total.YieldDay.v
id: openDTUtotalPower
channelTypeUID: http:number
label: TotalPower
description: null
configuration:
mode: READONLY
unit: W
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.total.Power.v
id: openDTUBalkonPower
channelTypeUID: http:number
label: BalkonPower
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[0].0.Power.v
id: openDTUBalkonYieldDay
channelTypeUID: http:number
label: BalkonYieldDay
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[0].0.YieldDay.v
id: openDTUBalkonYieldTotal
channelTypeUID: http:number
label: BalkonYieldTotal
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[0].0.YieldTotal.v
id: openDTUGarage1Temperature
channelTypeUID: http:number
label: Garage1Temperature
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[1].0.Temperature.v
id: openDTUGarage1Power
channelTypeUID: http:number
label: Garage1Power
description: null
configuration:
mode: READONLY
unit: W
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[1].0.Power.v
id: openDTUGarage1YieldDay
channelTypeUID: http:number
label: Garage1YieldDay
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[1].0.YieldDay.v
id: openDTUGarage1YieldTotal
channelTypeUID: http:number
label: Garage1YieldTotal
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[1].0.YieldTotal.v
id: openDTUBalkonTemperature
channelTypeUID: http:number
label: BalkonTemperature
description: null
configuration:
mode: READONLY
stateExtension: api/livedata/status
stateTransformation: JSONPATH:$.inverters[0].0.Temperature.v
id: openDTUStatusUptime
channelTypeUID: http:number
label: StatusUptime
description: null
configuration:
mode: READONLY
stateExtension: api/system/status
stateTransformation: JSONPATH:$.uptime
Item:
“openDTUapi_Total_kWh”: {
“class”: “org.openhab.core.items.ManagedItemProvider$PersistedItem”,
“value”: {
“groupNames”: [
“openDTU”
],
“itemType”: “Number”,
“tags”: [
“Point”
],
“label”: “Gesamtertrag Insgesamt”,
“category”: “”
}
},
“openDTUapi_YieldDay”: {
“class”: “org.openhab.core.items.ManagedItemProvider$PersistedItem”,
“value”: {
“groupNames”: [
“openDTU”
],
“itemType”: “Number”,
“tags”: [
“Point”
],
“label”: “Gesamtertrag Heute”,
“category”: “”
}
}
rlkoshak
(Rich Koshak)
February 13, 2023, 3:43pm
4
When posting code and logs, please use code fences.
```
code fences
```
Especially in YAML, the spacing matters.
Simon87:
label="WLAN-Signal"
You’ve told it to not show the Item’s state.
From the sitemap docs:
label
sets the textual description displayed next to the preprocessed Item data (e.g. “Now [%s °C]
”), more details .
1 Like
Simon87
(Simon)
February 13, 2023, 8:11pm
5
Many many thanks!
Now it is working.
Okay thats is making now sense. But I am still wondering why all my other items did need the label to show me some values inside the iOS app
Group icon="sun_clouds" item=openDTU label="openDTU" {
Default icon="time" item=openDTUapi_StatusUptime label="Uptime [%s]"
Default icon="temperature" item=openDTUapi_BalkonTemperature label="Balkon-Temperatur [%.1f °C]"
Default icon="solarplant" item=openDTUapi_BalkonPower label="Balkon-Power [%.2f W]"
Default icon="batterylevel" item=openDTUapi_BalkonYieldDay label="Balkon-Heute [%.2f Wh]"
Default icon="calendar" item=openDTUapi_BalkonYieldTotal label="Balkon-Gesamt [%.2f kWh]"
Default icon="temperature" item=openDTUapi_Garage1Temperature label="Garage1-Temperatur [%.1f °C]"
Default icon="solarplant" item=openDTUapi_Garage1Power label="Garage1-Power [%.2f W]"
Default icon="batterylevel" item=openDTUapi_Garage1YieldDay label="Garage1-Heute [%.2f Wh]"
Default icon="calendar" item=openDTUapi_Garage1YieldTotal label="Garage1-Gesamt [%.2f kWh]"
}
rlkoshak
(Rich Koshak)
February 13, 2023, 8:18pm
6
The []
part of the label tells it to and how to show the Item’s state. This can be defined on the Item or on the sitemap. When defined both places, the sitemap label takes precedence. When only defined on the Item, that Item label gets used.
1 Like