# \[SOLVED\] In which packages should OH2 "actions" go?

**URL:** <https://community.openhab.org/t/solved-in-which-packages-should-oh2-actions-go/68363>\
**Category:** Development\
**Tags:** action, binding, pushbullet\
**Created:** [February 20, 2019, 10:30pm UTC](https://community.openhab.org/t/solved-in-which-packages-should-oh2-actions-go/68363 "2019-02-20T22:30:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hakan](https://community.openhab.org/user_avatar/community.openhab.org/hakan/32/70815_2.png) [@hakan](https://community.openhab.org/u/hakan)\
**Post date:** [February 20, 2019, 10:30pm UTC](https://community.openhab.org/t/solved-in-which-packages-should-oh2-actions-go/68363/1 "2019-02-20T22:30:34Z")

</div>

I’m porting my pushbullet binding to OH2, using the example provided by the mqtt binding.

So, which package should I choose ?

```
addons/actions/org.openhab.action.pushbullet 

```

or

```
addons/binding/org.openhab.binding.pushbullet

```

For the first package, one could argue that it is an “action”, and actions were also seperated in OH1. Also, actions differed from bindings inasmuch they were basically write-only with no feedback way to the core.

For the second package, one could argue that it might (additionally to the action) become a proper client of the Pushbullet service, thus providing input the the core.

I’m torn between the two choices, leaning towards the second one. The third option would be, of course, having both an “action” and a “binding” later on, but I believe this would confuse users…

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [February 20, 2019, 11:12pm UTC](https://community.openhab.org/t/solved-in-which-packages-should-oh2-actions-go/68363/2 "2019-02-20T23:12:23Z")

</div>

I would vote for the latter. I believe the “actions are a part of the binding instead of something separate” style that is illustrated by the MQTT action is the preferred OH 2 approach. The old separate Action add-ons I think are going to go away.

But I’m not positive on all of this. @David_Graeff, @5iver, do either of you have opinions? IIRC the two of you were the ones discussing in another thread about moving the existing core Actions over to the new style.

---

<div class="post-metadata">

**Author:** ![5iver](https://community.openhab.org/user_avatar/community.openhab.org/5iver/32/21201_2.png) [@5iver](https://community.openhab.org/u/5iver)\
**Post date:** [February 20, 2019, 11:31pm UTC](https://community.openhab.org/t/solved-in-which-packages-should-oh2-actions-go/68363/3 "2019-02-20T23:31:44Z")

</div>

> [@rlkoshak](#):
>
> moving the existing core Actions over to the new style.

Core Actions are a bit different, but will be made accessible in the same way. David would be best for this, as he has the binding experience. There are a number of bindings using them though, so I suggest taking a look at where they have put them.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [February 21, 2019, 11:57am UTC](https://community.openhab.org/t/solved-in-which-packages-should-oh2-actions-go/68363/4 "2019-02-21T11:57:29Z")

</div>

I would put them into the “bindings” directory, as at some point that artifact may become a full binding (i.e. gain a Thing handler factory).

Separating actions and bindings is not OH2 style as it looks like at the moment.

---

<div class="post-metadata">

**Author:** ![hakan](https://community.openhab.org/user_avatar/community.openhab.org/hakan/32/70815_2.png) [@hakan](https://community.openhab.org/u/hakan)\
**Post date:** [February 21, 2019, 1:54pm UTC](https://community.openhab.org/t/solved-in-which-packages-should-oh2-actions-go/68363/5 "2019-02-21T13:54:14Z")

</div>

> [@David\_Graeff](#):
>
> I would put them into the “bindings” directory, as at some point that artifact may become a full binding

That’s the way I’ll go then.
