@@ -44,4 +44,47 @@ Configuration variables:
44
44
- **invert_logic** (*Optional*): Inverts the input logic, default is ` false`.
45
45
- **device_class** (*Optional*): See device classes in [binary_sensor component](/components/binary_sensor/), default is `None`
46
46
47
+ # # {% linkable_title Directions for installing smbus support on Raspberry Pi %}
48
+
49
+ Enable I2c interface with the Raspberry Pi configuration utility :
50
+
51
+ ` ` ` bash
52
+ # pi user environment: Enable i2c interface
53
+ $ sudo raspi-config
54
+ ` ` `
55
+
56
+ Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish`.
57
+
58
+ Install dependencies for use the `smbus-cffi` module and enable your _homeassistant_ user to join the _i2c_ group :
59
+
60
+ ` ` ` bash
61
+ # pi user environment: Install i2c dependencies and utilities
62
+ $ sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
63
+
64
+ # pi user environment: Add homeassistant user to the i2c group
65
+ $ sudo usermod -a -G i2c homeassistant
66
+ ` ` `
67
+
68
+ # ## {% linkable_title Check the i2c address of the sensor %}
69
+
70
+ After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors, so you can see the sensor address :
71
+
72
+ ` ` ` bash
73
+ $ /usr/sbin/i2cdetect -y 1
74
+ ` ` `
75
+
76
+ It will output a table like this :
77
+
78
+ ` ` ` text
79
+ 0 1 2 3 4 5 6 7 8 9 a b c d e f
80
+ 00: -- -- -- -- -- -- -- -- -- -- -- -- --
81
+ 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
82
+ 20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --
83
+ 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
84
+ 40: 40 -- -- -- -- -- UU -- -- -- -- -- -- -- -- --
85
+ 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
86
+ 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
87
+ 70: -- -- -- -- -- -- -- 77
88
+ ` ` `
89
+
47
90
For more details about the `raspihats` add-on boards for Raspberry PI, visit [raspihats.com](http://www.raspihats.com/).
0 commit comments