My Electric App: the PHPTIMESERIES for kwUsed is not listed in dropdown

On my local EMONCMS, running on EMONPI, when I configure the MyElectric2 app in the web browser, I cannot see nor select my PHPTIMESERIES for the kWused feed.

If I create a second PHPFINA feed (totally doubling up on overheads …), that feed is listed.

Are PHPTIMESERIES feeds supported in MyElectric2? Or is there a limit of maximum 5 feeds to display in that dropdown list? The Android and IOS EMONCMS app have no problems with that PHPTIMESERIES feed.

And if I create a new PHPFINA feed, make it public, it won’t show up in the drop down list either.

BTW, same in MyElectric - the original older version of the dashboard app.

Thanks for sharing your insights.

This question keeps coming up time and time again. To my knowledge there is no good reason for the “apps” to only use phpfina.

There used to be a way of editing the code so that other feed engines could also be used without any problems, it has been a while since I tried it so I don’t know if it still works or not. See Does emoncms expects data to be send reguarly? - #2 by pb66 for more info, however, all the links to the github code seem to have moved around due to the code being refactored over time. So it maybe pretty difficult to work out.

Perhaps when i get time I will try and redo it and write it up better as there doesn’t seem to be any plans to change the way it works any time soon.

Yes keeping a second set of feeds just for displaying the same data in the apps is a waste of both disk space and cpu load, but more importantly it could shorten the sdcard life due to the increased writes on a local emonPi/Base. On emoncms.org we also get charged for the additional feeds. This basically equates to an additional charge just for using the apps pages.

[edit] although the github links may not make sense, a quick search of the app repo for "engine":"5" should help locate where the changes need to be made

I need to add some more detail here:
The PHPFINA feed that is listed was created years ago. So this one is amongst the 5 listed feeds.
If I create a new PHPFINA feed (or any other feed, incl virtual feeds, NONE of them are listed.
So I guess there might be maximum of 5 feed limit …?

With my lack of understanding I tend not to touch more than necessary, so I think the editing of code may be not for me. Nevertheless, I will read up on this in the coming days.

It would appear that the directories referred in to this link “/var/www/html/emoncms/Modules/app/myelectric2/” do not exist.

But I find :/var/www/html/emoncms/Modules/app/apps/OpenEnergyMonitor/myelectric2".
However the files in there are not .js files, they are .php files.

I found the lines referred to, changed them to “2,5”, and now it all seems to work. Great.
Many thanks @pb66!

Great to hear you got it sorted and that it is still possible after all the changes in the past years.

As I’m sure you are well aware (following your recent battle getting emonhub to update) but worth pointing out just in case (and for other users) those local changes could now block the emoncms app module from updating when you run the updater. That is fine as long as you do not want/need the possible future changes, it will not stop emoncms working, you just need to be aware when you update and if you want to upgrade the app module, “git stash” these changes or simply reset the repo to lose the changes and then reapply them after the update.

Thank you @pb66. A good reminder for me. When the time comes, I will have to learn about how to git stash, but for now I think I will hold back on updates until the next SD image is ready.

I’d like to thank you and others on this forum for the great help provided here to novices like me, who are really just users. Your patience and clear instructions are impressive. Thank you.

I bring my “discovery” of the day :
/apps/OpenEnergyMonitor/myelectric2/myelectric2.php
Line 207 & 208 :: engine is specified at “5” (phpfina )
I changed to “2” and now I have my phptimeserires in my app ! :slight_smile: