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.
Closed

Permission for zones/devices

So I thought to write a simple app for homey, since nodejs is no problem for me.
Just some action cards like all on/off, and on/off per zone seems like a manageable project.

Nice exercise, not a whole lot of in depth documentation, but I think I know how to solve the issue.
  1. Make a card. (done)
  2. Get the zones and devices.
  3. Send devices the on/off command.
At step 2 I get stuck. I found the zones and devices api endpoint, can even read them through a normal browser request (with a login-session that is). 
Homey.manager('api').get('/manager/zones', func....
But if I try to log the results in my app, it errors as follows: "[Error: missing_permission:homey:manager:zones] null"

So yeah, permissions... got it, add homey:manager:zones as permission to the app.json right? 
Nope it errors on initialisation with: "invalid permission `homey:manager:zones`"

So I am wondering, is it not possible to do yet or am I doing it wrong?

In the meantime, I am looking in to the global all on/off.
Something driver something something ;)

Comments

  • Just wondering, couldn't this be implemented by faking speech input? Like "all lights off in the living room". Then you don't have to build an app for it.
  • Could be done, but why fake speech (and thus requiring the speech-to-text service over the internet) instead of direct command in homey.

    And why build an app over a 'hacky' way. Well:
    "Give a man a fish and he'll eat for a day.  Teach a man to fish, and he'll eat for a lifetime" :smile: 
  • * edit *

    Off course faking speech does not require speech-to-text service. But it does require computing to understand the sentence. It's the difference between 1ms and 100ms (I estimate, even longer for more complicated sentences) to perform the task.
  • Fair point, regarding response time and the need of an active internet connection. But can't help you with the API and zones, sorry
This discussion has been closed.