@sawtaytoes said in Running custom apps on the Flic Hub:
I think you're onto something @stuart. I could see where that'd be useful. You'd still have to have a centralized server for your configuration settings, but you'd manage that yourself and the Flic hub is literally just that, a dumb hub. No matter what happens to any button, it sends an HTTP request in a specific format to a certain address. That gives you all the power you need, and you can control everything from a Raspberry Pi or even an ESP8266.
In this way (provided I understood you), you lose the Flic app connections to 3rd party manufacturers and have to roll your own solutions.
Yes, that is exactly what I am proposing.The solution I have set up consists of a hub with 8 buttons, each configured with a URL which calls the micro-service using the URL noted before. Then te hub is essentially dumb and I can run what I want. It would be ideal to run this simple web service as a docker within the hub as that provides the security that Flic want whilst giving me the flexibility to do what I want.
For now I am running the prototype on a VM but will probably move to a container if I start to use it for anything important.
I have my own solutions too, but I'd prefer to do everything through the official app (provided I'm understanding you). I'm sure that's the intention on Flic's end as well. My friends and family wouldn't be able to use a Flic hub and do the same things as me if they have to flash a Raspberry Pi with my own custom software that they now have to maintain.
Yes, but once you have set up the micro-service to run some scripts, there is no reason that this would need maintaining if the requirement doesnt change (depending on your coding skill level). Users could easily share their own scripts and recipes as well.
A significant benefit of this is that it will still work even if you have no internet connection.
I can share the micro-service on Github if you like. It is rudimentary but works and is easily extensible.
Because of the current limitation of mobile-only configuration; why not allow uploading a JSON config file? I can generate these in any programming language and maintain them on GitHub instead of having to put them all individually in the Flic Hub; otherwise, this is going to be completely unusable.
This would work in some situations but I would want to create my own arbitrary script files to do whatever and JSON would be too restrictive. But for my prototype web-service, it would be easy to implement such a facility.
I've written about the scaling issue here:
https://medium.com/flicblog/controlling-iot-devices-with-the-flic-of-a-button-1349c81bddef
I think for this first iteration, scaling the number of buttons is something power users are going to be doing. In the future, that shouldn't be the case, but for now, it's something only affecting folks like me with whole house solutions and 40+ buttons. That's the intention right? Or am I using them in a strange way?
The web-service prototype would also enable as many hubs as you want so you have effectively infinite buttons. See the proposed URL - specifies hub as well as button and action.
(This could just as easily be a JSON string instead of a GET)
I'd like a way to actually use the hub, but I don't know if I'll be able to with its current software as I've detailed here:
https://community.flic.io/topic/17298/feature-request-flic-hub-and-app-enhancements-for-scale
Responding so some of your points, to test the web-service, I have presented a simple web page so I am able to execute the same action as if I had pressed the button. Of course, you could call the URL from one of the many Android apps that just send web requests. I had thought about how access is restricted so it would be easy to add API tokens or authentication to ensure only the right people can do the things.
I agree that some more Flic config (debouncem triple click etc) would be useful; to enable better tuning in.