Skip to content

Commit

Permalink
Release version 0.1 Pre-Alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
pfink committed Oct 20, 2016
1 parent c4be8f3 commit d06b813
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
2 changes: 1 addition & 1 deletion META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: FlicButton Binding
Bundle-SymbolicName: org.openhab.binding.flicbutton;singleton:=true
Bundle-Vendor: openHAB
Bundle-Version: 2.0.0.qualifier
Bundle-Version: 0.1
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: ., lib/fliclib-linux-hci-client-4ddb2ac.jar
Import-Package:
Expand Down
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenHab 2 Flic Button Binding ** UNDER DEVELOPMENT **
# OpenHab 2 Flic Button Binding ** Pre-Alpha **

OpenHab2 binding for [fliclib-linux-hci](https://github.com/50ButtonsEach/fliclib-linux-hci) using the java clientlib by Shortcut Labs.

Expand All @@ -9,8 +9,48 @@ OpenHab2 binding for [fliclib-linux-hci](https://github.com/50ButtonsEach/flicli
- [ ] Handle removal of Flic Buttons
- [ ] Add initial status check on FlicButtonHandler (buttons which are not auto discovered will currently not go online until the first status change happens)
- [ ] Clarify licensing (see also 50ButtonsEach/fliclib-linux-hci#35)
- [ ] Test and document some use cases for this binding
- [ ] Test and document some use cases for this binding (+ use openhab docs template)
- [ ] Clarify and document deployment to already running OpenHab2 instances
- [ ] More channels? Click, DoubleClick, Hold...
- [ ] Integrate button scan and connection process to this binding so that simpleclient is not needed anymore (will probably not be done by me, but could be interesting stuff to contribute)
- [ ] Unit Tests?

## Tested use case that should work in 0.1 / Pre-Alpha

I strongly advice against using this within a production system right now. Currently, only basic capabilities are implemented and much stuff is not tested yet (like proper removal of buttons etc.). When you test this binding, please share your expierences [here](https://community.openhab.org/t/how-to-integrate-flic-buttons/4468/12) and leave issues for stuff not listed in the ToDo's.

1. Setup and run flicd as described in [fliclib-linux-hci](https://github.com/50ButtonsEach/fliclib-linux-hci)
1. Connect your buttons to flicd using the simpleclient as described in [fliclib-linux-hci](https://github.com/50ButtonsEach/fliclib-linux-hci). Flicd has to run in background the whole time, simpleclient can be killed after you successfully tested the button connection
1. Drop the .jar file of this plugin into the `addons` directory from OpenHab 2
1. Stop OpenHab 2
1. Add one or more bridges (one for each flicd service you're running - typically just a single one) to your *.things file:

```
Bridge flicbutton:flicdaemon-bridge:mybridge [ hostname="<YOUR_HOSTNAME>" ]
```

Please consider that flicd does only accept connections from localhost by default.
1. Start OpenHab 2
1. Check if the bridge got up correctly within the Things menue of PaperUI.
1. Buttons should get discovered automatically and can be added as read-only Switches via Paper UI
1. Now go to the PaperUI control page, press and hold the button -> the Switch should get "ON" as long as you hold the button
1. Trigger something using Rules, e.g. toggle a light on/off each button click (here: on each button release, to be more correct):
```
rule 'FlicLightOn'

when
Item mybutton changed from ON to OFF
then
if (Light_Bedroom.state != ON)
Light_Bedroom.sendCommand(ON)
else
Light_Bedroom.sendCommand(OFF)
end
```

## License

The code within this repository is released under Eclipse Publice License 1.0. Nevertheless, the released .jar contains the (compiled) java clientlib for flicd by Shortcut Labs (which was excluded from this repositories source files). For this java clientlib, Shortcut Labs made 2 statements regarding licensing [here](https://github.com/50ButtonsEach/fliclib-linux-hci/issues/35):

1. `Basically, you may use examples and libraries in any way you wish as long as the purpose is to interact with our Flic buttons.`
1. `Yes you can redistribute them in a .deb, or any other way you like.`
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.openhab.binding</groupId>
<artifactId>org.openhab.binding.flicbutton</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>0.1</version>

<name>FlicButton Binding</name>
<packaging>eclipse-plugin</packaging>
Expand Down

0 comments on commit d06b813

Please sign in to comment.