Emoncms : new type widget

Hi,

Is it possible and easy to add new type of widget ?

My idea is to use one for weather but maybe usefull for anytype of energy.

In my case, I will like to have a widget displaying an image, this image being based on a value from feed (for exemple, cloudly, rainging, sunny ...)

I don't know if it's possible or usefull for other people as it's a weather oriented (but maybe can be used for warning on other energy) For me, weather still a type of energy, and getting the energy conditions at same place than your consommation as meaning (in one eye, knowing that's it's snowing can explain why you use more power)

Mattia Rossi's picture

Re: Emoncms : new type widget

Hi, it depends on how skilled you are with jquery and how much time you are willing to spend in getting used to how it is done in emoncms.

In general, you can avoid that by using text containers (that really are translated to a div in the dashboard) and including whatever html you need (images, links, iframes)

This is an example of how I embed in one of my dashboards data from my weather station sensors:

<iframe style="width:800px; height:800px;" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="/weather/wugraphs.php"></iframe>

(I attached a picture of the result)

For simple things like displaying static images , you simply add the proper  img src link (a thermometer for example, to display it next to a temperature feed), for more complex things like a weather icon that has to change depending on feed value ... I don't know. The first thing that comes to mind is  that emoncms is more geared towards storing numeric feeds, anything else will have to be converted by a middle layer in best cases (wind direction) and I really don't think you'll be able to store weather descriptions in a feed, so you maybe better off picking whatever ready made solution for displaying weather data suits you needs and embedding it in an iframe in a dashboard (like I did)

Also, displaying the feeds is only the first step, because next come the weahter graphs that are pretty different that what emoncms does best: displaying power consumption 

Just my 2 cents, by the way

Have fun

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.