Dashboards widgets missing since emonpi update

I used to have a couple of dashboards reporting PV power produced / Power used in house and surplus fed back into the grid.

So I wanted to make sure all is up to date in the administration Menu option and decided it is probably good to run an update on “emonPi” -

Gone are all my nice dials I used to have.

No matter what I tried after that, I am not able to get them to show up again. Am I just doing something wrong, OR was the dials etc removed in recent update 9.9.3 (The one I updated to)

Below is an example of such a dashboard reading my Axpert inverter and not the emonCMS, illustrating some of the info I would love to have back:

Below is a screenshot of the Toolbox how it used to be before; now the options are not there any more:

image

Can anyone perhaps give me some pointers how to get the dials and real time values back on the dashboards?

I am watching this video:

and when trying to follow the video, I get this message:

Perhaps that is a clue:

So going to the URL on the image this is what I got out:


    /*
   All emon_widgets code is released under the GNU General Public License v3.
   See COPYRIGHT.txt and LICENSE.txt.

   Part of the OpenEnergyMonitor project:
   http://openenergymonitor.org

   Author: Trystan Lea: [email protected]
   If you have any questions please get in touch, try the forums here:
   http://openenergymonitor.org/emon/forum
 */

function vis_widgetlist(){
  var widgets = {
    "realtime":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid","colour","initzoom"],
      "optionstype":["feedid","colour_picker","dropbox"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Colour"),_Tr_Vis("Zoom")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Line colour in hex. Blank is use default."),_Tr_Vis("Default visible window interval")],
      "optionsdata": [ , , [["1", "1 "+_Tr_Vis("minute")],["5", "5 "+_Tr_Vis("minutes")],["15", "15 "+_Tr_Vis("minutes")],["30", "30 "+_Tr_Vis("minutes")],["60", "1 "+ _Tr_Vis("hour")]] ],
      "html":""
    },

    "rawdata":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",  
      "options":["feedid","colour","units","dp","scale","fill","initzoom"],
      "optionstype":["feedid","colour_picker","value","value","value","value","dropbox"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Colour"),_Tr_Vis("units"),_Tr_Vis("dp"),_Tr_Vis("scale"),_Tr_Vis("Fill"),_Tr_Vis("Zoom")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Line colour in hex. Blank is use default."),_Tr_Vis("units"),_Tr_Vis("Decimal points"),_Tr_Vis("Scale by"),_Tr_Vis("Fill value"),_Tr_Vis("Default visible window interval")],
      "optionsdata": [ , , , , , , [["1", _Tr_Vis("Day")],["7", _Tr_Vis("Week")],["30", _Tr_Vis("Month")],["365", _Tr_Vis("Year")]] ],
      "html":""
    },
    
    "bargraph":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid","colour","interval","units","dp","scale","delta","mode","initzoom"],
      "optionstype":["feedid","colour_picker","value","value","value","value","boolean","boolean","dropbox"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Colour"),_Tr_Vis("Interval"),_Tr_Vis("units"),_Tr_Vis("dp"),_Tr_Vis("scale"),_Tr_Vis("delta"),_Tr_Vis("mode"),_Tr_Vis("Zoom")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Line colour in hex. Blank is use default."),_Tr_Vis("Interval (seconds)-you can set \"d\" for day, \"m\" for month, or \"y\" for year"),_Tr_Vis("Units"),_Tr_Vis("Decimal points"),_Tr_Vis("Scale by"),_Tr_Vis("Show difference between each bar"),_Tr_Vis("Mode set to 'daily' can be used instead of interval for timezone based daily data"),_Tr_Vis("Default visible window interval")],
      "optionsdata": [ , , , , , , , , [["1", _Tr_Vis("Day")],["7", _Tr_Vis("Week")],["30", _Tr_Vis("Month")],["365", _Tr_Vis("Year")]] ],
      "html":""
    },

    "timestoredaily":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid","units","initzoom"],
      "optionstype":["feedid","value","dropbox"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Units"),_Tr_Vis("Zoom")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Units to show"),_Tr_Vis("Default visible window interval")],
      "optionsdata": [ , , [["1", _Tr_Vis("Day")],["7", _Tr_Vis("Week")],["30", _Tr_Vis("Month")],["365", _Tr_Vis("Year")]] ],
      "html":""
    },

    "zoom":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["power","kwhd","currency","currency_after_val","pricekwh","delta"],
      "optionstype":["feedid","feedid","value","value","value","boolean"],
      "optionsname":[_Tr_Vis("Power"),_Tr_Vis("kwhd"),_Tr_Vis("Currency"),_Tr_Vis("Currency position"),_Tr_Vis("Kwh price"),_Tr_Vis("delta")],
      "optionshint":[_Tr_Vis("Power to show"),_Tr_Vis("kwhd source"),_Tr_Vis("Currency to show"),_Tr_Vis("0 = before value, 1 = after value"),_Tr_Vis("Set kwh price"),_Tr_Vis("Show difference between each bar")],
      "html":""
    },

    "simplezoom":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["power","kwhd","delta"],
      "optionstype":["feedid","feedid","boolean"],
      "optionsname":[_Tr_Vis("Power"),_Tr_Vis("kwhd"),_Tr_Vis("delta")],
      "optionshint":[_Tr_Vis("Power to show"),_Tr_Vis("kwhd source"),_Tr_Vis("Show difference between each bar")],
      "html":""
    },

    "histgraph":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid"],
      "optionstype":["feedid"],
      "optionsname":[_Tr_Vis("Feed")],
      "optionshint":[_Tr_Vis("Feed source")],
      "html":""
    },

    "threshold":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid","thresholdA","thresholdB","initzoom"],
      "optionstype":["feedid","value","value","dropbox"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Threshold A"),_Tr_Vis("Threshold B"),_Tr_Vis("Zoom")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Threshold A used"),_Tr_Vis("Threshold B used"),_Tr_Vis("Default visible window interval")],
      "optionsdata": [ , , , [["1", _Tr_Vis("Day")],["7", _Tr_Vis("Week")],["30", _Tr_Vis("Month")],["365", _Tr_Vis("Year")]] ],
      "html":""
    },

    "orderthreshold":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid","power","thresholdA","thresholdB"],
      "optionstype":["feedid","feedid","value","value"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Power"),_Tr_Vis("Threshold A"),_Tr_Vis("Threshold B")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Power"),_Tr_Vis("Threshold A used"),_Tr_Vis("Threshold B used")],
      "html":""
    },

    "orderbars":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid","delta"],
      "optionstype":["feedid","boolean"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("delta")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Show difference between each bar")],
      "html":""
    },

    "stacked":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["bottom","top","colourt","colourb","delta"],
      "optionstype":["feedid","feedid","colour_picker","colour_picker","boolean"],
      "optionsname":[_Tr_Vis("Bottom"),_Tr_Vis("Top"),_Tr_Vis("Top colour"),_Tr_Vis("Bottom colour"),_Tr_Vis("delta")],
      "optionshint":[_Tr_Vis("Bottom feed value"),_Tr_Vis("Top feed value"),_Tr_Vis("Top colour"),_Tr_Vis("Bottom colour"),_Tr_Vis("Show difference between each bar")],
      "html":""
    },

    "stackedsolar":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["solar","consumption","delta"],
      "optionstype":["feedid","feedid","boolean"],
      "optionsname":[_Tr_Vis("Solar"),_Tr_Vis("Consumption"),_Tr_Vis("delta")],
      "optionshint":[_Tr_Vis("Solar feed value"),_Tr_Vis("Consumption feed value"),_Tr_Vis("Show difference between each bar")],
      "html":""
    },

    "smoothie":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["feedid","ufac"],
      "optionstype":["feedid","value"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Ufac")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Ufac value")],
      "html":""
    },

    "multigraph":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",
      "options":["mid"],
      "optionstype":["dropbox"],
      "optionsname":[_Tr_Vis("Multigraph")],
      "optionshint":[_Tr_Vis("Managed on Visualization module")],
      "optionsdata":[multigraphsDropBoxOptions], // Gets multigraphs from vis_widget.php multigraphsDropBoxOptions variable
      "html":""
    },

    "timecompare":
    {
      "offsetx":0,"offsety":0,"width":400,"height":300,
      "menu":"Visualisations",  
      "options":["feedid","fill","depth","npoints","initzoom"],
      "optionstype":["feedid","value","value","value","dropbox"],
      "optionsname":[_Tr_Vis("Feed"),_Tr_Vis("Fill"),_Tr_Vis("Depth"),_Tr_Vis("Data points"),_Tr_Vis("Zoom")],
      "optionshint":[_Tr_Vis("Feed source"),_Tr_Vis("Fill under line"),_Tr_Vis("Number of lines"),_Tr_Vis("Default: 800"),_Tr_Vis("Default visible window interval")],
      "optionsdata": [ , , , , [["8", "8 " + _Tr_Vis("Hours")],["24", _Tr_Vis("Day")],["168", _Tr_Vis("Week")],["672", _Tr_Vis("Month")],["8760", _Tr_Vis("Year")]] ],
      "html":""
    }
  }

  return widgets;
}

function vis_init(){
  vis_draw();
}

function vis_draw(){
  var vislist = vis_widgetlist();

  var visclasslist = '';
  for (z in vislist) { visclasslist += '.'+z+','; }
  visclasslist = visclasslist.slice(0, -1);

  $(visclasslist).each(function(){
    var id = $(this).attr("id");
    var feed = $(this).attr("feed") || 0;
    var width = $(this).width();
    var height = $(this).height();

    var apikey_string = "";
    if (apikey) apikey_string = "&apikey="+apikey;

    if (!$(this).html() || reloadiframe==id || reloadiframe==-1 || apikey){
        var attrstring = "";
        var target = $(this).get(0);
        var l = target.attributes.length;
        for (var i=0; i<l; i++){
          var attr = target.attributes[i].name;
          if (attr!="id" && attr!="class" && attr!="style"){
            attrstring += "&"+attr+"="+target.attributes[i].value;
          }
        }
        pathfix=path.substr(path.indexOf('://')+3); // remove protocol
        pathfix=pathfix.substr(pathfix.indexOf('/')); // remove hostname
        $(this).html('<iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+pathfix+'vis/'+$(this).attr("class")+'?embed=1'+attrstring+apikey_string+'"></iframe>');
        console.log('--> new relative url for iframe of '+ $(this).attr("class") + ': '+pathfix+'vis/'+$(this).attr("class")+'?embed=1'+attrstring+apikey_string);
    }

    var iframe = $(this).children('iframe');
    iframe.width(width);
    iframe.height(height);

  });
  reloadiframe = 0;
}

function vis_slowupdate() {}

function vis_fastupdate() {}

What have you tried? Have you tried clearing the browser cache?

What is listed now?

What is displayed now? (ie does it stay blank after ok’ing that box? and is it the same in “view” as “edit” mode?)

often when there is an issue rendering a single item on the dash, it can prevent all widgets after that point in the dashboard code, so looking at the dashboard code in the dashboard config box, which is the first item/widget missing or at fault? and are any of the widgets after that item displayed?

@pb66.
Paul thanks for your reply.
Allow me to take you step by step as I do it.

I am using chrome 71.0.3578.98 64 Bit.
I cleared ALL Clear history, cookies, cache, and more data.
Open URL “http://192.168.1.105/emoncms/dashboard
Log In with my administrator credentials

Set-up >Dashboards
Create a new Dashboard “Dials”, Alias “Dials”
Click on Eye button:

click OK

click on gear icon:

Click OK

Click on Toolbox gear:

Click save Changes

Click Spanner Icon

Only option that is accepted is Cancel.

That is where I am stuck

Hope this helps.

Sorry for all the info

Thanks for the info.

Can you check (or attach) your emonpiupdate.log? The screenshots of the dashboard configuration box do not seem to be of the latest revision, so is there anything in the log to suggest any of the updates were incomplete, unsuccessful or missed?

Also, if you check the browser console, is there any warnings or info there that might help further?

Can you post your “system info” using the button on the admin page too?

Paul,

I hope this is what you need:
emonpiupdate.log.txt (12.1 KB)

Regards

Frits

The other info would be useful too, but a quick look through the log suggests you have local changes to your dashboard module and it isn’t clear (to me) if the update has been successful or not.

git pull /var/www/emoncms/Modules/dashboard
On branch stable
Your branch and 'origin/stable' have diverged,
and have 1 and 100 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
nothing to commit, working directory clean
Your branch and 'origin/stable' have diverged,
and have 1 and 100 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

what version does the admin page say the dashboard module is?

cd /var/www/emoncms/Modules/dashboard
git status

Then

git diff HEAD <filename that is different>

borpin, Thanks for your help, but I need some more help.

I entered: cd /var/www/emoncms/Modules/dashboard
then: git diff HEAD diff.txt

and received this feedback:

fatal: ambiguous argument 'diff.txt': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

So I tried:

git diff HEAD 9.9.5 -- diff995.txt

and

git diff HEAD 9 -- diff9.txt

but received:

 bad revision '9.9.5'
and bad revision '9'  errors

I am not sure what the initial version was I had before update, but it was shipped with empnPi in late 2016.

Could you please let me know what is wrong with my command?

Regards

Frits

Hi @Frits, firstly, it is easier to read if you use a bit of formatting in your post. Search for markdown for some help. For code or terminal output, put 3 backticks (this is the key in the top left of the keyboard) on a line on their own before the code/output, and then 3 on the line following the code. (edit your previous post and you will see what I have done).

Step by step :smile:
first

cd /var/www/emoncms/Modules/dashboard

this take you into the dashboard folder.
then

git status

Post the output of that please (remember the formatting :smile:).

On branch stable
Your branch and 'origin/stable' have diverged,
and have 1 and 100 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
nothing to commit, working directory clean

Hope this is what you meant!

Then git pull:

error: cannot open .git/FETCH_HEAD: Read-only file system

Is that the whole output?

yes you get the error as the filesystem needs to be put into read/write mode explicitly.

Try this command

sudo git diff HEAD

That would require a rpi-rw command first, then sudo git diff HEAD, wouldn’t it?

As it is not actually writing to disk I doubt it. Didn’t want to enable RW until it was really needed!

when I issue the rpi -rw command:

-bash: rpi: command not found

no spaces. rpi-rw all in one string.

1 Like

No space just one command rpi-rw but not neede for the diff command. Need to be a little careful here.

aha! that works

So i issues:

sudo git diff HEAD

But no response.

Sorry for all the questions

Isn’t there a way I can like: Sudo apt get install and reinstall all?