@@ -35,11 +35,55 @@ Configuration variables:
35
35
- ' humidity'
36
36
- ' pressure'
37
37
38
+ # ## {% linkable_title Installation instruction for the All-In-One installer and HASSbian %}
38
39
39
- # ##### Customizing the Sense HAT data
40
+ Here are the steps to make the Sense HAT sensor work with a virtual environment.
40
41
41
- **Format the sensor values**
42
- Add the following to your `sensor`
42
+ Install SenseHAT package. Switch to the `homeassistant_venv` directory and activate the virtual environment.
43
+
44
+ ` ` ` bash
45
+ $ sudo su -s /bin/bash homeassistant
46
+ $ source /srv/homeassistant/homeassistant_venv/bin/activate
47
+ ` ` `
48
+
49
+ Install the `sense-hat` module.
50
+
51
+ ` ` ` bash
52
+ $ pip3 install sense-hat
53
+ ` ` `
54
+
55
+ Please be patient, this will take a long while...
56
+
57
+ Type `exit` to quit out of the _homeassistant_venv_ back to your `pi` environment. As all of the following steps should be under the `pi` user environment.
58
+
59
+ Install the [RTIMU](https://github.com/RPi-Distro/RTIMULib) Python module :
60
+
61
+ ` ` ` bash
62
+ $ pip3 install rtimulib
63
+ ` ` `
64
+
65
+ Add symlink to RTIMU in `homeassistant_venv` directory. Create a symlink using the following command :
66
+
67
+ ` ` ` bash
68
+ $ ln -s /usr/lib/python3/dist-packages/RTIMU.cpython-34m-arm-linux-gnueabihf.so /srv/homeassistant/homeassistant_venv/lib/python3.4/
69
+ ` ` `
70
+
71
+ Add `homeassistant` user to the `input` and the `i2c` groups.
72
+
73
+ ` ` ` bash
74
+ $ sudo addgroup homeassistant input
75
+ $ sudo addgroup homeassistant i2c
76
+ ` ` `
77
+
78
+ Reboot Raspberry Pi to apply changes.
79
+
80
+ ` ` ` bash
81
+ $ sudo reboot
82
+ ` ` `
83
+
84
+ # ## {% linkable_title Customizing the Sense HAT data %}
85
+
86
+ To format the sensor values, add the following to your `sensor` entry in your `configuration.yaml` file.
43
87
44
88
` ` ` yaml
45
89
# Example configuration.yaml entry
@@ -63,8 +107,7 @@ sensor:
63
107
unit_of_measurement: '%'
64
108
` ` `
65
109
66
- **Give the values friendly names & icons**
67
- Add the following to your `customize`
110
+ Add the following to your `customize` section to set friendly names & icons for the values.
68
111
69
112
` ` ` yaml
70
113
# Example configuration.yaml entry
@@ -78,10 +121,9 @@ customize:
78
121
sensor.sensehat_pressure:
79
122
icon: mdi:gauge
80
123
friendly_name: "Pressure"
81
- ` ` `
124
+ ` ` `
82
125
83
- **Create a group**
84
- Add the following to your `groups`
126
+ Create a group for your Sense HAT details by adding the following to your `groups` section.
85
127
86
128
` ` ` yaml
87
129
# Example configuration.yaml entry
@@ -93,60 +135,13 @@ group:
93
135
- sensor.sensehat_humidity
94
136
- sensor.sensehat_pressure
95
137
` ` `
138
+
96
139
Add the _sense_hat group_ a group (_Kitchen for example_)
140
+
97
141
` ` ` yaml
98
142
# Example configuration.yaml entry
99
143
group:
100
144
kitchen:
101
145
- group.sense_hat
102
146
` ` `
103
147
104
-
105
- # ### Directions for installing on Raspberry Pi All-In-One installer and HASSbian:
106
- Here are the steps to make the _SenseHAT_ sensor work _successfully_ with the virtual enviroment versions.
107
-
108
- # ##### Install SenseHAT package to _homeassistant_venv_
109
- ` ` ` bash
110
- # switch to the homeassistant_venv environment
111
- sudo su -s /bin/bash homeassistant
112
- source /srv/homeassistant/homeassistant_venv/bin/activate
113
-
114
- # install the sense-hat lib
115
- pip3 install sense-hat
116
- # be patient, this will take a long while
117
- ` ` `
118
- # ##### Return to `pi`
119
- Type `exit` to quit out of the _homeassistant_venv_ back to your `pi` environment.
120
-
121
- As all of the following steps should be under the `pi` user environment.
122
-
123
- # ##### Install _RTIMU_
124
-
125
- ` ` ` bash
126
- # Install RTIMU to pi user environment
127
- pip3 install rtimulib
128
-
129
- # Add symlink to RTIMU in _homeassistant_venv_
130
- # Create a symlink using the following command:
131
- ln -s /usr/lib/python3/dist-packages/RTIMU.cpython-34m-arm-linux-gnueabihf.so /srv/homeassistant/homeassistant_venv/lib/python3.4/
132
-
133
- # Add _homeassistant_ user to the _input_ and the _i2c_ groups
134
- sudo addgroup homeassistant input
135
- sudo addgroup homeassistant i2c
136
-
137
- # Reboot Raspberry Pi to apply changes
138
- sudo reboot
139
- ` ` `
140
-
141
- Unfortunately, enabling the SenseHAT Sensor component for a Virtual Environment install of Home-Assistant fails with errors.
142
- _(The Raspberry Pi All-In-One installer and HASSbian both run Home-Assistant in an virtual environment)._
143
-
144
- These issues have been discussed in the repository issue [#5093](https://github.com/home-assistant/home-assistant/issues/5093)
145
-
146
- This fix has been tested with a clean install of :
147
-
148
- * [Raspbian Jessie - version January 2017](https://downloads.raspberrypi.org/raspbian/images/raspbian-2017-01-10/)
149
-
150
- and
151
-
152
- * [Home-Assistant 0.37.1](https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/)
0 commit comments