james-fry / hassio-addons

Repository for hass.io add ons
99 stars 96 forks source link

Latest Supervisor Update - 2021.02.5 - keeps this add-on from starting #39

Open DarwinData opened 3 years ago

DarwinData commented 3 years ago

The errors are: 21-02-08 22:23:48 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of RTL_433 to MQTT Bridge 21-02-08 22:23:48 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'devices' use a deprecated format, the new format uses a list of paths only. Please report this to the maintainer of RTL_433 to MQTT Bridge Can this be fixed? thanks

stevehollx commented 3 years ago

The error in the log (usb_start error -1) also aligns with the issue being the change to the devices: attribute in config.json.

I believe the changes in config.json would be to something like below: “startup”: “services” "devices": ["/dev/bus/usb"]

DarwinData commented 3 years ago

I am running Home Assistant OS in Proxmox. Where and how can I find the config.json file so that I can edit it? thanks for your help.

franfos commented 3 years ago

The error in the log (usb_start error -1) also aligns with the issue being the change to the devices: attribute in config.json.

I believe the changes in config.json would be to something like below: “startup”: “services” "devices": ["/dev/bus/usb"]

Hi, did you have any success in your tests? I'm facing the same issue... If you want me to test something let me know

stevehollx commented 3 years ago

I forked the code and changed the config.json and added my personal repo to install the fork as a quick test last night. I think the startup errors in the supervisor log went away (only took a quick glance), but still got the 'usb_start error -1' in the add-on log when starting the service. There may be something more at play, but still something around getting the add on to see the USB device. I am not confident in the syntax to move from "devices": ["/dev/bus/usb:/dev/bus/usb:rwm"] to the new syntax, other than it should be a list.

Maybe one of these permutations? Don't have time to test thoroughly for a few days. "devices": ["/dev/bus/usb","/dev/bus/usb:rwm"] "devices": ["/dev/bus/usb:rwm"] "devices": ["/dev/bus/usb"]

I searched around to see if any other addons that use USB have updated the line in github yet but couldn't find any. Not entirely sure how to handle the 'rwm' parameter...

DarwinData commented 3 years ago

stevehollx, I did exactly the same thing. Forked, changed config.json to "devices": ["/dev/bus/usb"] and still have the same 'usb_open error -1' error on startup. I am no pro at forking or python/yaml coding so I am taking stabs in the dark. I really need this addon to work and not sure what to try next.

franfos commented 3 years ago

Hi, I've forked @stevehollx version and made some changes, and it looks it's working. I've removed "boot", "devices" and added "usb": true. Not sure if everything is needed or not, but it's working again. Should I made a PR?

DarwinData commented 3 years ago

franfos, Good work! I had created my own fork and tried varies settings for devices with no luck. Replacing the "devices" setting with "usb": true did the trick.. Once this original version is updated I will revert back to it. thanks for this.

franfos commented 3 years ago

I was going to make a PR, but I realized that repository.json points to "https://github.com/accelle17/hassio-addons" instead of "https://github.com/james-fry/hassio-addons". Is that correct?

DarwinData commented 3 years ago

I don't know the implications of changing the repository.json file but in my case, I changed the line to point to my own forked repository and it is working for me. In terms of a PR I am not sure.

stevehollx commented 3 years ago

The repo link should point to the official repository for the add-on instead of the forked ones. They have been modified upstream for testing but the PR should have it set to: https://github.com/james-fry/hassio-addons

DarwinData commented 3 years ago

Understood, will change it back on my forked repo. Thanks for helping.

torbjornaxelsson commented 3 years ago

I'm getting the usb_open error -1, glad to find an issue and what looks like a solution. Thanks guys! From what I can tell the solution is in pull request #40 with the small change in config.json

Is there a way to manually edit config.json within the addon or do I need to wait for it to be updated in the main repo? Cheers

JJoaquinrl commented 3 years ago

Hi. Can someone explain what to do to fix it, or put the modified files. I can't find the config.json file

Thank you

CatalinGB commented 3 years ago

I was able to have it working again on rPi 4 by forking DarwinData/hassio-addons and changing the Alpine base image.

When I've tried to build the image the DNS resolution didn't work. It seems that the latest ghcr.io/hassio-addons/base/armhf(FROM $BUILD_FROM) points to alpine:3.13.0 which is known to be not working on rPi.

The working version can be found here. Please bare in mind that the rtl2mqtt.sh has the protocol hard-coded so it works with multiple protocols.

poohbah commented 3 years ago

Same issue here (usb_start error -1).

For anybody wondering how to get this running again, I copied my addon config to a text file, added the darwindata repo to hassio (Supervisor - addon store, three dots in upper right and add respository), uninstalled the jamesfry version of thertl433 addon but left the repo installed, installed the addon from darwindata repo, added my config, and I'm up and running again. I left my rtl2mqtt.sh alone.

Thanks all for getting a fix together.

issvc commented 3 years ago

Hello. Than you for fixing the issue! I installed the forked version https://github.com/DarwinData/hassio-addons/tree/master/rtl4332mqtt and when it starts I get the following error, please help: Add-on version: 0.2.1 You are running the latest version of this add-on. parse error: Expected string key before ':' at line 1, column 4 [12:56:39] ERROR: Unknown HTTP error occured System: (aarch64 / raspberrypi4-64) Home Assistant Core: 2021.2.3 Home Assistant Supervisor: 2021.02.11

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

BigRed8150 commented 3 years ago

thank you for the updates on this. it was driving me crazy trying to get the usb to load.

mbaran5 commented 3 years ago

Is anyone seeing periodic high CPU utilization with any one of the forked repos? Mine addon will suddenly jump to 100% CPU and clog up the whole host until I restart the process.

mmiller7 commented 3 years ago

Is anyone seeing periodic high CPU utilization with any one of the forked repos? Mine addon will suddenly jump to 100% CPU and clog up the whole host until I restart the process.

I have not so far, but all of them build the rtl_433 program when you fetch the repo so its quite possible depending what you are trying to run it may have code changes that are buggy depending which sensor types you have enabled.

You could try hitting "rebuild" and hopefully it will fetch fixed libraries and code to build.