markussiebert / home-assistant-addons Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
Then i try to add the custom HACs repository i get the error message:
Repostitory structure for main is not compliant
Repository:
https://github.com/markussiebert/home-assistant-addons
Category:
Integration
HACs:
Integrations Version: | 1.17.2
Frontend Version: | 20211114224857
Home Assistant 2021.11.5
When I try to read my smartmeter with the vzLogger addon, then there seems to be a permission problem to access the ttyUSB0.
When I open the vzLogger log, I see this error:
open(/dev/ttyUSB0): Operation not permitted
I have an IR to USB reader (USB IR Lesekopf EHZ Lese-Schreib-Kopf Volkszähler Hichi Smartmeter) with CP2102_USB_to_UART_Bridge to read my smartmeter.
I'm using a fresh haos_rpi3-64-8.5 installation with my Raspberry 3:
https://github.com/home-assistant/operating-system/releases/download/8.5/haos_rpi3-64-8.5.img.xz
When I use the command line to communicate with the smartmeter, everything works fine. I get response from the smartmeter with these commands:
stty -F /dev/ttyUSB0 300 -parodd cs7 -cstopb parenb -ixoff -crtscts -hupcl -ixon -opost -onlcr -isig -icanon -iexten -echo -echoe -echoctl -echoke
cat ./Anforderungssequenz_xxxxx.txt > /dev/ttyUSB0
cat /dev/ttyUSB0
In
https://github.com/markussiebert/homeassistant-addon-vzlogger/blob/main/vzlogger/Dockerfile
I found these lines:
# without running a user context, no exec is possible and without the dialout group no access to usb ir reader possible
# RUN useradd -G dialout vz && mkdir -p /home/vz && chown vz:vz /home/vz
RUN chmod a+x /etc/services.d/vzlogger/listdevices.sh && \
usermod -a -G dialout root
So I think, the docker container expects that /dev/ttyUSB0 must be accessable for the group dialout.
But when I check this in my terminal, then I see that /dev/ttyUSB0 is only accessable for the group audio:
ls -l /dev/ttyUSB0
crw-rw---- 1 root audio 188, 0 Mar 11 08:33 /dev/ttyUSB0
I tried to change the group for ttyUSB0, but that didn't work:
chgrp dialout /dev/ttyUSB0
chgrp: /dev/ttyUSB0: Read-only file system
Here is the complete log of the vzLogger add-on:
`[20:19:00] INFO: ==============================================================================
[20:19:00] INFO: Starting vzlogger
[Sep 01 20:19:00][main] vzlogger v0.8.0 based on heads/master-0-gccb6d8ee49 from Fri, 5 Nov 2021 03:13:34 +0100 started.
[Sep 01 20:19:00][main] log level is 15
[Sep 01 20:19:00][d0] open(/dev/ttyUSB0): Operation not permitted
[Sep 01 20:19:00][mtr0] Cannot open meter
[Sep 01 20:19:00][] Startup failed: Meter open failed.
[Sep 01 20:19:00][mtr0] Creating new meter with protocol d0.
[Sep 01 20:19:00][d0] pullseq len:11 found
[Sep 01 20:19:00][d0] using autoack
[Sep 01 20:19:00][mtr0] Meter configured, enabled.
[Sep 01 20:19:00] New meter initialized (protocol=d0)
[Sep 01 20:19:00] Have 1 meters.
[Sep 01 20:19:00][main] local=0
[Sep 01 20:19:00] Process not daemonized...
[Sep 01 20:19:00] Opened logfile /var/log/vzlogger.log
[Sep 01 20:19:00][push] No pushDataServer defined.
[Sep 01 20:19:00][] ===> Start meters
[20:19:01] INFO: ==============================================================================
/dev/ttyUSB0 - Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0037
[20:19:01] INFO: ==============================================================================
[20:19:01] INFO: {
"retry": 0,
"verbosity": 15,
"log": "/var/log/vzlogger.log",
"local": {
"enabled": false,
"port": 8081,
"index": true,
"timeout": 0,
"buffer": 0
},
"meters": [
{
"enabled": true,
"allowskip": false,
"interval": -1,
"aggtime": -1,
"aggfixedinterval": false,
"channels": [
],
"protocol": "d0",
"device": "/dev/ttyUSB0",
"dump_file": "",
"pullseq": "2F3F31xxxxxxxxxx210D0A",
"ackseq": "auto",
"baudrate": 300,
"baudrate_read": 9600,
"baudrate_change_delay": 500,
"parity": "7e1",
"read_timeout": 100
}
]
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.