dear community,
i have a TEMPer sensor plugged into a raspberry pi 3 having hass.io image (with latest update - 0.56.2).
i’m facing a strange behavior of udev rules.
Here is what i did to configure:
I added the " -platform: temper" component in the configuration.yaml, under “sensors” section.
Also i added the rules file in /etc/udev/rules.d/99-tempsensor.rules with this content:
SUBSYSTEMS==“usb”, ACTION==“add”, ATTRS{idVendor}==“0c45”, ATTRS{idProduct}==“7401”, MODE=“666”
I repluged the usb sensor and restarted HA (without restarting entire raspberry) but getting error:
2017-10-12 14:15:55 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform temper Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 164, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=self.hass.loop) File “/usr/lib/python3.6/asyncio/tasks.py”, line 352, in wait_for return fut.result() File “/usr/lib/python3.6/asyncio/futures.py”, line 244, in result raise self._exception File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 55, in run result = self.fn(*self.args, **self.kwargs) File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/temper.py”, line 45, in setup_platform temper_devices = get_temper_devices() File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/temper.py”, line 33, in get_temper_devices return TemperHandler().get_devices() File “/usr/lib/python3.6/site-packages/temperusb/temper.py”, line 420, in init usb.core.find(find_all=True, idVendor=vid, idProduct=pid)] File “/usr/lib/python3.6/site-packages/temperusb/temper.py”, line 419, in self._devices += [TemperDevice(device) for device in \ File “/usr/lib/python3.6/site-packages/temperusb/temper.py”, line 95, in init self.lookup_sensor_count() File “/usr/lib/python3.6/site-packages/temperusb/temper.py”, line 164, in lookup_sensor_count if (self._device.product == ‘TEMPer1F_V1.3’) or
AttributeError: ‘Device’ object has no attribute ‘product’
I tried also to restart the entire hassio box (not just the home assistant) - and the rules file get’s deleted slight_smile:
The device is recognized as input device:
core-ssh:~/tools/ga# hassio host hardware
{
“serial”: [
“/dev/ttyACM0”
],
“input”: [
“RDing TEMPerV1.4”
],
“disk”: ,
“gpio”: [
“gpiochip100”,
“gpiochip0”
],
“audio”: {
“0”: {
“name”: “bcm2835 - bcm2835 ALSA”,
“type”: “ALSA”,
“devices”: {
“0”: “digital audio playback”,
“1”: “digital audio playback”
}
}
}
}
But nothing in /dev/ :
core-ssh:~/tools/ga# ls -la /dev/tty*
crw-rw-rw- 1 root root 5, 0 Oct 27 21:50 /dev/tty
dmesg when i unplug & plug the sensor:
[327020.855110] usb 1-1.3: USB disconnect, device number 7
[327022.934139] usb 1-1.3: new low-speed USB device number 8 using dwc_otg
[327023.053163] usb 1-1.3: New USB device found, idVendor=0c45, idProduct=7401
[327023.053186] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[327023.053198] usb 1-1.3: Product: TEMPerV1.4
[327023.053210] usb 1-1.3: Manufacturer: RDing
[327023.063732] input: RDing TEMPerV1.4 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0C45:7401.0007/input/input3
[327023.117477] hid-generic 0003:0C45:7401.0007: input,hidraw0: USB HID v1.10 Keyboard [RDing TEMPerV1.4] on usb-3f980000.usb-1.3/input0
[327023.129115] hid-generic 0003:0C45:7401.0008: hiddev0,hidraw1: USB HID v1.10 Device [RDing TEMPerV1.4] on usb-3f980000.usb-1.3/input1
i already added a comment to a similar issue in github, but i thought to ask also here, maybe somebody aware of a workaround or familiar with this behavior of deleting the udev rules…
many thanks,
alex