Micro Web Server
This app turns your Homey into a basic WebServer for your local network.
App Store: Micro Web Server
Frequently Asked Questions
Change Log
Supported Languages
English
German
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 a full web page even.
Got your own Homey Dashboard written in html and javascript? Let it be served by home itself.
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.
Getting Started
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:
And connect.
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
About Directories
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.
Available Flowcards
Triggers
A WebTrigger was received
WebTriggers are basically WebHooks which are available, by this WebServer, on your local network only.
Arguements
- âRespond to Trigger Nameâ defines the name of the trigger to react to.
Tokens
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â
Usage
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â.
An advanced WebTrigger was received
WebTriggers are basically WebHooks which are available, by this WebServer, on your local network only.
Arguements
- âRespond to Trigger Endpointâ defines the endpoint of the trigger to react to. The base path is â/webTriggerAdv/â, so you can define as many endpoint as you like. Examples: /webTriggerAdv/MyTrigger, /webTriggerAdv/MySpecialTriggers/Trigger1, âŠ
- âOptional: Respond to specific method onlyâ: By default the trigger card responds to any request (GET, PUT, POST; DELETE, PATCH) send to your endpoint. But you can optionally limit it to listen for a specific method only.
Tokens
The advanced WebTrigger provides access to following data of the request:
- âTrigger Endpointâ (text) - The endpoint name after /webTriggerAdv/.
- âMethodâ (text) - The HTTP method used.
- âRequest has Bodyâ (boolean) - Whether the request has a body data.
- âRequest has Json Bodyâ (boolean) - Whether the request has a json data body available.
- âJson parsing error messageâ (text) - This field defaults to âNo Errorâ. It will hold the error message if the requests body could not be parsed to a json object.
- âRaw trigger payload dataâ (text) - The raw data object of the trigger flowcard. You could already use this but there is an action flowcard for advanced flows which provides you with easy access to the triggers data.
Usage
The WebTriggers are basic HTTP GET requests sent to the WebServer.
URL Example: http://homey-YourHomeyId:5080/webTriggerAdv/aTriggerName?queryValue=something&someOtherQueryValue=somethingElse
Please note that the URL parameters are case sensitive.
Actions
Get data from advanced trigger payload
This action is available in advanced flows only and provides easy access to any data received from the webhook.
Arguements
- âTrigger payload token to useâ: The flow token (Raw trigger payload data token) provided by the trigger flowcard to be used.
- âData sourceâ: Where to look for data. This can either be the requestâs header fields, the url query parameter fields or the requestâs json body data.
- âData Field to extractâ: The name or path of the data field to extract. In case of the headers (mind that header field names often are lower case automatically) and url query fields you just use the name of the field here. For the json body you can address nested fields with the dot syntax (Example: MyObject.MyObjectValue). You can also access individual array elements using the bracket index syntax (Example: MyArray[23]).
Tokens
The card emits flow tokens for the extracted field:
- âTrigger Data (as text)â
- âTrigger Data (as number)â
- âTrigger Data (as boolean)â
Usage
Here is a very basic advanced flow example to give you a better idea of how it works:
This flow would now react to a request like this: