This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Inputs into Homey

Hi, I currently have my home alarm system connected to a raspberry pi GPIO pins, which I use to turn off lights when the alarm is set and use webhooks to connect to IFTTT etc. I want to move away from processing things in the cloud, Is it possible to connect the raspberry pi locally into Homey, does Homey respond to HTTP commands over LAN? Thanks

Comments

  • swtttswttt Member
    Locally this is possible, not sure if it works with the http app. But you could just send a PUT request over LAN to your local ip. So if you have a device or variable on homey, you can use the (undocumented) REST api to set it to on or whatever. You do need to send the bearer token in the headers tho.

    I even think Better Logic has it's own app API implemented as well, worth looking in to.
  • Thanks for the reply, do you know if there's any more info you can point me too on how to do this, or an example put request. I only have fairly basic knowledge with programming etc, so I want to make sure I will be able to do this sort of thing before I purchase one?
  • Have just searched the app store and found this https://apps.athom.com/app/com.internet Is this the App I will need? It looks fairly straightforward to use, so hopefully I'll be able to get it to work for me Thanks
  • anneanne Member
    edited June 2017
    Yes, that's the one you need. There are several examples in the forum. A good place to start is the forum discussion for the HTTP request app: https://forum.athom.com/discussion/770/http-request-flow-cards-1-5-0. You will probably also need the 'Better Logic' app. 

    This came up on slack the other day:
    [On your pi] "...you can for instance use curl, something like: curl -H "HOST: <Homey local IP>" -H "Authorization: Bearer blablabearer" -H "Content-Type:application/x-www-form-urlencoded" -X POST <Homey local IP>api/app/com.internet/<name> --data "energy=4.3,power=400.1"

    You can then trigger a HTTP request flow with 'Ontvangen POST' -> name and a HTTP JSONpath BL variable, $.energy -> BL variable. "

  • swtttswttt Member
    edited June 2017
    Better logic has a build in API, you can read about it in the app description: https://apps.athom.com/app/net.i-dev.betterlogic

    Let me know if you got it working, then i can tag this topic as solved :smile:
  • Thanks, I haven't got a Homey yet but this sounds like what I need so can be resolved and i'll give it a try when I get one
Sign In or Register to comment.