# How to read the documentation

**URL:** <https://community.homey.app/t/how-to-read-the-documentation/34194>\
**Category:** Developers\
**Created:** [August 31, 2020, 6:49am UTC](https://community.homey.app/t/how-to-read-the-documentation/34194 "2020-08-31T06:49:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [August 31, 2020, 6:49am UTC](https://community.homey.app/t/how-to-read-the-documentation/34194/1 "2020-08-31T06:49:37Z")

</div>

I am trying to learn homeyscript. For a absolute NOOB and a non-programming type it is quite a steap learning process.

I came across this information.

 ![Aantekening 2020-08-31 084327](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/2/7234e8fe220dccac434ce7e5421772be03cf5756.png)  
How do I interpretate this? And how do i make use off it in Homeyscript.  
It would be great if I could start a flow with a script.

I also stumbled upon this rule but cannot get it working. I did add the id off the flow.

 ![Aantekening 2020-08-31 084636](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/4/b4081bfc527fab7c39d9c4477d0644d33829d396.png)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 31, 2020, 6:58am UTC](https://community.homey.app/t/how-to-read-the-documentation/34194/2 "2020-08-31T06:58:38Z")

</div>

- You can ignore the OAuth scopes, Homeyscript has a fixed set of scopes (which, I don’t know) so it’s not something you have control over.
- that the method is `async` means it returns a promise
- the (single) argument `opts` is _opt_ional (although it being optional doesn’t make sense because what would `triggerFlow()` do _without_ any information on _what_ to trigger exactly?)
- when you pass it, it should be an object with one mandatory property `id` and an optional property `state`.
- `id` is the id of the flow you want to trigger (this is something you have to infer from the documentation, it’s not explicitly stated)
- nobody knows what `state` means

In your example code, instead of `triggerProgrammaticFlow` use `triggerFlow`.

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [August 31, 2020, 8:07am UTC](https://community.homey.app/t/how-to-read-the-documentation/34194/3 "2020-08-31T08:07:55Z")

</div>

I get this as return, does it mean you can’t access flows from a script?

 ![Aantekening 2020-08-31 100614](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/0/60fc08473eaf732de1554dfa5e3a8a24c8ccc82a.png)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 31, 2020, 9:04am UTC](https://community.homey.app/t/how-to-read-the-documentation/34194/4 "2020-08-31T09:04:10Z")

</div>

Yes, sounds like Homeyscript isn’t allowed to do that. There’s nothing you can do about that (apart from asking Athom why they have decided to cripple Homeyscript like this).
