Core: New binary_sensor.updater doesn't work

Created on 30 Aug 2019  路  27Comments  路  Source: home-assistant/core

Home Assistant release with the issue:

0.98

Last working Home Assistant release (if known):
None (new component).

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io / Docker / Raspbian Buster

Component/platform:

https://www.home-assistant.io/docs/backend/updater/

Description of problem:
Updater sensor shows that newest version is 0.98, while version component shows 0.98.1 as newest one (see screenshot). The sensor has 'off' value, of course.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

updater:

Traceback (if applicable):
Screen Shot 2019-08-30 at 16 41 46

Screen Shot 2019-08-30 at 16 41 16

Additional information:

updater stale

Most helpful comment

@Nihvel No need to use so custom approach, just use standard HA component:
```sensor:

  • platform: version
    name: Current HA version
    source: local
  • platform: version
    name: Last HA version
    source: hassio
    ```

All 27 comments

Does this still persist on 0.98.1?

Of course, I can鈥檛 check if it works in 0.98.1, since it is exactly the newest version. Thus the sensor will show the same result in both cases whether it works or not. That鈥檚 why I checked it in 0.98 with 0.98.1 existed.

I understand where you are coming from but my reasoning was that this sensor had just been introduced and a new release could maybe solve that issue.
Have you tried to restart your system? Forcing the sensor to query its rest api again to see if it this issue persists.

btw should we disable this new sensor on hassio ? what is written in docs may be not about new sensor, but the old one

For me it's always unavailable

image

I understand where you are coming from but my reasoning was that this sensor had just been introduced and a new release could maybe solve that issue.
Have you tried to restart your system? Forcing the sensor to query its rest api again to see if it this issue persists.

The documentation is definitely not updated yet. Hope, it will be updated soon.
I restarted the system several times.

Hmm that is really weird. The last thing I could think off right now is to use the service homeassistant.update_entity. Manually forcing binary_sensor.updater to update.

Hey there @home-assistant/core, mind taking a look at this issue as its been labeled with a integration (updater) you are listed as a codeowner for? Thanks!

After restarting the sensor waits an hour. In this hour the sensor is unavailable. After the first hour the sensor updates once a day, so it may have a delay of at max 24 hours.

Please notice, that the rest API https://updater.home-assistant.io is also delayed sometimes. At the moment it points to 0.98.1
{"release-notes":"https://www.home-assistant.io/latest-release-notes/","version":"0.98.1"}

For the next release just wait at least a day to see the update sensor working.

@Spirituss what part of documentation are you missing?

@Santobert thanks for the insight! :) Could you elaborate on why the sensor waits one hour after restart to fetch the REST API?

@springstan this was so before I've made it a binary sensor. I guess they add the waiting time to prevent overload in the startup sequence. I could also imagine that some systems have to wait for the network to become available before fetching things from the internet.

I think the real issue here is, that https://updater.home-assistant.io/ is delayed and unreliable. It looks like this site is managed manually. In my opinion it would be better to automate it using the GitHub API and the latest available release. But I don't know any details about this.

@santobert that makes a lot of sense. Considering how often people restart their system sometimes.
And I completely agree with your second point, this should be automated as well.

It's manual right now, but that's because it was recently migrated and the automatic version updater based on https://www.home-assistant.io/version.json has been lost. Added it back to to do list.

@springstan I have checked the sensor with last update. It still does not work.

Screen Shot 2019-09-04 at 19 15 10

Screen Shot 2019-09-04 at 19 15 02

@Spirituss Good to know, but I am sure it will be fixed soon :)

Good day everyone, the issue is still present. At the moment I'm writing, the latest release is 0.99 and I run the 0.98.5 (the latest of 0.98). The sensor reports:

release_notes: https://www.home-assistant.io/latest-release-notes/
newest_version: 0.98.5
friendly_name: Updater

It seems that this sensor was somebody鈥檚 good idea but nobody wants to implement it.

I thought about the following and I thank the user @daskin on the Discord group for the sensor(s).

sensor:
  - platform: rest
    name: HA Latest Version
    resource: https://www.home-assistant.io/version.json
    value_template: >
      {{ value_json.current_version }}

  - platform: version
    name: HA Current Version

automation:
  - id: 'Is ha latest version'
    alias: Is ha latest version
    trigger:
    - platform: state
      entity_id: sensor.ha_latest_version
    condition:
    - condition: template
      value_template: "{{ trigger.to_state.state != state.sensor.current_version.state }}"
    action:
# whatever you like

@balloob I've created a small approach for automating the content of https://updater.home-assistant.io/ here:
https://github.com/Santobert/GithubLatestRelease

This is only a small approach and not intended for production use. In addition, the handling of the uploaded content is not included. But apart from these points, it works pretty well.

I can offer to try to implement a similar solution for production if you show me where the current source of https://updater.home-assistant.io/ lies. As an alternative we can call the github api from the updater component itself. In this case the endpoint https://updater.home-assistant.io/ would only be used to post usage data to. What do you think?

Is it planned to merge https://www.home-assistant.io/version.json and https://updater.home-assistant.io/ into one solution?

Edit ---

Just to see what it could look like:
http://ec2-54-93-234-112.eu-central-1.compute.amazonaws.com/

@Nihvel No need to use so custom approach, just use standard HA component:
```sensor:

  • platform: version
    name: Current HA version
    source: local
  • platform: version
    name: Last HA version
    source: hassio
    ```

Just to see what it could look like:
http://ec2-54-93-234-112.eu-central-1.compute.amazonaws.com/

I'll take this offline again. At the moment it returns the following json string:

{"release-notes": "Frontend fixes\r\n  -  fix continue integration flow (#3766) @bramkragten\r\n  -  Show toast on success save entity settings (#3763) @bramkragten\r\n  -  Align behaviour state badge (#3767) @bramkragten\r\n", "version": "0.99.2"}

If you don't like these release-notes, that are extracted out of the release notes from github, we could hard-code the release notes to https://www.home-assistant.io/latest-release-notes/

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I just did a reinstall of HA 104.3 (after rm -rf /home/pi/homeassistant, did not also delete /home/pi/.homeassistant) and the binary_sensor.updater for me is "unavailable"

I too am getting unavailable wherever I try displaying this in the front-end. However, if I remove it from the GUI and then look in unused entities I can find binary_sensor.updater and its value will changed as expected when updates become available/unavailable.

But, as soon as I add it back to the front-end via lovelace.yaml it give the same unavailable dialogue.

https://www.home-assistant.io/integrations/updater/

The updater binary sensor will wait one hour after startup until it performs the first update. For this period it will be in the state unavailable. After that it will check once a day for new releases.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sogeniusio picture sogeniusio  路  3Comments

neonandu picture neonandu  路  3Comments

Elmardus picture Elmardus  路  3Comments

moskovskiy82 picture moskovskiy82  路  3Comments

coolriku picture coolriku  路  3Comments