Frends,
I’d like use config to setup Grafana url in custom widget:
but it’s not working. Maybe sombody have some idea?
Frends,
I’d like use config to setup Grafana url in custom widget:
but it’s not working. Maybe sombody have some idea?
I don’t have the answer you seek but I moved this to a more appropriate category.
What’s not working?
You should just be able to call the image from the grafana share or using an iframe, call the interactive graph.
C
When i use iframe its correct:
![]()
But i need to use Configuration instead of static url. In this case its not working:
![]()
I’ve also some problem with the embeding grafana to oh-webframe.
Platform information:
Issue of the topic:
In Grafana, I’ve defined a dashboard. It is correctly rendered there
I want to embed it into OpenHab
I select the embed option in the dashboard
The url is then
<iframe src="http://localhost:3000/d-solo/adlzsgl/electricity-counter-inout?orgId=1&timezone=browser&refresh=30s&panelId=panel-1&__feature.dashboardSceneSolo=true" width="450" height="200" frameborder="0"></iframe>
I select the following part+ change the localhost into openhabian5 (the raspberry PI5)
http://openhabian5:3000/d-solo/adlzsgl/electricity-counter-inout?orgId=1&timezone=browser&refresh=30s&panelId=panel-1&__feature.dashboardSceneSolo=true
This link pasted in firefox gives the right grafana page –> the link is valid and reconginzed by grafana
When I paste it in an oh-webframe it doesn’t work (page empty). No error message nothing .
component: oh-canvas-item
config:
x: 73
y: 48
h: auto
w: auto
slots:
default:
- component: oh-webframe-card
config:
title: Electricity Counter
borders: true
noBorder: true
footer: trial
noShadow: true
outline: true
src: http://openhabian5:3000/d-solo/adlzsgl/electricity-counter-inout?orgId=1&timezone=browser&refresh=30s&panelId=panel-1&__feature.dashboardSceneSolo=true
Configurations:
Does it work if you put kiosk in the line:
src: http://openhabian5:3000/d-solo/adlzsgl/electricity-counter-inout?kiosk&orgId=1&timezone=browser&refresh=30s&panelId=panel-1&__feature.dashboardSceneSolo=true
Just tried, no improvement
Just taken a capture of the traffic with wireshark.
In both case (webbrowser and openhab) the 2 last requests are the same and the data send back is identical
----
# Packet 18 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 659
- 10.748946
- 192.168.1.15
- 192.168.1.21
- HTTP
- 717
- GET /api/public/dashboards/249d87516c2c4463b81ba1b19e9d795f/annotations?from=1761656000368&to=1761677600368 HTTP/1.1
----
# Packet 19 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 668
- 10.761364
- 192.168.1.21
- 192.168.1.15
- HTTP/JSON
- 254
- HTTP/1.1 200 OK , JSON (application/json)
----
# Packet 20 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 698
- 10.824331
- 192.168.1.15
- 192.168.1.21
- HTTP/JSON
- 945
- POST /api/public/dashboards/249d87516c2c4463b81ba1b19e9d795f/panels/1/query HTTP/1.1 , JSON (application/json)
----
# Packet 21 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 740
- 10.856455
- 192.168.1.21
- 192.168.1.15
- HTTP/JSON
- 607
- HTTP/1.1 200 OK , JSON (application/json)
The difference is that for openhab these are the two only requests. For the webbrowser that is a protocol in advance of get which seems to give how the final data (JSON) must be interpreted
----
# Packet 4 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 505
- 10.273191
- 192.168.1.15
- 192.168.1.21
- HTTP
- 622
- GET /public-dashboards/249d87516c2c4463b81ba1b19e9d795f HTTP/1.1
----
# Packet 5 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 569
- 10.353023
- 192.168.1.21
- 192.168.1.15
- HTTP
- 430
- HTTP/1.1 200 OK (text/html)
----
# Packet 6 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 592
- 10.607679
- 192.168.1.15
- 192.168.1.21
- HTTP
- 698
- GET /api/live/ws HTTP/1.1
----
# Packet 7 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 595
- 10.614421
- 192.168.1.15
- 192.168.1.21
- HTTP
- 661
- GET /api/plugins/grafana-exploretraces-app/settings HTTP/1.1
----
# Packet 8 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 597
- 10.614699
- 192.168.1.15
- 192.168.1.21
- HTTP
- 659
- GET /api/plugins/grafana-lokiexplore-app/settings HTTP/1.1
----
# Packet 9 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 609
- 10.623082
- 192.168.1.21
- 192.168.1.15
- HTTP/JSON
- 444
- HTTP/1.1 200 OK , JSON (application/json)
----
# Packet 10 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 615
- 10.623412
- 192.168.1.15
- 192.168.1.21
- HTTP
- 664
- GET /api/plugins/grafana-metricsdrilldown-app/settings HTTP/1.1
----
# Packet 11 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 616
- 10.623557
- 192.168.1.15
- 192.168.1.21
- HTTP
- 657
- GET /api/plugins/grafana-pyroscope-app/settings HTTP/1.1
----
# Packet 12 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 617
- 10.623801
- 192.168.1.21
- 192.168.1.15
- HTTP
- 183
- HTTP/1.1 101 Switching Protocols
----
# Packet 13 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 621
- 10.628597
- 192.168.1.21
- 192.168.1.15
- HTTP/JSON
- 335
- HTTP/1.1 200 OK , JSON (application/json)
----
# Packet 14 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 625
- 10.630158
- 192.168.1.21
- 192.168.1.15
- HTTP/JSON
- 233
- HTTP/1.1 200 OK , JSON (application/json)
----
# Packet 15 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 628
- 10.630375
- 192.168.1.21
- 192.168.1.15
- HTTP/JSON
- 959
- HTTP/1.1 200 OK , JSON (application/json)
----
# Packet 16 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 640
- 10.649739
- 192.168.1.15
- 192.168.1.21
- HTTP
- 669
- GET /api/public/dashboards/249d87516c2c4463b81ba1b19e9d795f HTTP/1.1
----
# Packet 17 from C:\Users\didie\AppData\Local\Temp\wireshark_EthernetKH1EF3.pcapng
- 647
- 10.659452
- 192.168.1.21
- 192.168.1.15
- HTTP/JSON
- 200
- HTTP/1.1 200 OK , JSON (application/json)
So the question is there an add-on or a configuratio which make the oh-webframe or requestinfg the right thing to grafana or interpret the grafana JSON correctly.