|
| 1 | +--- |
| 2 | +layout: page |
| 3 | +title: "Nuimo controller" |
| 4 | +description: "Instructions how to setup and use a Nuimo device in Home Assistant." |
| 5 | +date: 2016-08-30 12:00 |
| 6 | +sidebar: true |
| 7 | +comments: false |
| 8 | +sharing: true |
| 9 | +footer: true |
| 10 | +logo: nuimo.png |
| 11 | +ha_category: Hub |
| 12 | +ha_release: 0.28 |
| 13 | +ha_iot_class: "Local Poll" |
| 14 | +--- |
| 15 | + |
| 16 | +The `nuimo_controller` component allows you to connect to a [Nuimo](http://www.senic.com/) device for receiving input events and displaying on the led matrix via the [Nuimo SDK for Python on Linux](https://github.com/getSenic/nuimo-linux-python). |
| 17 | + |
| 18 | +To connect to a Nuimo device add the following section to your `configuration.yaml` file: |
| 19 | + |
| 20 | +```yaml |
| 21 | +nuimo_controller: |
| 22 | + mac: 'CE:B5:12:25:21:89' |
| 23 | +``` |
| 24 | +
|
| 25 | +
|
| 26 | +Configuration variables: |
| 27 | +
|
| 28 | +- **mac** (*Optional*): skip discovery and connect to this device address |
| 29 | +- **name** (*Optional*): handle more than one device by names |
| 30 | +
|
| 31 | +
|
| 32 | +Example for testing rotation value and sending to led matrix: |
| 33 | +
|
| 34 | +```yaml |
| 35 | +automation Nuimo_rotate_right: |
| 36 | + trigger: |
| 37 | + platform: event |
| 38 | + event_type: nuimo_input |
| 39 | + event_data: |
| 40 | + type: ROTATE |
| 41 | + condition: |
| 42 | + condition: template |
| 43 | + value_template: {% raw %}'{{ trigger.event.data.value > 100 }}'{% endraw %} |
| 44 | + action: |
| 45 | + service: nuimo_controller.led_matrix |
| 46 | + data: |
| 47 | + matrix: |
| 48 | + '........ |
| 49 | + 0000000. |
| 50 | + .000000. |
| 51 | + ..00000. |
| 52 | + .0.0000. |
| 53 | + .00.000. |
| 54 | + .000000. |
| 55 | + .000000. |
| 56 | + ........ ' |
| 57 | + interval: 0.5 |
| 58 | +``` |
| 59 | +
|
| 60 | +Troubleshooting: |
| 61 | +
|
| 62 | +- use `hcitool lescan` to see the mac address of your device |
| 63 | + |
| 64 | +- allow non-root user access to Bluetooth LE with `sudo setcap cap_net_raw+eip $(eval readlink -f $(which python))` |
| 65 | + |
| 66 | +- install the newest version of [pygattlib](https://bitbucket.org/OscarAcena/pygattlib) from |
| 67 | +the repository, either because there is no binary package for your system or the pip version |
| 68 | +contains errors, with `pip install hg+https://bitbucket.org/OscarAcena/pygattlib --target $HOME/.homeassistant/deps`. |
| 69 | +( dependencies of pygattlib: `sudo apt-get install pkg-config libboost-python-dev |
| 70 | +libboost-thread-dev libbluetooth-dev libglib2.0-dev python-dev` ) |
| 71 | +Then invoke home-assistant with `hass --skip-pip`. |
0 commit comments