Custom Feedvalue Widget

Hey guys

I enhanced and rewritten the feedvalue widget to allow to choose a font type, colour and also size of the text!

Here you see the admin section of it:

And here you see it in action. You will see the different font and size in comparison to the standard widget

Before I do pull request can someone please test it? I named it feedvalue_custom lacking a better word. I also didn’t want to break existing usage. Here is a link to the Widget itself. Simply place the folder in the widget folder of the dashboard: Dropbox - File Deleted

Please let me know how you like it and also if size should be a free text field or a dropdown like now. Adding additional sizes is not a problem, same is true for fonts.


1 Like

I’ll test this out when I get home, and let you know if I find any bugs, it is exactly what I was looking for thank you.

Thanks Paul, would love to hear some feedback :slight_smile:

I just updated it with the latest enhancements. So the following things have been added:

  • Fonts( Arial Black, Arial, Arial Narrow, Sans-Serif, Helvetica, Comic Sans MS, Courier New, Georgia, Impact)
  • Size Options: 8,10,12,16,24,32
  • Unit Position (Thanks to Matt Galloway for this)
  • Color picker

Great thank you.I’ll play around with this. a bit more but so far I like what I see. Only thing missing is maybe an Example Text preview, if that is not too complicated.

I just got it loaded to my PI, and created the first Feed Widget. I would like to see a similar custom widget for text as well even though we can use html.

Options like these would make emoncms more appealing to other non web programming incline.

So testing a bit right now. Below is my live dashboard, with just a couple feeds. Noticed that Arial is listed twice in the drop down, likely a typo, but worth checking out. I’ll update this post with any other items I find issues with.

Test Feed


Added samples of what each of the fonts look like. I tested the second arial in the list and it is the same so one just needs to be removed.

Hi Paul

Thanks for testing and your feedback. You’re right, Arial is double listed. I just added a placeholder for a possible additional font. Was waiting for some feedback from here :slight_smile:

I’m actually working on an enhanced Text widget but I have trouble to allow also to use html in it.

I also created a custom bar widget which allows to use Fonts and colours for the text. Trying to find a way on how to build it without breaking existing original bar widgets.

Maybe for the text widgets make new ones, and call them header-style and so on. Might be the best way to avoid breaking someone’s dashboard or not keeping the html part.

I’m still new to everything, so this has allowed me to explore everything and compare with my other energy monitoring apps. So far I find the code easy to understand and clean.

I’m running my setup on pi b 2 with a ssd hd. Thinking about getting a pi3.

Tested for a few weeks now Running well , thanks for the hard work! Would be nice if we could have some more options on the font sizes , but then the next guy will say he wants more fonts…
Well done!!

Looks fantastic! would be good if you can set the align to center, left, etc.