Run a POST webhook?

I currently use IFTTT to activate scripts, scenes etc. in https://home-assistant.io via webhooks (activated via Google Home and Alexa), and I'm wondering if it would be possible to create some buttons (recipes) in NEEO to do the same?

 

The image attached shows an example of a typical webhook I use in IFTTT.

Would this be possible with NEEO? If so how? (Or alternatively just activate an existing IFTTT recipe from the NEEO)

Reply
33replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Would be pretty easy to do - just look at the SDK examples - especially the ones creating a custom button.  You'll see a button callback that can execute any code you want (which includes sending off IFTTT triggers).  The other option is to use one of the bigger packages like openHAB or Homey which both have full integration with IFTTT and can work with NEEO through the plugins that Niels de Klerk (homey) or I (openHAB) have created.

    Like
  • With my API guide you should be able to do all the basic stuff like start a recipe, press a button etc etc...

     

    https://planet.neeo.com/t/x1trmk/api-examples-to-get-started

    Have fun!

    Like
  • Thanks.

    Am I right in thinking I'd have to create a driver with the code on (for example) a Raspberry Pi, and then keep it running on the Raspberry Pi in order to import it and keep running it on the NEEO?

    And the code would be something like this, is that correct?

    PUT https://MYURL.duckdns.org/api/services/scene/turn_on?api_password=MYPASSWORD
    content: {"entity_id":"scene.bedtime"}
    Like
    • Jono Hunt no need. the image you shared is what you can use with the parameters I’ve send.

      Like
    • Jono Hunt if you write a driver using the SDK you need to keep it running. A raspberry is a logistical place to do that.

       

      Using the API is different. It’s like going to a webpage more or less.

      Like
      • Jono Hunt
      • Jono_Hunt
      • 5 yrs ago
      • Reported - view

      Niels de Klerk Sorry, but I don't understand.
      How/where would I create a button for NEEO that I could enter those details from my IFTTT image?

      I took a look at your API guide and couldn't see a way of doing it from there.

      Like
    • Jono Hunt Ah that's part of the ifttt interface, thought it was that of home-assistant.io. sorry about the misunderstanding.

       

      Well if you can trigger an action in home-Assistant then you should let home-assistant send a web request to NEEO (assuming this is a device in your local network)

      So if you would have the same configuration fields as ifttt has it would look like this:

      Blink LED

      URL: http://<Brain_IP>:3000/v1/systeminfo/identbrain
      Method: GET
      Content Type: -
      Body: -

       

      Set a slider to value 24

      URL: http://<Brain_IP>:3000/v1/projects/home/rooms/<Room_KEY>/devices/<Device_KEY>/sliders/<Slider_KEY>/
      Method: PUT
      Content Type: application.json
      Body: {"value":24}

       

      How the basics of the API work are described in my API post.

      Like
      • Jono Hunt
      • Jono_Hunt
      • 5 yrs ago
      • Reported - view

      Niels de Klerk Ah, OK 🙂

      So this (in your latest reply) would be running a NEEO recipe from Home Assistant, not creating a button on the NEEO that runs a script, scene etc. from Home Assistant. Is that correct?

      If so, then it's not possible (at the moment) to do what I'm wanting?

      Like
    • Jono Hunt it would control NEEO indeed.

      using the NEEO forward brain events the brain sends all events using json to a web url, maybe home-Assistent can do something with that. otherwise you’ll need to write some integration using either the SDK or write something yourself.

      Like
      • Jono Hunt
      • Jono_Hunt
      • 5 yrs ago
      • Reported - view

      Niels de Klerk Thanks, I guess I need to wait for someone more intelligent than me to do something like this in the future 😊

      Like
    • Jono Hunt 

      I am with you we need a generic way to trigger other applications via webhooks without running a raspberry and programming stuff.

      Webhooks are a common way to communicate and that is a basic feature I am really missing

      Like
    • Sebastian Spoerer Your assumption is wrong, webhooks are available to use. Have a look at the EUI code.

      no one is limited to use the SDK modules or the forward brainevents (which is posting real-time updates). There are so many ways to interact with NEEO. Granted that the current SDK is a bit difficult for the less experienced. Any language can be used as you’re not bound to use the nodejs SDK modules at all. The two most used NEEO integrations are not using the SDK modules and both offer features that the official doesn’t have yet.

      Like
    • Sebastian Spoerer I have to add that sending a specifically formed rest call from a press of a NEEO button isn’t possible. 

      Like
    • Niels de Klerk What did you mean? I can send a webhook to e.g. ifttt without running additional hardware(like a pi) and without writing code? By pressing a neeo button

      Show me please

      Like
    • Sebastian Spoerer you Can make use of the NEEO webhooks, it’s true that without middleware it’s not possible to trigger ifttt or any other service for that matter.

      Like
    • Niels de Klerk Sebastian Spoerer : you need to write (a bit of) code but no hardware or server is required if you use something like https://fly.io/articles/fly-edge-applications-global-javascript/

      Like
    • Alexander Graf cool thanks. The website is s not to high level for me to know what it practically does for now so I’ll dive into it.

      Like
      • Jono Hunt
      • Jono_Hunt
      • 4 yrs ago
      • Reported - view

      Alexander Graf  Niels de Klerk  Sebastian Spoerer  I don't mind using additional hardware (I'm always running things on Raspberry Pis).


      It just doesn't have to require much coding knowledge / is easy to setup (idiot proof) for me to setup and use 😊

      Like
    • Jono Hunt then OpenHab might be the best choice. Tim Roberts wrote a full featured integration with NEEO.

      Like
      • Jono Hunt
      • Jono_Hunt
      • 4 yrs ago
      • Reported - view

      Niels de Klerk Yeah I'm aware of that, thanks.

      But I don't want the work/hassle of moving all of my home automation over to openHAB just to be able to send commands from the NEEO to it (plus I've read about lots of people that have switched from openHAB to Home Assistant, and they say HA is much better/they much prefer HA).

      It would be much better (for people wanting to run webhooks to other things, not just Home Assistant), to be able to call/run web hooks to anything.

      Like
    • Jono Hunt you could check with the HA community but as far as I can tell you can use this as well https://www.home-assistant.io/components/binary_sensor.http/

       

      use the neeo forward brainevents to sent status to HA

      Like 1
      • Jono Hunt
      • Jono_Hunt
      • 4 yrs ago
      • Reported - view

      Niels de Klerk Ah yeah, that would be good. 

      I've started playing around triggering scenes, scripts etc. from one instance of Home Assistant on an Ubuntu Server to another instance of Home Assistant running on a Raspberry Pi, with a curl command. 

      Could I do something like that from the NEEO?

      Like
    • Jono Hunt easyest thing would be using the NEEO forward brain events. Settings->brains->forward brain events

      send these to your HA and do events based on that. I don’t know HA and thus I can’t help you on that end but I believe that if you start a post on their community site that there is probably someone who knows.

      Like 1
    • Jono Hunt 

      Yeah - just pick one of the major systems and go with it.  The openHAB forums are littered with people moving from Home Assistant as well - just depends on what matches your needs best and if you have alot of time invested in Home Assistant, I'd stick with it.

      If you are interested in openHAB, alot of people don't realize there's a project called openhabian which provides a pre-setup PI image that is very click and play (very much like Home Assistant). You can create an account on myopenhab.org to link up IFTTT and control the NEEO brain remotely if you want (or anything within openHAB), hook up alexa easily, etc. You can read more at http://www.openhab.org/ifttt.html

      Like 1
      • Jono Hunt
      • Jono_Hunt
      • 4 yrs ago
      • Reported - view

      Tim Roberts That sounds good thanks!

      Actually, I did think about trying openHAB in a Docker container, just to try the NEEO integration. I'm guessing (hoping) there might be a way to send commands from openHAB to Home Assistant, and therefore might be able to use openHAB as a kind of bridge between NEEO and Home Assistant.

      Thanks again 👍🏼

      Like
    • Jono Hunt 

      While you could do that - I'd be a little wary of the approach because you are adding another step to the whole process.  That is another point of failure, additional latency and another item to maintain.  If you have everything in home assistant already, Niels de Klerk suggestion of using forward events, to me, would be your best option rather than adding a whole new HA system to the picture.  Up to you of course, but I wouldn't do it in my home.

      Like 1
      • Jono Hunt
      • Jono_Hunt
      • 4 yrs ago
      • Reported - view

      Tim Roberts OK, I'll try that first. Thanks.

      Like
  • Yeah, I'm still wanting to know how to do this.

    I guess if IFTTT integration was implemented as was stated in the original Kickstarter then things like this would be 'easy'.


    But at the moment I still don't understand how to do it. I don't know how to write a driver to do it (or particularly want to know how to write a driver).

    I'm just wanting to send instructions from the NEEO to Home Assistant (home automation) to start scenes, run scripts etc. and just keep going round in circles 🤔

    Like
  • @all  tahnks for your hints. I am totaly with you but for me that are workarounds. This webhook thing is a standard for a smart device for me.
    And this SDK "workaround" works if you have 1-2 buttons you want to use. But if you have to touch code for every button and deploy the stuff and keep it running this it no way to handle it sorry. And at the end I have a smarthome to simplify things, inspecial neeo which combines many standards, and not to run a neeo, a Pi a cloud application and so on.

    Like
    • Sebastian Spoerer Well at some point it should be possible to sent commands this way. If I'm not mistaken this was said during KS. If the feature is still on the roadmap is something i don't know

      Like
      • Markus M
      • Markus_M
      • 4 yrs ago
      • Reported - view

      Niels de Klerk  Patrick

      I hope that this is still on the roadmap. Is it, Patrick?

      I am waiting for that.

      Like
      • Lucas
      • Lucas
      • 4 yrs ago
      • Reported - view

      Sebastian Spoerer Agree. As someone currently using the SDK. Running and maintaining a server on a PI just to forward basic webhooks seems like an overkill (not to mention the security concerns). It defeats the goal of the remote; of being a user friendly alternative for non-programmers.

      Like
Like1 Follow