Feature Request : IFTT /Alexa /Google Home integration

Comments

19 comments

  • Avatar
    Akio Tanaka

    yes make sense, I would like to turn on certain rules via Alexa or IFTTT

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    I would like to do the same. I've found and tested the necessary api's in development mode but don't know how to properly authenticate to the api.

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    Will do a +1 to our API feature.  We were thinking about this about 6 months back, but, the number of people asking for APIs is just too little to even start the project.

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    The API feature alone has limited value. It becomes very exciting when someone mates the API to another application for integration. Rundeck by itself and IFTTT alone are useless until you have integrations for them to do something with.

    I would like to integrate it with Home Assistant to tie it in with my my existing automations. There is a thread on Home Assistant's forum from someone else requesting an integration as well.

    This is my work so far on this API feature. I'm only missing proper authentication. I'm no JS dev and from what i gather the firewalla uses passport for authentication. thats the extent of my work so far. I've linked to the other thread i started before i found this one.

    https://help.firewalla.com/hc/en-us/community/posts/360052094213/comments/360013694814 

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    Fantastic work!

    The real problem for us is really economics.   This means, any features we build, should improve our business ... or at least pay our engineers (I am one).   Software ... is like a car, maintenance is also costly.   So, until more people are asking these features or our management decided this may increase our sales.  

    1
    Comment actions Permalink
  • Avatar
    Jeremy

    Thats fair. Businesses gots to make the money.

     

    Do you accept PR's to your github repo? If i find inspiration to continue working on this and devise a solution, can i submit a PR for consideration by the engineers?

    0
    Comment actions Permalink
  • Avatar
    Rizwan Khan

    @Firewalla - That a very valid point but "Alexa / Google compatible" are often perceived to be great sales catalyst / ease of use feature etc.  Secondly, all users may not necessarily realise the benefits unless the feature is 'shown' to them.

    It might be a good idea to run a survey of List of Features across the community to "show" them what what is possible and then see where the economics makes sense. (My 2 cent)

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    The firewalla lives off of your github repo.

    These files appear to be the upgrade scripts in the repo that contain "git pull". the hard reset is nice. makes upgrade possible after i jack up the source on my box. :)

    https://github.com/firewalla/firewalla/blob/45718792033518a54e180a501ee218a65fb8bda6/upgrade 

    https://github.com/firewalla/firewalla/blob/b78ce9c60793897c132f0be10ea6d7fe32c92acd/scripts/upgrade 

    A reboot always follows the upgrade. Are there any other upgrade processes that would have a different work flow or any other time a "git reset" would be performed?

    if i change the following to read "if(true) {" then the app-local spins up with the routes and appears to be properly bound to 127.0.0.1 only.
    https://github.com/firewalla/firewalla/blob/5e19866b56138a3dd54f27140645a152508aaf97/api/app-local.js#L77 

    pi@Firewalla:~/firewalla/api (Home-User) $ netstat -altun | grep 8834
    tcp 0 0 127.0.0.1:8834 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:47900 127.0.0.1:8834 TIME_WAIT

    if i drop a script in to find and change that line on startup then that should expose the app-local properly and persist after update assuming you continue to use the "!firewalla.isProductionOrBeta()" and only once. the following should work.

    #!/bin/bash

    sed -i 's/!firewalla.isProductionOrBeta()/true/g' ~/firewalla/api/app-local.js

    sudo systemctl restart fireapi

    0
    Comment actions Permalink
  • Avatar
    Jay Carter

    Id love to be able to say "Alexa, turn off my kid's wifi" and it just happen.

    You really have no idea how much I would love that and Im sure Im not the only one. I had to teach my wife how to use the mobile app so she can turn the internet off and on. Alexa integration would be huge.

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    @jeremy, if you have small changes, try to submit a PR;   Our engineers are pretty 'nice';   We tried couple years ago with a few open-source developers, but it didn't go too well; the reason is all centered around architecture and how the changes were impacting other features, and most of all, it was distracting for the team to train new dev's.  

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    Perhaps my first question should be why are the app-local api routes only loaded if not production or beta when they are bound to 127.0.0.1 only? They are not a security risk if ssh is not available or the device isn't popped.

    It seems like an unnecessary prohibition to mitigate a minimal security risk.

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    Let me ask our dev's if they want to answer coding questions, and also open up another forum for potential developers.  Like I said before, the major hurdle we had was ramping up and the cost (time) associated with it.   Right now, developers are stuck with pushing out 1.971, and a few on 1.972 + supporting the product.

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    No problem. I have a workaround that will persist. So at your convenience. Thank you.

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    Here is a gist as a POC. i'll work on the Home Assistant component and should have this done by the end of the week. I did have to switch to the beta version for my Blue box. the rel version doesn't run the post_main.d scripts

     

    https://gist.github.com/my-given-name-is-jeremy/41435eef6235b34f57b7df1836e3c503 

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    I didn't look at the output of the /host endpoint but it looks like a lot of flow counters and other related bits. Could be a good start to a Prometheus data collector? Wasn't there another forum thread here about enterprise data collection?

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    @jeremy, one engineer was thinking of creating another GitHub repo for user scripts.  Which likely to have simpler commit criteria, and we can have that loosely integrated with the other parts of the code.   Would you think it will be helpful?

    1
    Comment actions Permalink
  • Avatar
    Jeremy

    I think it would be an excellent idea. a single place for people to start linking up all their little projects. since you have docker operating on the gold people could start dropping docker-compose scripts in as well.

    would be a great place for developers to watch for community trends and determine what projects are using what bits of the platform. might find lots of people are using api's for their projects, might want to make sure breaking changes to the api are documented. maybe you'll find lots of docker projects, might want to make sure docker version changes are documented.

     

    1
    Comment actions Permalink
  • Avatar
    Firewalla

    @jeremy, great.  It will likely be just a empty shell in the beginning and we will see how it takes us.  Since it will likely be just a side project for us, likely there will be up and down's with these things. 

    0
    Comment actions Permalink
  • Avatar
    Jeremy

    Alright. I have the automation working from Home Assistant to the Firewalla. Should now be able to setup the automation and have a "Hey google turn off Internet" command.

    0
    Comment actions Permalink

Please sign in to leave a comment.