Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showrss compatibility? #24

Open
gurkburk76 opened this issue Oct 30, 2019 · 8 comments
Open

showrss compatibility? #24

gurkburk76 opened this issue Oct 30, 2019 · 8 comments
Labels
help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@gurkburk76
Copy link

Not sure if it's showrss fault or this plugin, but when i use it to get stuff from there it won't show in home assistant.
Any way to get around this or make it compatible ?
showrss.info

@iantrich iantrich added the help wanted Extra attention is needed label Jul 1, 2020
@ogajduse
Copy link
Collaborator

ogajduse commented Aug 9, 2023

Works for me.

Using the following config

- date_format: '%a, %d %b %Y %H:%M:%S UTC%z'
  exclusions: []
  feed_url: https://showrss.info/show/1103.rss
  inclusions:
  - image
  - title
  - link
  - published
  local_time: false
  name: showrss_sex_education
  platform: feedparser
  scan_interval:
    seconds: 3600
  show_topn: 9999

image

@ogajduse
Copy link
Collaborator

ogajduse commented Aug 9, 2023

@gurkburk76 Do you still face the issue?

@ogajduse ogajduse added the question Further information is requested label Aug 9, 2023
@hjallex
Copy link

hjallex commented Aug 10, 2023

Hi,

I think I have the same problem.
I have tryed your exampel @ogajduse but it will give me the same result as my own code.
The /config/configuration.yaml code is green and a restart of homeassistant is possible.
I have also tested to switch browsers, units and apps.

My code is:

sensor:
  - platform: feedparser
    name: RSS_DN
    feed_url: 'http://www.dn.se/nyheter/m/rss/'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
      hours: 3
    inclusions:
      - title
      - link
      - description
      - image
      - pubDate
    exclusions:
      - language

When I go to Deweloptools and search for entity: rss_dn nothing will come up...

Please give me some help.
Thank you!

@ogajduse
Copy link
Collaborator

@hjallex I forgot to mention that I tested it with the 0.2.0b2 pre-release. I plan to release 0.2.0 and there are some beta releases available. I would be more than grateful if the community would try the beta releases before I release it.

Could you please try installing the 0.2.0b2 release through HACS and let me know if it works for you?

@hjallex
Copy link

hjallex commented Aug 12, 2023

I have updated to your 0.2.0b2 beta version with hacks.
Restarted HA.
Tryed to find "RSS_DN" or "showrss" but nothing.
So I was making some adjustment in the yalm.
But it did't work.

My yalm file is green and when I go to next site for "check configuration and restart button" I got an error.
I have tryed with "sensor" and without sensor.
I'm send you some copy from my yalm and restart site. This is my latest test.

My yalm code:

#sensor:
  - platform: feedparser
    name: RSS_DN
    feed_url: 'http://www.dn.se/nyheter/m/rss/'
#    feed_url: 'https://www.sciencedaily.com/rss/matter_energy/engineering.xml'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
      hours: 3
    inclusions:
      - title
      - link
      - description
      - image
      - pubDate
    exclusions:
      - language
    
sensor:
  - platform: feedparser
    name: Engineering Feed
    feed_url: 'https://www.sciencedaily.com/rss/matter_energy/engineering.xml'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
      hours: 3
    inclusions:
      - title
      - link
      - description
      - image
      - pubDate
    exclusions:
      - language

My error:
Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 57).
Invalid config for [sensor.integration]: [unit_of_measurement] is an invalid option for [sensor.integration]. Check: sensor.integration->unit_of_measurement. (See ?, line ?).
Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 57).
Skärmbild 2023-08-12 132819
Skärmbild 2023-08-12 132710

With your exampel from above:

#sensor:    
  - feedparser:
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
#    exclusions: []
    feed_url: 'https://showrss.info/show/1103.rss'
    inclusions:
     - image
     - title
     - link
     - published
    local_time: false
    name: showrss_sex_education
#   platform: feedparser
    scan_interval:
        seconds: 3600
    show_topn: 9999
  - date_format: '%a, %d %b %Y %H:%M:%S %z'
#  exclusions: []
    feed_url: https://showrss.info/show/1103.rss
    inclusions:
    - image
    - title
    - link
    - published
    local_time: false
    name: showrss_sex_education
    platform: feedparser
    scan_interval:
      seconds: 3600
    show_topn: 9999

I can make a correct restart but I cant find the "name: showrss_sex_education" in the list.
My conclusion is: the beta version is not working ether.

Thank you!

@ogajduse
Copy link
Collaborator

I have successfully used the config that you posted and feedparser 0.2.0b2 correctly populates the data to the sensor.

sensor:
  - platform: feedparser
    name: RSS_DN
    feed_url: 'http://www.dn.se/nyheter/m/rss/'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
      hours: 3
    inclusions:
      - title
      - link
      - description
      - image
      - pubDate
    exclusions:
      - language    

  - platform: feedparser
    name: Engineering Feed
    feed_url: 'https://www.sciencedaily.com/rss/matter_energy/engineering.xml'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
      hours: 3
    inclusions:
      - title
      - link
      - description
      - image
      - pubDate
    exclusions:
      - language

image
image

I am looking at the screenshot of configuration.yaml that you included.
Beware that the sensor section has to be defined only once. Also for every sensor entry in the configuration, you have to specify platform - in our case, it is feedparser Lines 45-59 should be placed under line 79 as all sensors need to be nested under the sensor section.

If you have troubles with configuration

Note: I would recommend you use published instead of pubDate. That adds the date to the feed entry in the sensor. I see that it is not well documented in the README, so I have created #90 to address it.

@hjallex
Copy link

hjallex commented Aug 18, 2023

Hi, now it sems to be working perfect!
Tank you!

ogajduse

`sensor:

  • platform: feedparser
    name: RSS_DN
    feed_url: 'http://www.dn.se/nyheter/m/rss/'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
    hours: 3
    inclusions:
    • title
    • link
    • description
    • image
    • published
      exclusions:
    • language
  • platform: feedparser
    name: RSS_Aftonbladet_Senastenytt
    feed_url: 'https://rss.aftonbladet.se/rss2/small/pages/sections/senastenytt/'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
    hours: 3
    inclusions:
    • title
    • link
    • description
    • image
    • published
      exclusions:
    • language
  • platform: feedparser
    name: RSS_SKOLMATEN
    feed_url: 'https://skolmaten.se/information-##########/rss/days/?limit=7'
    date_format: '%a, %d %b %Y %H:%M:%S %Z'
    scan_interval:
    hours: 3
    inclusions:
    • title
    • link
    • description
    • image
    • published
      exclusions:
    • language
      template:
    • name: Cooler output
      unique_id: cooler_output
      unit_of_measurement: "%"
      state: "{{ state_attr('climate.smart_thermostat', 'control_output') }}"

`

@ogajduse ogajduse added this to the Release 0.2.0 milestone Aug 21, 2023
@Thomas-Wimmer
Copy link

To add to the ShowRSS question: How can I add the fields with a colon in the name (like tv:show)?

From the example RSS feed given:
<tv:show_name>Sex Education</tv:show_name>

Just putting a - "tv:show_name" in the inclusions: sections doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants