You mean the dash_url? The only thing that might be related is I added your fix to get the URL from the browser instead of that line. But I still want to understand what broke so I can give a more informative message, so could you describe in a little more detail please?
Sounds like an initialization error - what browser are you using?
I was using 192.168.2.26:5050/hello to load the page and was getting the error we were talking about. I changed it to http://haweb:5050/hello and it works.
I’m using chrome for MAC
When you had the error, did you have “http://” at the start of the URL? If not you shbould have got a startup error. I am testing now on my MAC.
Edit: Nevermind I misunderstood what you were saying.
What’s your dash_url set to?
I can reproduce the behavior with my dash_url set to the IP and then using the hostname in the browser.
Not the initial error you were getting, but the bit about the icons.
OK thanks Rob, I reproduced it too - you both should be seeing JavaScript errors in the console.
For now the fix is to keep the URLs the same - I’ll look into a different fix but I may not fix it as it would be circumventing an intentional security measure. Instead maybe I’ll pop up a warning.,
I agree as this is working as intended.
The issue was way more trivial … I have changed the cfg file but forgot to restart the daemon :-). After restarting the deamon it looks like this
2017-03-12 10:34:46.565247 INFO Got initial state
2017-03-12 10:34:46.568428 INFO Loading Module: /conf/apps/hello.py
2017-03-12 10:34:46.579606 INFO Loading Object hello_world using class HelloWorld from module hello
2017-03-12 10:34:46.940198 INFO hello_world: Hello from AppDaemon
2017-03-12 10:34:46.949318 INFO hello_world: You are now ready to run Apps!
2017-03-12 10:34:46.950147 INFO App initialization complete
2017-03-12 10:34:46.972422 INFO Connected to Home Assistant 0.40.0
This is a side effect of changing the URL to a dynamically grabbed one from the browser. The old behavior would be to use the exact URL specified in the config so this would never have happened. Although this way is more versatile and I will keep it in, it is now mandatory to use a consistent URL between the config and the browser.
Careful what you ask for @turboc
OK, next version will have an error popup telling you to check the Javascript console if this happens again
Finally,
My mac got a spinning beach ball and I had to reboot a couple of times.
dash_url = http://192.168.2.26:5050
dash_dir = /home/pi/appdaemon_dashboard/appdaemon/conf/dashboards
It now seems to be working with the IP address correctly, but using the hostname now, doesn’t show the Icon unless you click on it first. (see Landing Light below)
Any errors on the JavaScript console?
Yes, this is the same issue. They have to match or you run into security errors intended to stop cross site scripting. So, if you use the IP in the config you have to use it in the browser too.
Got it. So if I come in from remote using the IP remote IP address, how does that work?
If I standardize on IP addresses, then my dash_url would be
dash_url = 192.168.2.26
But my browser would be coming in from 100.200.300.400 (random external IP address)
Or do I have to make an external host name the same as my internal name so that I go to
haweb:5050 from remote?
This would be the best approach I think.
Oh by the way, cover widget works great. Thanks so does the iframe
Excellent - I’ll call that a triumph since I don;t even have one - the lock was rather tricky for some reason but I had Rob to test that for me
Hey, the values are showing up on my input sliders today!!! Great!!!
I think it might have been the same issue all along, although I did rewrite the input_slider.