Thanks for the not above as it promted me to verify a few things. I did verify the paths to the code via SSH and they did match. I did however change the code via the samba-addin and it simply had not written the code for some reason to disk. When I opened the file on my windows machine it showed the correct but when verifying on the machine via ssh I saw that the content was still the old version, so got that cleaned up and everything is working now. Thanks for your assistance in troubleshooting!
Released 2.9.2
Apparently HA 0.92 will require all custom components to have a manifest.json file. And the custom updater requires the component to have an __init__.py
file to load other files. This release should work with 0.92 and the latest custom updater.
NOTE: Because of the reorganization, it’s possible the custom updater may not be able to simply update the component. You may need to install it again using the
custom_updater.install
service. You may want to get the latest version before updating to 0.92.
Released 2.9.3
Hopefully this release will work now.
I have the beta in my dev install and I manually added an empty __init__.py
file to the folder and can confirm it started working after that.
I don’t use the custom updater.
I am on 0.91.3 and after updating via Custom Updater and restarting, Life360 no longer shows up there.
Inside of the custom_components/life360/
folder was only half the necessary file - device_tracker.py
and __pycache__
folder. But not the manifest.json or __init__.py
file. I downloaded both of those from the GitHub page and then restarted, it still does not show up in custom updater (even after pressing Check updates button).
I do still have the device_tracker in my states page though, but can’t seem to get it working in custom_updater
.
I did release 2.9.3 that hopefully finally dotted all the "i"s and crossed all the "t"s. I tested with a clean 0.91.4 install and was able to use the custom_updater to install it, and it seemed to work. (I had removed the REQUIREMENTS and DEPENDENCIES variables, because manifest.json replaced them. But that doesn’t work until 0.92. So to still be compatible with older HA versions – like the current one – I had to put those back.)
I used to be able to update the life360 component via the custom_updater, but it did not work this time, so now I replaced the device_tracker.py manually and rebooted. Now it I don´t see the life360 component anymore in the custom_updater card. Is that expected behavior?
Also tried adding the file __init__.py
and manifest.json
and not it doesn’t come back in the custom_updater card.
Btw I’m on 0.91.4 running on hass.io on an RPI.
Do you have:
custom_updater:
show_installable: False
track:
- components
- cards
- python_scripts
component_urls:
- https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
I didn’t and it showed on the card until the latest version when it stopped so I put it back and now it shows again.
Thanks klogg,
I only have custom_updater:
in my configuration.yaml. Are you suggesting I should add what you have?
I followed these instructions and it only mentions optional options:
Definitely try it.
I must admit I am now a little confused about what is needed where and when for the custom updater and the Lovelace tracker card but I am sure we definitely used to need to add a reference to every component, then I think that requirement stopped for some components apparently including Life360 but putting it back worked for me.
Can’t hurt to try it
If a custom component you are using is listed on this github site: https://github.com/custom-components there is no need to include the component_urls: option. Life360 is maintained separately on Phil’s github repo, so this option is definitely needed, exactly as his install documentation clearly states.
The track: option defaults to tracking components and lovelace cards so there is no need to include it unless you also need to track python scripts.
The latest custom_component documentation states that show_installable is not used anymore.
I’ve got it working in custom_updater again after trying several things. I did not have the component_url listed in custom_updater config and it was working for me until now. Once I added the json link and restarted it showed up again. Bottom two lines of this config fixed it:
custom_updater:
track:
- cards
- components
card_urls:
component_urls:
- https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
Tried @klogg options as well as @GaryOkie’s suggestions and lastly @seanM’s settings… and finally it appeared:
Strangely enough, I see in the startup log like if there are 2 versions loading now:
2 relevant parts in Config in my configuration.yaml:
device_tracker:
- platform: life360
username: !secret life360_username
password: !secret life360_password
interval_seconds: 10
filename: life360.conf
show_as_state: places, driving, moving
max_update_wait:
minutes: 30
and
custom_updater:
track:
- components
- python_scripts
component_urls:
- https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
python_script_urls:
- https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/python_scripts.json
Do others have this too?
Thanks!
Yes, I do.
Same for me which seems to be at odds to what @GaryOkie said.
But hey-ho. It all seems to be ok now.
That’s really interesting that custom_updater found the Life360 component for some of you without specifying the component_url path to Phil’s repo. I have no idea how that worked unless there is some undocumented path to Life360 that was added.
BTW - that python_script_url to his repo isn’t needed unless you are using his Light Store script - but it can’t hurt.
Phil’s instructions for using custom_updater are here - and they match exactly what @piggyback listed above.
EDIT: Maybe the reason there are two custom component warnings about life360 appearing in the log is due to the temporary change Phil made to duplicating some settings in the manifest.json and init.py ?
2nd EDIT: After updating device_tracker.Life360 to 2.9.3 and restarting Hassio 91.3, I am also seeing the duplicate warnings. I’m not concerned about it. Most likely just a slightly awkward side effect of the recent update to maintain backward compatibility.
I can’t speak for @klogg’s situation, but I think that in my specific case I installed Life360 manually before I set up custom_updater.
So the Life360 “install” process was already done and custom_updater always just automatically recognized it and updated it with zero issues until now, so I never realized that line was supposed to be there.
Even this time custom_updater did kinda work at updating to Life360 2.9.3, but it only updated the main device_tracker.py
file. I guess the references to the other (now necessary) files are inside that component_urls
json file and that’s why it broke for some of us.
custom_updater works without specifying the component_url because of this. customjson adds to what custom_updater automatically checks, as laid out here. When you explicitly add the component_url custom_updater checks the repo directly, but without it it gets checked against files that get updated a couple times a day. So basically, without specifying component_url there will just be a little delay before custom_updater sees the update. The reason life360 disappears if component_url isn’t specified is because of the new file structure and the customjson files not being updated yet to reflect that. So really, whether you specified component_url before or not before you shouldn’t have to make any change, it should all work itself out.
The reason you’re seeing the two warnings is because if the __init__.py file. That makes life360 not just a component, but a full platform with device tracker component. So one warning is for the platform and then you get another warning for each component (in this case just one).
Released 2.9.4
Sorry for any inconvenience. In trying to get ready for 0.92 I seem to have messed up support for the current release (multiple times. Argh! ) The latest mistake was putting the REQUIREMENTS and DEPENDENCIES statements back in the wrong place. Everything worked if the component was installed via custom_updater, but not if manually installed (and the pypi.org packages weren’t already installed.)
Released 2.9.5
Some minor cleanup (i.e., fix “lint” errors and move some error checking to custom configuration validators.)