[App][Pro] Micro Web Server

Pro users really should know about such actually :smiley: but thanks for the hint. Also if the local name resolution is not working then there is most likely an issue with your router. That just on a side note.

Hey Sakesbeard, the FTP Client is in the Store now!
And it works great with your FTP Server!

3 Likes

I canā€™t get this to work. Iā€™ve downloaded FileZilla on to my Mac, connected with the IP left user and password blank (or with anonymous) and I can see that there is no files and when I try to add a file it says that I do not have permission.

Iā€™m using the pro 2023.

Is that the issue?

This might be a bug. I got the feeling that they have changed how the userdata folder is handled again.
I need to investigate this.

Yeah, same issue here, indeed something todo with the userdata location.

The ftp should now work again for both Homey Pro generations as soon as you get the v2.0.6 update.

1 Like

Awesome idea this here, for hosting audio files and keeping it all on the local network. And it works!

I have been back and fourth many times now. A few setbacks, but then I got in using Filezilla and uploaded files. Then a few more setbacks, but then I got the file playing in the browser (at http://ā€¦mp3) as if it was on the web.

But no matter if I use cast audio URL or cast website in a flow, it wonā€™t play on my Google Home. This has been mentioned a few times in the thread. Does anyone have a workaround?

(I can cast my tab, when opened in Chrome, to the Google Home, so the file is playable)

Edit: Did a simple test just now. Successfully casted an mp3 from web, downloaded the file, uploaded to MWS. Replaced the URL in flow. Doesnā€™t work. Google Home plings twice, then nothing. :tired_face:

Edit2: Working. I locked my Homeyā€™s IP address, and used the URL (http://[IP]:[port]/file.mp3) with Cast website. Cast website isnā€™t recognized as playback, so the play/pause isnā€™t working as usual, but will look into it further.

Did you already solve the problem?
Here also a mp3 (ā€œcast websiteā€ in a flow), wonā€™t play on my Google mini speaker. The Google speaker plings twice, then nothing.
It seems not to be a problem of the Micro Server. A direct weblink to a MP3 with ā€œcast websiteā€ wonā€™t even play.

Who have the solution?
(Homey Pro 2023)

No, at the moment I host the file on my web server, and cast it from there. Works fine. Have to restart the Chromecast app every few weeks if it starts failing.

Sent email to dev a while ago, he might be on vacation still.

Quite a weird issue.
What I can tell for certain is that it worked as sound file playback long ago. It broke at some point when the chromecast app got updated. After that it only worked when using play as website.
I have never found out why it broke. But I might touch up the app with some maintenance update this winter. If I find the time I will look into this issue again.

Update Time!

v2.1.1 is about to be released, introducing advanced trigger functionality to support GET, POST, PUT, DELETE and PATCH requests on your local network. It also brings in a special advanced flow card to easily access the individual data fields of your payload.

4 Likes

Update Time

v2.2.0 is rolling out. This is just a minor but yet powerful update. The data retrieval flowcard for advanced webhooks now also supports array access.

Really nice App. But how do I make it play the file only 1 time?
When I cast a Sonos URL, it plays in a loop over and over. When I used Google TTS, you could hear music on the speaker, it paused when there was a TTS and resumed the music after it was played.

That highly depends on how your playback device works. This app only stores and serves files. There is no logic for the playback in place.

I am using the Dashboard App of @skogsaas. In this one, I have added a ā€œiFrameā€ Widget to display an html web page (with some javascripts).

I wanted to host that html web page on your Micro Web Server, so my dashboard runs 100% locally. Unfortunately, the page can be displayed in the ā€˜iFrameā€™ only if it is accessed via https.

If not mistaking, https is not (yet) supported by Micro Web Server. Is it ?

The error when trying to access resources on http instead of https from the Dashboard is
Mixed Content: The page at 'https://<MY IP>.homey.homeylocal.com/app/skogsaas.dashboards/assets/dashboard/board/?id=264d66e2-cdd0-4f62-8823-426e124f3b3e' was loaded over HTTPS, but requested an insecure resource 'http://<My IP>:5080/weather.html'. This request has been blocked; the content must be served over HTTPS.

Yeah, the thing is with the certificate. Maybe @skogsaas can give me hint how to handle that properly for Homey or how they tackled this, then I could possibly at this rather easily.

Hello :wave:
Iā€™m not actually doing anything special to handle certificates, Homey is doing all the heavy lifting for me.

As you can see in the error message you posted:
https://<MY IP>.homey.homeylocal.com/app/skogsaas.dashboards/assets/dashboard/board?...
The URL starts with Homeyā€™s way of fixing a local DNS name and secure it with a certificate. After that thereā€™s an app folder for all apps, in which you find an folder for my app skogsaas.dashboards. This folder contains all files for my app, including all assets I included during development.
And thatā€™s it. Homey hosts everything for me :sunglasses:

In your case, you wonā€™t manage to do this as long as you host your own web server on a separate port. It could possibly be done if you implement a proxy server as an public API endpoint in your app :thinking:

Ahh true yeah, I didnā€™t realize that when I read the original error. I never went that route because I was afraid Homey does not handle the mime types properly. But this certainly is worth a try. I will put it onto the TODO list.

1 Like

@Shakesbeard provided me a great trick to access, via https, my static page (stored in Web Serverā€™s repository). Use the following url:

https://<My IP>.homey.homeylocal.com/app/com.sdn.webserver/userdata/files/<my page.html>

Working fine :slight_smile:

1 Like

Iā€™m trying Elevenlabs text-to-speech (in mp3 file format and in mp3 streaming format) on Homey 2023 advanced flow. The result with Micro Web Server is a few byte file content, which is obviously not a valid mp3. The only option I see is the card to save a file(base64), or is this only for images?

How can I play the mp3 on Sonos or Google Chromecast using a needed file URL.

The POST result is bigger than a few bytes:

(Yes, this is the same post as in FTP client, because I donā€™t know where my question belongs to)