Micro Web Server
This app turns your Homey into a basic WebServer for your local network.
What? Yes, a WebServer!
There are some use cases where you simply do not want to run another device just to serve a few resources by http.
The app runs a WebServer locally on Homey. This WebServer is not reachable from Internet.
You can use it to host basically any resource you need in reach on your local network. Like a sound file used by another app. Or even a web page.
Warning and Disclaimer
Whilst you could basically make the Homey hosted WebServer public on the internet using port forwarding, I highly recommend not to do that. The app is not meant to serve tons of requests from random people.
Also, I am not responsible for the content you are hosting with it, nor for any possible harm one could do to your Homey by abusing it.
To get started, go into the app settings and start the integrated ftp server. Whilst the ftp server is running you can manage the content of your Homey WebServer with basically any ftp client.
Step 1 - Getting Ready for File Uploads
First thing to do after installing is provide some content to be hosted.
To get files onto the Homey we need to start the ftp server of the app. For security reasons it is not running by default.
Open the settings of the app. It should look somewhat like this:
After the ftp server is started you should see the ftp address:
Step 2 - Connect The FTP Client
Upload your files. Am using FileZilla here as it has proven to work nicely.
Open FileZilla and connect using the hostname shown after ftp:// (or your Homey’s IP) for the Host setting. The default port is 5081 and for login you need to use anonymous authentication:
Step 3 - Upload Files and Test
After uploading the files you can address them by using the http address shown on the app’s settings page.
Let us assume you just uploaded a giggle.mp3 file. The address would be: http://homey-YourHomeyId:5080/giggle.mp3
You can create or upload directories as well. If you open a directory url in your browser instead of pointing to a dedicated file, the app will automatically look for an index.htm or index.html file. Other default index files are currently not supported.
A WebTrigger was received
WebTriggers are basically WebHooks which are available, by this WebServer, on your local network only.
- ‘Respond to Trigger Name’ defines the name of the trigger to react to.
The WebTrigger can carry up to 5 payloads which are made available as tokens to the flow being run. Each payload as 3 representations as follows:
- ‘Trigger Data # (as text)’
- ‘Trigger Data # (as number)’
- ‘Trigger Data # (as boolean)’
In addition the trigger name is available in the flow as text value:
- ‘Trigger Name’
The WebTriggers are basic HTTP GET requests sent to the WebServer.
URL Example: http://homey-YourHomeyId:5080/webTrigger?name=MyTrigger&data1=MyTriggerData
Please note that the URL parameters are case sensitive.
The parameter ‘name’ defines the trigger name. It is the name you enter as arguement in the flowcard. The ‘data’ (data, data1, data2, data3, data4, data5) parameters are optional. The parameter ‘data’ is just an alias for ‘data1’.