RSS Widget not updating

Hi,
I have some strange beahviour for the RSS widget not updating its content. Other widgets are updating as expected. I have tried “everything”, like Chrome cache, deleting the subdirectory compiled. The only thing that did update the RSS components was restarting the appdaemon daemon itself and then refreshing the dashboard.

I found no clue in the java console, log or err files whats so ever.

So I thought that I start from the beginning, and see if anyone can give my a hint on where to start searching.
This is my setup:

Version 2.1.10

FILE - /etc/systemd/system/[email protected]

[Unit]
Description=AppDaemon
#[email protected]
[Service]
Type=simple
User=homeassistant
ExecStart=/usr/local/bin/appdaemon -D DEBUG -c /home/homeassistant/conf
#ExecStart=/usr/local/bin/appdaemon -c /home/homeassistant/conf
[Install]
WantedBy=multi-user.target

FILE - appdaemon.yaml

AppDaemon:
  logfile: /home/homeassistant/conf/appdaemon.log
  errorfile: /home/homeassistant/conf/appdaemon.err
  logsize: 100000
  log_generations: 3
  threads: 10
  api_port: 5000
  rss_feeds:
    - feed: http://www.aftonbladet.se/nyheter/rss.xml
      target: rss_news
  rss_update: 180

HADashboard:
  dash_url: http://IPTHISMACHINE:5050
  dash_dir: /home/homeassistant/conf/dashboards

HASS:
  ha_url: http://IPTHEOTHERMACHINE:8123

FILE - MyMorningPanel.dash:

#
# Main arguments, all optional
#
widget_dimensions: [225, 150]
widget_margins: [10, 10]
columns: 8


layout:

    - include: mymorning_middle_panel

FILE - mymorning_middle_panel.yaml:
rss_news:
    widget_type: rss
    entity: rss_news
    interval: 5
    title: Aftonbladet
    text_style: "font-size: 125%; font-weight: bold"

layout:
    - rss_news(2x1)

Where do I start?

Regards PetrolHead

seems correct to me, but it can be that your hardware has a problem with a short interval from 5 seconds.
so you could try to set that higher.

what kind of device do you use to view the dashboard?
have you also tried it on something else?

Thanks for your reply,

Hadashboard running on a rpi3.
I have tried with chrome on Rpi and Windows. IE on windows. Tried with different windows clients one that has never viewed the hadashboard before ie definitely no client cache involved.
“Empty Cache and Hard Reload” didn’t have any effect. Not until I restarted the daemon then the updated news showed up. I think I have ruled out the local web browser cache as the culprit.

No errors in appdaemon.err or in the java console. No unusual debug msg in appdaemon.log either.

It’s like the rss_update interval is ignored, what could cause that? Network errors?

could be.
maybe the pi has some AD parts cashed as well.
did you also try a complete restart?

i have never used the RSS so i cant debug wth you.
like i said, you could try to set it to a higher interval (in the hope that is what is causing the problem)

maybe that @aimc has a clue why this isnt working.

Thanks,
Changed rss_update to 600 and interval to 50 last night and can not see any improvement.

In the log this type of debug line is only seen at restart of the daemon:

2017-11-15 10:46:32.356872 DEBUG AppDaemon Section: {'rss_feeds' ..... yada yada ..... from the appdaemon.yaml file

But no other debug lines related to rss at all, is this what’s expected?

I would expect to see some rss related messages like:

2017-11-15 12:14:55.377526 DEBUG Sending data to 1 dashes:  {'event_type': 'state_changed', 'data': {'new_state': {'feed': {'namespaces

Regards PetrolHead

Something wrong here maybe?
Cut from rundash.py

@asyncio.coroutine
def update_rss():
    # Grab RSS Feeds

    if conf.rss_feeds is not None and conf.rss_update is not None:
        while not conf.stopping:
            if conf.rss_last_update == None or (conf.rss_last_update + conf.rss_update) <= time.time():
                conf.rss_last_update = time.time()

                for feed_data in conf.rss_feeds:
                    feed = yield from utils.run_in_executor(conf.loop, conf.executor, feedparser.parse, feed_data["feed"])

                    new_state = {"feed": feed}
                    with conf.ha_state_lock:
                        conf.ha_state[feed_data["target"]] = new_state

                    data = {"event_type": "state_changed",
                            "data": {"entity_id": feed_data["target"], "new_state": new_state}}
                    ws_update(data)

            yield from asyncio.sleep(1)

yeah i can see a problem there.
i dont know if thats a bug or an oversight or that its recalculated elsewhere, but

conf.rss_last_update is a time and
conf.rss_update is an int

and in line 6 they are added together which normally gives an error.
but then there should be an error somewhere.

off course it could be just my little knowledge from python, but maybe that @aimc can tell more about it.
but he is a bit busy at the moment so you might have to have a little patience.

Thanks,
I actually added some debug statements in rundash.py and as far as I can see update_rss is called at start up, and is run successfully. So the time and int is not causing a problem.
The problem seams to be that there was some kind of problem with the result from my rss feed.
The ws_update(data) call didn’t return.

What kind of problem I can not say, it didn’t generate an error of any kind
Thanks for your support.

i should have thought to ask you to use another feed to check if the problem is there :wink:
but at least you now know the problem, and we didnt need @aimc for that :slight_smile:

I;'m here guys :wink:

I have noticed some feeds just don;t work - I’m not sure why and haven;t had a chance to look …

1 Like

Hi,

ws_update don’t even writes a debug message so I would have a look at these two rows in rundash.py:

def ws_update(jdata):
    if len(app['websockets']) > 0:

and furthermore my rss result was huge.

Regards PH