OpenEnergyMonitor Community

Understand and using widgets in custom page

Hi all, amazing your work I’ve did simple experiment following this post idea:

Emoncms: How to include dial widget to external page?

what I’ve did is just to include a single dial widget and a feedvalue without using the framework and the dashboard.
The final result is a very simple page basing essentially on the dial_render.js and other essential files (as css and jquery) plug-in.
This work helped me to better understand the canvas object and how to use it, again thank you for your very good and clean work!
Hope this can be useful for someone.

Attached the full code and a screenshot of the page in action.

To test it simply rename the original file index.php that is into the emoncms-9.x folder and then copy the attached index.php inside the same folder then browse the index.php and execute it (I’ve used EasyPHP in a local machine).
The page will show one dial and feedvalue randomly updated every 1s.

due to unable to upload the page on this place you can see the whole code at codeshare here below the link:

codeshare index.php source code with comment

Best regards

Hi CR,

I’ve adjusted your account. Please upload your code and delete the link to the third party site.