Custom Widget - RSS Ticker

Hi all

Had an idea last night for a custom widget - an RSS ticker. Was trying to get the basis for one to work, using a stock ticker as a model (would think about a news version and potentially a sports one too).

I found a stock ticker ticker that I liked, and it has embedded javascript code you can use on your HTML pages - I thought that made sense and try to embed it in a Widget.

Here is the ticker code I found:

It’s even customizable - which I think would allow those fields to be made a widget parameters.

I created a new Program called RSS Ticker that just has this command to bind it to my new widget:
Program.UseWidget( “homegenie/generic/ticker” );

Then I created a new Widget. I used a shell from an existing widget and then put the embedded javascript code inside that.

The frame for the widget will display, along with the " Quotes by TradingView" part but the actual ticker does not display.

Anyone have any suggestions on if this is possible and perhaps have a model of something I could use ? While I am familiar with coding (I use a proprietary language in my work) I am still fairly new at JavaScript and HTML.

Thanks

I don’t use RSS feeds myself but I think I remember one embedded into the original version of HG on the Dashboard but I may be wrong.

Are you using a stock version of HG or a modified version.

Stock version. I do have some tweaks to some of the widgets but as far as I know it’s the stock version. Do you recall what the name of the widget was or have an example ?

That’s just too funny . I was thinking about something like that last night and was going to look into it on the week end.
However I can’t for the life of me remember what I wanted it for. :thinking:

I know what I’d like to do I just don’t know how to do it.

And apparently I have 2 accounts here (this one and soxfan1966) - will try and clean that up tomorrow.

You seem to have grasped the HG concept quite quickly and appear to have a lot to offer. I suggest having a good read of the old HomeGenie forum to get a flavour of what users were discussing and what the contributions they were offering and requesting and taking it from there.

A lot of new technologies have arrived on the scene since the old forum closed down but you can get the general picture of what HG was all about.

As for the dual HG personality on this forum. You wouldn’t be the first user to do this :joy:

I was trying to figure out if you installed HG from the https://genielabs.github.io/HomeGenie/#/get_started source

I am running the PiX10Hub that comes installed with HG - but I believe it does use that as the source.

I read thru a bunch of posts on the old forum - it seems to have been very active discussion wise.

I didn’t see anything mentioning RSS but a few about external VB script calls that mentioned those do not work. There is a post about SunCalc, which seems to be the precursor to the Astronomy widget and JavaScript but I think that uses code in the widget and not an external call (will look though).

I was also going to look thru GitHub in the HG code and see if any of the Widgets I removed may have something.

If anyone has any other ideas or suggestions please let me know. Thanks

I had planed to use the homegenie/generic/status widget as a starting base and build from that.
This is what I used for several of my info displays and believe it would work fine for the stock ticker with very little modification required.
Now If I could just remember the rest of what I wanted to do :rofl: :thinking:

I could share what I have so far if you (or someone else) wanted to take a look. I used one of the widgets I have as a model. The external reference to the JavaScript just doesn’t seem to be working.

In addition to a stock one, I was thinking about a sports one too (maybe news also). I was going to have my main Dashboard show the weather and the tickers as part of a home automation control panel in my kitchen (a tablet or Echo Show is my current idea).

By all means do share it will help me & others understand things your trying a bit more.
I had played with RSS feeds a few years back in one of the programs I created with
visual studio VB. I’ll try to find that code as it may be useful once converted to C#.

Here is the Program and Widget code I have so far.

homegenie_generic_ticker.zip (2.1 KB)

1037-RSS_Ticker.hgx (908 Bytes)

I had a quick look today at this and it appears to be based of the info widget .
I think the script should be in the Java section, however I didn’t get a chance to play around any.
Java script I have little understanding of and HTTP not much more.

Well, I think i have it working - I still need to figure out how. I ended up going back to the original website and using chrome tools inspected the container that the page was using to display the ticker - I then copied that and pasted into my Widget and now it works (and by works I mean displays the info).

Will need to take some time to review it now and figure out what its doing that I was missing the first time - and then adapt it from there. Update program and widget attached,
image

1037-RSS_Ticker.hgx (983 Bytes)

homegenie_generic_ticker.zip (2.6 KB)

Well done.

Sometimes when you step back and reevaluate the problem the solution becomes clearer. The manic approach never pays off in the long run. You managed to resolve the problem yourself in the end.

For what it’s worth. it appears the iframe tag is what got it working. I’m not an HTML expert by any means so I looked into it - the iframes are used to display a web page within a web page.
https://www.w3schools.com/html/html_iframe.asp

I’m going to work on this some more, trying to allow the user to define the Stock Symbols to display etc.

Nice work! The user define stock options would make things simpler for some.
I still haven’t remembered what I wanted to do with something like this. :roll_eyes: :blush: But do remember I wanted it to scroll sideways like this https://www.tradingview.com/widget/ticker-tape/ :thinking: Maybe it will come to me before I forget what HG is for :rofl:

I got the ticker to scroll the way I wanted! :thinking: Maybe I just wanted the breaking news but most likely it was status of my off grid solar production, man it sucks getting old.