Should I Upgrade from 49.1 to newest Home Assistant

Hello

I have been running 49.1 for a long time now and have been thinking of Upgrading to the newest version. I have been running 49.1 because of the problems there was with the IOS 9 issue, I know that was fixed for a while now. Everything is working good I’m thinking of Feature added devices.

I am running Rasbian on a RPI3 using the MQTT in home assistant, have hasska installed, with lots of skills, Duckdns and LetsEncrypt, using life 360 shell script.

My Questions are,

Should I install Rasbian or Hass.io
Should I use MQTT istalled with HA or maybe on another PI
Do I have to reintall hasska
I know I’ll have to do Duckdns and LetsEncrypt
The life 360 I heard its handled different or can I still use the shell script.

Also can I run both at the same time for testing

depending on how much time you want to spend on it and what components you have installed will make the decision on either upgrading or just going to a fresh install.

if you go the upgrade route then there are numerous breaking changes that you might have to deal with (or might not depending on components). One thing that you will definitely have to deal with if not already done is upgrading python to at least python 3.5. That’s kind of a big thing but is doable following the instructions found on several threads in the forum.

If you go the fresh install route then you won’t necessarily have to deal with the same breaking changes (depending on components) but you will have to set everything up from scratch. If you have a good handle on all that (including the ever-changing Amazon AWS set up of Haaska) then it might be a little easier doing that.

And I tried hassio but didn’t like the interface for interacting with it. probably because i was already used to hassbian.

the bottom line is that either way is going to bring its own set of issues so which one you do is a matter of person choice and abilities.

You can try hassio easily enough. Copy your config files off to your ‘pc’. Get a fresh sd card and put the hassio image on it. Once it comes up, you can install the samba/cifs add-on and copy your previous config files/automations, etc over to the /config share. As @finity points out, you will need to go through the breaking changes that have happened between .49 and .69 to address some required configuration changes, but that is not tied to hassio. I also have the DuckDNS, SAMBA, and SSH add-ons. The transition was pretty painless.

If you can’t make the jump to hassio, then pop your old card back in.

Hi @Dee! I’ve only been using HA for a short time, and I don’t use Hass.io, so I can’t comment on those aspects. However, I have created a new Life360 integration that doesn’t depend on or use MQTT or shell commands that you might want to consider. (I don’t know what changed since 0.49.1, so I can’t be sure, but you might be able to use it even if you don’t decide to upgrade HA.) None of the Life360 integrations are “official”, as far as I know, and they all have their advantages and downsides, so whether you stick with what’s been working for you or try my new integration is, of course, up to you. If you’re interested, check out:

@pnbruckner
HI Phil I’m still running my HA 0.49.1 as my main HA, I do have one running with the newest version on it, and I got everything working except one thing, I can’t get my Alexa Intents in HA working, do to the new format for alexa,
alexa:
smarthome:

until I can I’m keeping my 0.49.1 running,

I was wondering if the older 2 files are still available I looked around but didn’t see them. I was going to try and see if I could get yours to work.
Thanks

By “older 2 files” are you referring to the MQTT-based Life360 integration you had used before? If so, don’t really know about that.

I would think there’s a good possibility of getting my Life360 integration to work on 0.49.1, but again, that was way before my time and I don’t know what might have been different back then. If you try it and run into problems, let me know – I might be able to do something about it for you.

I am using the MQTT-based I was going to give yours a try on my 0.49.1, I thought I seen yours had 2 files to be used for older HA versions

No, there’s just one file. There used to be two, but one of them was published to pypi.org so you don’t have to install that one manually anymore. Just follow the instructions here, and pay special attention to the note about older versions of HA.

Ok thanks I was wondering because 0.49.1 uses python 2.7 would I have any problems?

Oh, good question. Didn’t know that. I’ve only tried it on Python 3.5+. Again, if it doesn’t work, let me know, I might be able to make some changes to support your use case.

Well, I just tried the life360 pypi.org package and it doesn’t work with Python 2.7. It uses the ‘raise xxx from error’ syntax that 2.7 doesn’t support.

I did find out 0.49.1 is python 3.4.2 I get a syntax error but still checking

FWIW, I created the custom component back in the March through May 2018 time-frame, so that was probably HA version 0.66-ish.

If you can share the errors you’re seeing, again, I might be able to help you get it working.

@pnbruckner The oldest one I could find was Sept. 7, 2018 looks like that was your first release.

In march HA was on 0.66.0 In September HA was on 0.77.2 but I think I read you was still on a older version of HA at the time, so should I try your first release?

@pnbruckner So I installed the Sept. one here is the error log

2019-03-13 11:12:17 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.device_tracker.life360. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/loader.py”, line 141, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.4/importlib/init.py”, line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 2254, in _gcd_import
File “”, line 2237, in _find_and_load
File “”, line 2226, in _find_and_load_unlocked
File “”, line 1200, in _load_unlocked
File “”, line 1129, in _exec
File “”, line 1471, in exec_module
File “”, line 321, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/device_tracker/life360.py”, line 11, in
from json.decoder import JSONDecodeError
ImportError: cannot import name ‘JSONDecodeError’
2019-03-13 11:12:17 ERROR (MainThread) [homeassistant.loader] Unable to find component device_tracker.life360

Actually the first “versioned” release that added support for using custom_updater was in Sept., 2018. The oldest in github actually goes back to May, 2018.

I would actually suggest using the latest, using the instructions that are specific to HA versions before 0.86. I don’t recall “off the top of my head” any changes I might have made along the way that would make the latest version any less likely to work for you than the oldest versions. Hopefully any issues are fairly easily resolved (such as when from time to time other components in HA get moved about.)

@pnbruckner OK installed latest here is the error log

2019-03-13 11:46:00 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py”, line 61, in async_setup_component
return (yield from task)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/asyncio/tasks.py”, line 237, in _step
result = next(coro)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py”, line 156, in _async_setup_component
conf_util.async_process_component_config(hass, config, domain)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/config.py”, line 589, in async_process_component_config
platform = get_platform(domain, p_name)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/loader.py”, line 103, in get_platform
return get_component(PLATFORM_FORMAT.format(domain, platform))
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/loader.py”, line 141, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.4/importlib/init.py”, line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 2254, in _gcd_import
File “”, line 2237, in _find_and_load
File “”, line 2226, in _find_and_load_unlocked
File “”, line 1200, in _load_unlocked
File “”, line 1129, in _exec
File “”, line 1467, in exec_module
File “”, line 1572, in get_code
File “”, line 1532, in source_to_code
File “”, line 321, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/device_tracker/life360.py”, line 224
zone = Zone(hass, *place, None, DEFAULT_PASSIVE)
^
SyntaxError: only named arguments may follow *expression

Please format the log lines by putting a line before and after them that contains three “back tick” characters, like this:

```
log lines
```

It will make them much easier to read. Thx!

So this error I’m not sure about. Must be something different in Python 3.5+ vs 3.4.

The previous error, though, is easy enough to deal with. I checked the Python 3.4.2 docs and at that time a json decoder error raised a ValueError, whereas now it raises a JSONDecoderError. But JSONDecoderError is just a subclass of ValueError.

At this point I’d suggest trying version 1.6.1. This was just before I added the code that can create HA zones from Life360 Places (i.e., where the last error you saw comes from.) Unfortunately this was before I moved the lower level code to pypi.org, so you will need to get two files:

custom_components/life360.py
custom_components/device_tracker/life360.py

Then, in device_tracker/life360.py, comment out line 11, which is:

from json.decoder import JSONDecodeError

And change line 355 from this:

       excs = (HTTPError, ConnectionError, Timeout, JSONDecodeError)

to this:

       excs = (HTTPError, ConnectionError, Timeout, ValueError)

Then let me know how it goes.

Sure enough, this changed in 3.5:

If you want to stick with the latest life360 version (which is still probably the best option), then change that line:

        zone = Zone(hass, *place, None, DEFAULT_PASSIVE)

to:

        zone = Zone(
            hass, place.name, place.latitude, place.longitude, place.radius,
            None, DEFAULT_PASSIVE)

And still make the other changes. There is probably at least one other change you’ll need to make which concerns how the zone component had been reorganized. You’ll probably need to change this:

from homeassistant.components.zone import (
    DEFAULT_PASSIVE, ENTITY_ID_FORMAT as ZN_ENTITY_ID_FORMAT, ENTITY_ID_HOME,
    Zone)
from homeassistant.components.zone.zone import active_zone

to this:

from homeassistant.components.zone import (
    DEFAULT_PASSIVE, ENTITY_ID_FORMAT as ZN_ENTITY_ID_FORMAT, ENTITY_ID_HOME,
    Zone, active_zone)

@pnbruckner OK I did the first one you said and it loaded :slight_smile:
Now I’ll install the latest, Oh just incase some one else it trying Line 355 should be line 335 :slight_smile: