Is it possible to create an app that has a web interface for external consumers?

As I am very pleased with Homey overall but REALLY disapointed with Insights, I’m thinking about creating a replacement. I realize there are apps for pushing Homey stored data to external data storage and work with is there, but that seems like “crossing the river to get some water” (an old swedish saying).

Is it possible to run an app on the homey that serve HTML to an external consumer? Simply running a small web server that renders anything based on Homey data? In that case you could (at least when connected to a local LAN or via a port forward from the outside) access the Homey from an browser and get a decent user experience when looking at sensor and state data.

Do anyone know if that would be possible?

The app Micro Web Server does just that (“running a small web server”).

To access the Insights data, you need to use the Web API.

1 Like

https://insights.homey.app/

Thanks, but the whole idea was to replace Insights since it really lacks in features. :slight_smile:

Short question: When was Insights launched? Could the limited featureset be because of a recent release?

Not sure, but it was changed, first it was just collecting and store data and data could be deleted after some time. Now data is collected at full speed but (if I understood it right) after 1 hour the data is “averaged” to save storage memory, after a day it is even more compresed.
So if you need detailed info, you have to save it within an hour.

1 Like

I cant use insights, still some bug somewhere in Homey. So I needed an altenative, and by just adding one raspberry pi with influxdb on it and Grafana, I create my own dasboards and combine information from mutiple sensors.

Only need the influxdb export app on the homey and all values are saved. Retension and compacting is now also possible but you are the one who choose when.

Grafana has a simple access system, dashboard can be as viewer only.

Examples:


1 Like

I like this! Do you have a “how-to” ?

2 Likes

Yes: DIY :wink: :slight_smile: But no, sorry thats a load of labor I cannot spare to writea How to.

In short:

  • Pi 3 or 4 with 32 or 64 GB highspeed microSD card.
  • Take a short DIN rail, Pi Dinrail housing and a 5V din power supply
  • Use a microUSB cable to cut off the USB-A connector and us it to power the Pi.
  • Use an ethernet cable to connect it to your home network. Wifi is also possible, but then you need to attache monitor and keyboard)
  • Download the light debian version and flash it to the microSD
  • Know how to use SSH terminal to Pi and an editor like vi, nano or vim.
  • Upgrade Debian to latest version (via ssh…)
  • Mount your Pi in a hidden place (thats the beauty of a dinrail unit).

Then just google for Install xxx on Pi and follow procedures.

  • Install InfluxDB v1 or v2 and configure it (including access control).

  • Make a database for metrics from homey with a retension policy (or more than one).

  • Open up the firewall in Pi to allow the right network port.

  • Install the InfluxDB app on the Homey, configure it and use a flow card to set export only for metrics and max every 30 seconds.

  • Install Grafana and configure it.

  • Open up the firewall in Pi to allow the right network port.

  • Start your browser to Grafana website and login as admin.

  • Configure your datasource to your InfluxDB database.

  • Create dashboards.

If needed I can share Grafana dashboards to have an idea what is possible, That is not too much work.

3 Likes