!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

422 Members
Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant117 Servers

Load older messages


SenderMessageTime
1 Dec 2024
@k900:0upti.meK900And everything is a queue 17:48:45
@k900:0upti.meK900Even though very few things actually are 17:48:55
@hexa:lossy.networkhexaWhat would be the better alternative?17:49:17
@hexa:lossy.networkhexae.g. CoAP is maybe 10 years old now17:49:49
@k900:0upti.meK900Some reasonable-ish RPC protocol, probably17:49:52
@k900:0upti.meK900I don't think there's anything out there that would be a good fit for all the use cases 17:50:14
@k900:0upti.meK900Which probably means there should be more than one protocol 17:50:35
@hexa:lossy.networkhexaah cool, they start using pnpm with z2m 2.017:55:03
@freewalkr:fwkrr.rufreewalkr
In reply to @hexa:lossy.network
I rolled that back to 1.1 a while ago
i updated to latest nixpkgs-unstable and now it converts to yaml to: 'on'. thanks!
20:25:23
@freewalkr:fwkrr.rufreewalkr

one more problem, more general this time
maybe someone knows
i pass a usb device to hass via a symlink generated by udev rule:

services.udev.extraRules = ''ACTION=="add", KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="16d6", ATTRS{idProduct}=="0008", MODE="0600", OWNER="hass", GROUP="hass", SYMLINK+="jablotron"'';

then i allow it in systemd unit:

systemd.services.home-assistant.serviceConfig.DeviceAllow = "/dev/jablotron";

and everything works fine
but the device can randomly disconnect and connect back every once in a while
it is available on the symlink /dev/jablotron again (i checked with sudo -u hass cat /dev/jablotron - no access errors)
but home assistant won't have access to it: there are a lot of log lines:

2024-12-01 23:18:33.036 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: [Errno 1] Operation not permitted: '/dev/jablotron'

restarting hass service helps, it works fine again until the next reconnect

is it an issue with an integration or it can be solved with systemd tuning?

20:33:07
@hexa:lossy.networkhexawhat are the permissions when it reconnects?20:34:17
@hexa:lossy.networkhexais it still owned by hass:hass?20:34:25
@freewalkr:fwkrr.rufreewalkr600 hass:hass20:34:27
@hexa:lossy.networkhexa what I would do is create a static group users.groups.jablotron = { } and add SupplementaryGroup = [ "jablotron " ] to the home-assistant unit 20:35:39
@hexa:lossy.networkhexabut that just shifts things around, not sure it would meaningfully change anything20:35:57
@freewalkr:fwkrr.rufreewalkrwell the symlink is 777 of course, but the device it points to is 600 hass:hass20:36:07
@hexa:lossy.networkhexathe hass user/group are statically allocated, so I wouldn't expect anything weird to happen20:38:23
@freewalkr:fwkrr.rufreewalkrshould i use group jablotron as udev group?20:38:52
@freewalkr:fwkrr.rufreewalkr * should i use group jablotron as udev rule group?20:39:03
@freewalkr:fwkrr.rufreewalkr * should i use group jablotron as udev rule GROUP?20:39:13
@hexa:lossy.networkhexathat is what I would do20:39:13
@hexa:lossy.networkhexaroot/jablotron20:39:19
@hexa:lossy.networkhexathen 66020:39:23
@hexa:lossy.networkhexaand group membership delegates access to the device20:39:37
@freewalkr:fwkrr.rufreewalkrwell it didn't fix the problem i guess it maybe something like integration keeps reading from dead file descriptor or something20:49:36
@freewalkr:fwkrr.rufreewalkr * well it didn't fix the problem i guess it may be something like integration keeps reading from dead file descriptor or something20:49:46
@hexa:lossy.networkhexayeah, plausible20:49:47
@hexa:lossy.networkhexabest to talk to the componentn maintainer20:50:08
@hexa:lossy.networkhexaon permission error, try to reopen the device20:50:42
@freewalkr:fwkrr.rufreewalkr

retard move (at least it works for now)

services.udev.extraRules = 
  ''ACTION=="add", KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ''
  + ''ATTRS{idVendor}=="16d6", ATTRS{idProduct}=="0008", ''
  + ''MODE="0660", OWNER="hass", GROUP="hass", SYMLINK+="jablotron", ''
  + ''RUN+="/bin/sh -c 'systemctl restart home-assistant.service'"''
21:32:56

Show newer messages


Back to Room ListRoom Version: 6