Emoncms emonSD component manager

A new feature available in the new emoncms v10.4 release is a Emoncms emonSD components/modules manager, currently available from the emoncms admin page in the updates section (though this will be changing to a dedicated sidebar menu entry under administration soon with the new v3 menu system).

The component manager can be used to both update emoncms modules and other OpenEnergyMonitor emonSD components installed on the system, and easily switch between the stable and master branches of each component making it easier to test new bug fixes and features that may not have made their way to the stable branch yet.

My plan is to extend this interface to allow installation and removal of optional modules. In time it should make it much easier to support a more modular approach to emoncms features, with perhaps a cut down initial installation and then the option to browse through available modules as required to bring in new features. It should also make it easier to invite testing of development branches as well as of course, simplify support by removing the need to detail a whole load of SSH and git commands to change branches :slight_smile:

4 Likes

Impressive!

I could easily switch to menu v3 and back to stable, and everything still seems to work.

Thanks for all the work everyone!

1 Like

Thanks @Thelmike, If you click ‘Custom’ in the top and then enter ‘menu_v3’ in the text box and then switch it will change all the branches together, did you try that? It would be great to have help with testing the menu_v3 update so if you get a chance to do that and let me know if you see any issues that would be great!

I should say, it will change all the branches that have the menu_v3 branch available, it will leave the others on whatever branch they where previously set to. If there are local changes it wont do anything to that module/component.

Yes, that’s very good.
In the spirit of only grasping at the basics here (why fiddle with a perfectly working setup!), I tried the custom option (wouldnt have thought of doing that - might be worth a hint on the page). Anyway, mostly swopped over to v3, except Device, Network setup, Useful_scripts.
Before I did it, there was one local change, I think, though that ‘disappeared’ after the v3 upgrade.

Not sure if that’s any useful feedback, but off to play some more

Presumably this should work for any install, not just the SD setups.

Hmm, not everything went well when setting all components to ‘menu_v3’.

I got an extra ‘undefined’ in the menu bar:

Thanks @dlongson interesting, it should not have overwritten any local changes, are you able to give me any more information on that?

Yes true, any install with service-runner present. I will improve it to still show the module list but remove the switch branch, update controls if service runner is not installed or running.

Thanks @Thelmike do you see any modules with local changes in the component list? perhaps one of the modules did not update?

Component manager or Module manager?

What do people think about the name of this feature?

I called it component manager because it can be used to administer both emoncms modules, emoncms core and other non-emoncms components such as emonhub, EmonScripts, RFM2Pi directories.

I wonder though now whether it’s more confusing than it is worth and it should just be called the Emoncms modules manager and accept that not all things installed and managed fit under that name but perhaps the largest number do?

Hi @TrystanLea, here you can see which components switched to menu v3.

Some still show stable, like Device, although menu v3 was available in the branch menu there. But when you choose that again, you get a message that it’s not available:

The v3 menu only shows in Graphs, Sync and Admin and only in landscape.
Maybe I should mention that this is all on an iPad…

1 Like

I think both Component manager and Module manager are OK.
But since not only de modules are managed there, I lean towards Component manager.

1 Like

Might be. The term components might be throwing folks a curve ball

Agreed.

1 Like

Thanks @Thelmike interesting, Device & Network setup dont have v3 branches so thats fine (will check and remove the option for the device module as that should not be there).

Have you installed any other modules that disappear when you change from stable to menu_v3?

Thanks both for input on the naming!

Usefulscripts behaved the same as Device and Network

Thanks @Thelmike I’ve updated Device, Network (setup) and Usefulscripts to not show the menu_v3 option and I’ve updated the menu_v3 branch of emoncms_core to not show any undefined menu items. If you use the custom option and enter ‘menu_v3’ it should pull everything in for you. Thanks!

It’s not there anymore, of course, and reverting to the stable version hasn’t helped. Can I find the original update messages in one of the logs?

Damien

Unfortunately the log is currently configured to overwrite after each operation, perhaps I change that…

The update script itself is configured to skip updating if there are local changes and testing here that did appear to work fine (here’s the part of the script that does that EmonScripts/update_component.sh at master · openenergymonitor/EmonScripts · GitHub) if your not sure what the change was perhaps it was something else? I did notice the other day that the user interface showed a change that I knew was not present and on refreshing the page it then showed that there where no changes, so there might be a minor issue in the manager ui itself, rather than an actual change that was overwritten. I will keep a closer eye our for that again