Creating a new local App for MyDualfuel?

I have spent a fair bit of time amending how the local MySolarpv app appears, to make it accommodate my gas data instead of the solar data, and various other tweaks to make it more relevant for my gas and electric usage. This was because it displays two sets of Watts in the same graph, and that is what I wanted, and I do not have any solar or other electric feeds. This is the version that comes in the 20Feb2016 emonpi image, apparently using App-9.0.

Nevertheless, I would much prefer to be able to rename this to something like MyDualFuel or similar, so I can restore the MySolarpv back to its normal function again (I took backups!).

However, while I can get My Dualfuel to appear in the App menu dropdown list, and select it, the main page just presents the menu bar and the dark background in the main area and nothing else, and it appears that emoncms does not recognise the path to the Modules/app/mydualfuel directory, or its two mydualfuel files (.html, and .js).

I have added what appears to be a suitable entry in app_menu.php, but it seems something more is needed, and I have been unable to determine what that is. Can anyone suggest some further steps I need to take? There is virtually nothing to describe the relevant procedure to add a new App.

My mydualfuel.html, and mydualfuel.js are copies of the working versions of mysolarpv files, with a simple search and replace to replace “mysolarpv” with “mydualfuel” in various variable names, and I expect to do some additional debugging once I get something to display. But clearly something is missing.

Inside the app js file you will find multiple references to the app name corresponding to the app javascript object… You need to change all of these with a search replace to the name of your app:

https://github.com/emoncms/app/blob/9.0/myelectric/myelectric.js#L2

search for ‘mysolarpv’ and replace with mydualfuel’.

Thanks, Trystan, but as I said in the OP, I had already done that. And although your link refers to app 9.0, none of my apps have the config: { } section you show above. My versions are from the 20Feb2016 image, also nominally 9.0, and when I try to update emoncms from the Emoncms Administration menu everything appears to be up to date. But the files are clearly different. And updating the database says there is nothing to update.

I am tempted to install a fresh SD card with the 3May2016 image and re-apply the edits I had made to make the mydualfuel.html/js files work the way I wanted them, essentially cosmetic. But not knowing what the problem is, I don’t know that the update/upgrade will correct it.

I installed a fresh SD card with the downloaded 3May2016 emonSD image, and created the mydualfuel folder with the mydualfuel files, and this is now being properly recognised. The new app mostlly works as it did before with a couple of details that no longer work quite as they did, so some minor debugging required, but we are cooking on gas, as it were.:grin:

1 Like