Copying feeds and dashboards over to another online account?

Tags: #<Tag:0x00007f67136fc2b0> #<Tag:0x00007f67136fc080>

(Jim McKenzie) #1

Is there anyway to copy over all the feeds from 3 nodes and 3 dashboards from one online account to another online account? I still need to access both if possible?

I have installed online monitoring for a customer which monitors 3 phase wind, pv, import/export ann battery storage charge/discharge. It has got very complicated on the feeds page as I have used spare temp feeds as “virtual” feeds to calculate self-consumption for each phase as well as similar calculations for battery storage. I also have 3 dashboards 2 for power and energy graphing and one just for dials and figures.

It took quite a long time to make it all and to make sure its up and running properly. I have built it all on an account with my email and I now want to create a separate account for the client I installed it for with all the same dashboards.

It would be great to keep copying over the dashboards into new accounts so that I can off the same to other clients.

Is this in any way possible?

If it isn’t I’d like to offer some ideas if anyone is interested in changing it?

(Jim McKenzie) #2

Am i right in thinking a dashboard is actually just a json file? Could an import/export button be added to And maybe some kind of json import export for feeds as well?

(Paul) #3

Have a read of the Copy users on private server, including dashboard, inputs, feeds, graphs, etc? thread, This is a topic that comes up pretty frequently but there is currently no one answer.

That thread will hopefully at least make you aware of the obstacles when copying feeds and input processing over to another account. You do have the added issue of wanting to do this on which you do not have access to the databases (directly) and the device module isn’t available either.

you might be able to concoct a clever script to use the input and feed api 's to get the existing info from one account and create inputs and feeds on the new account using that data as a template, but if you are just doing this the once, it will most likely be easier to do it manually than to write the script and get it functioning correctly.

Eventually you might be able to use the sync module to backup and then upload again to a different account, but I don’t think it’s ready for uploading yet.

Bottom line is if you are planning on a commercial setup where you can duplicate account for several clients, you will be so much better off with your own server and using the device module and a dedicated bespoke apps rather than dashboards. I use the device module but I have not yet mastered the apps module, but it is much easier to find a backdoor method duplicate dashboards across accounts if you have access to the mySQL tables.

(Jim McKenzie) #4

Hi Paul,

Thanks for your reply. Looks like I have a lot of reading to do!

I really want to get this working but I doubt I have the time to setup a private server. I am in some ways doing this commercially but not at the kind of scale that would warrant a server. I work for a small renewables installer in Devon we look after a lot of sites which have wind and solar and are now offering a monitoring package to be followed up with a report detailing how well suited the site is for battery storage.

I have a few people lined up for this with possibly more interested. It looks like I’m just going to have to make the dashboards every time! Even if I could just copy the dashboards over with no feeds setup that would make things a lot easier!

Thanks for your help!

(Paul) #5

Here’s something to try

Open the dashboard you want to duplicate.

Right click the source dashboard and select view source, a new page will open to reveal the code.

Use CTRL-F to search for “<div id=“page”>”

Select to copy everything from immediately after that div id all the way down until immediately before the “</div>” proceeding the “<script type=“application/javascript”>” line and copy.


<script type="application/javascript">
  var dashid = 12345;

the "var dashid = " line works as a double check as the “<script type=“application/javascript”>” appears more than once, (the “12345” be the dashid for that dash).

Create a new blank dashboard in the account you wish to copy to.

Open that blank dashboard in edit mode.

Add a “paragraph” widget to the top left of the new dashboard.

Paste the copied content into the “html” field of that new widgets config.

You should now be able to select each of the widgets copied over, in turn and edit the config to point to a feed belonging to that new user (assuming you’ve set them up already).

It’s not a perfect method but it gets the job done.

(working mainly from memory so please forgive me if it isn’t right first try)

(Paul) #6

I just opened an issue to suggest a simple textbox to allow editing or cut’n’pasting of dashboard content, this would make things much easier than these backdoor methods.

If I get time I will try it myself but there are several contributors that are well versed in emoncms and the dashboard module that may pick this up. billing
(Trystan Lea) #7

Hello @Jim_McKenzie, although not on yet, I’ve been working on a solution to this problem which I hope to update with soon: Portable emoncms dashboards (looking for testers)