Good point!
But i think homey has an internal dns server (dnsmasq ? ) for this
Good point!
But i think homey has an internal dns server (dnsmasq ? ) for this
Maybe the homey has - but thatās not being used by your device. Your device will be using whatever is configured on your network - which is probably one provided by your ISP.
On WSL2 I get
$ nslookup 172-16-0-159.homey.homeylocal.com
Server: 172.20.128.1
Address: 172.20.128.1#53
Non-authoritative answer:
Name: 172-16-0-159.homey.homeylocal.com
Address: 172.16.0.159
Here we can see my Windows installation is the DNS server - which in turn points to my router that forwards the request to the ISPs server - or another if youāve configured that.
Thanks
So router dns point to domain ip_with_undescore.homey.homeylocal.com and the domain return ip_with_underscore_replaced_by_dot?
v 0.240501.4
- Used the idea of @Amersfoort for convert base urlā¦Thankyou to @elestedt for fix the problem
- Added a preview of selected image
- Added url of selected image
Essentially yes. Unless thereās some certificate reason to use the hostname - just do the translation locally in your app instead.
Even better would be if it would be possible to use mDNS - or Bonjour if your an Apply fan - to resolve the IP. They donāt rely on servers, but on local UDP broadcasts.
Thankyou! For now use this as a workaround.
Iāll try to find a better alternative!
As a non-developer, sorry for my remark in advance: when I open een image on the Homey itself in Homey Developer Tools, the url of that image starts with https://192-168-2-40.homey.homeylocal.com/ . @diapolon is simulating this in the dynamic image functionality in SmartDash. Is that not the way to go? If no, how would you solve this in this case?
Is this only a problem when your internet connection is stuck. In the Netherlands, where I live, the uptime of internet is very high, but I donāt know if this is the case for other SmartDash users.
If youāre fine with it not working if internet is down, for whatever reason, then itās all good. For myself I got the Homey Pro partly because it works offline - to then have certain parts break if internet is unavailable doesnāt really make sense.
Iāve got a gigabit fibre connection at home that hasnāt been down in years - I still want it to work when the connection is down - for whatever reason.
Well, there were troubles some weeks ago to access Homey via their own app. And then we were still able to access our devices via Smartdash. So just one more benefit for local usage ;-).
Not sure how Ring works but probably you will not have a image of it when you not have a internet connection to show on SmartDash
to confirm; the picture is visible with HomeyImage on local-connection
Btw: for adding the preview in the widget
Finally it works!
This method is a workaround for accessing Homey internal images, for ring itās not a problem because it also need internet to work!
For others situation itās not correct way.
Unfortunately android and iphone limit connection without https: In android is possible to disable the control, with Apple not (like the unsecure certificates).
But a solution is possible, using the library witch i use for make local connection, the only problem is that i need to read image in memory and show it in base64 and if she is a big image the memory can end
limitation of Homey: Note: Images are limited to 5 MB. According to Images | Homey Apps SDK
But what you mean by big image
Eh eh depend of device, with nspanel pro 5MB can be big
Congrats @diapolon ! The local conection is the fastest.
The NSPanel Pro has 2GB RAM and 8GB ROM; I canāt find it for the first generation of NSPanel (the non-pro).
Using the latest SmartDash a bit, I have some minor suggestions:
Now on to the next developmentā¦ Is it never enough?
Trying to understand all these new image possibilities. My album cover for Sonos is working via the Homey image widget .
I also installed the Homey http/ftp server app to save the latest Camara snapshot on my Homey, which is working. But then I tried to show that picture and there thing arenāt working for me.
If I type http://192.168.2.151:8000/Temp.jpg in my browser i get the image. If I use the same url inside a virtual camera widget is shows an exclamation. Also tried it with the dashes.
Where am I doing things wrong?
You cannot use HomeyImage for this?? I guess you cannot use http (some posts back there are some comments about it)
The http/ftp server app is not showing in that list. Mainly (I guess) because it has nothing to do with the Homey image folder. For the http/ftp app itās saved somewhere else within Homey storage.
I looked for a way to save an image to the Homey image folder, but canāt find any info about that.
However, they are snapshots from Blink which is available via the Homey image widget. But I see a lot of snapshots there and I didnāt find out how I can always can get the latest snapshot. I will investigate this more.