Tutorial to fix 401: Unauthorised Error with Grafana for mobile devices

Tags: #<Tag:0x00007fc4034dde78>

Hope this helps someone down the road.

First of all I am in no way an expert in any of these amazing software: InfluxDB, Grafana or Home Assistant.

Credit goes to the gifted minds of those applications that provide to us such amazing tools.

This is my guide to fix the 401 error on mobile devices. I’m a visual person, so that’s what you’ll
get.

Required:
1: Awesome Home Assistant
2: InfluxDB
3: Grafana
4: Hit = Clicking the mouse button :wink:

OK, lets rock:

In HA, navigate to Supervisor Tab and select Grafana.

Set these options in Configuration. I am using port 8182; but you can use any FREE port.

Save and restart addon.

Open your browser and navigate to your HA with the port you have set.

You should see this screen and it should be all downhill from here.

Click on the 4 boxes and select Manage. Select your dashboard.

Hit the share icon. Set options and copy link to notepad.

In HA select the 3 dots to Edit Dashboard.

Hit the + icon. Select options to suit yourself and Save.

Hit the + icon and select Webpage Card.

Paste the link from notepad and you should now be golden.

But wait there’s more …let’s pimp it up a bit… remember that link you have in Notepad. Add &kiosk to the link in the previous step.

The beauty of InfluxDB,Grafana and HomeAssistant on your mobile devices.

Enjoy. :+1:

8 Likes

Will this work for https (duckdns)?

Though I don’t think it is required in that case, the side panel ingress link works perfectly on mobile.

1 Like

Not sure image . Could you post some screens with/without duckdns so I can update OP.

I’m happy just using the side menu. It works on mobile.

Awesome. :ok_hand:

Thanks a lot, It was very helpful ! :+1:

2 Likes

It work for me, but only in local network. I do not view grafs from internet. In my oppinion it is not secure to use anonymous accees to grafana from whole internet.
You can make it work from anywhere:

  1. if you use https on HA (in duckduck cake you do so), you need to use https on grafana.
  2. You need to use port forvading on your router to grafana port

OK, works but looks like you have the “door closed” and use the window instead … to enter in HA

it works!

port forward router:
443 to 8123 tcp
and
80 to 3000 tcp
and grafana setings:

plugins: []
env_vars:
  - name: GF_AUTH_ANONYMOUS_ORG_NAME
    value: Main Org.
  - name: GF_AUTH_ANONYMOUS_ENABLED
    value: 'true'
  - name: GF_AUTH_DISABLE_LOGIN_FORM
    value: 'false'
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
1 Like

I created a login account on this community only to thank u!
This is the only solution that solved my issues with grafana on lovelace!
Thank you!!!

1 Like

No problem :+1: welcome to forum too.

I also created a login account on this community to thank you!
This was very useful, and worked. This problem was a thorn in my eye :wink:
Thanks a lot!

1 Like