X10 Community Forum
📱🖥️PiX10Hub => 💬General Discussion => 📝User created HG Scripts (programs/macros/widgets) => Topic started by: Tuicemen on March 03, 2020, 03:28:47 PM
-
"widget not compatible with new UI however it is possible to utilize the html fle from this widget and modify it to work as a new custom wiget"
I've been wishing to display my solar info in HG since I started using it.
It was simple to just add a link button but that opened a new window hiding HG (not what I was looking for)
I'm not sure if this will be of any use to anyone other then me, but here it is.
You need a Magnum energy system ( https://www.magnum-dimensions.com/renewable-energy-products ) with the MagWeb monitoring kit this shows your inverters status, volts/amps in & out , last time info was updated to the web
With extras it will display, generator status(AGS module require),battery status(ME-BMK module required)
I suppose one could modify the code for viewing any web page from inside HG
>!
-
Reading over the documentation for the new custom widgets I discovered it simply uses html files with optional css and js files
so I simply edited the magweb.html file to look like this:
<table border="0" cellpadding="0" cellspacing="0" width="100%" hight="100%">
<tr>
<td align="right" valign="middle"><div style="font-family:Monospace;font-size:14pt;">
<iframe scrolling="auto" allowtransparency="true" frameborder="0"
style="box-sizing: border-box; height: calc(262px); width: 100%;"
id="Inverter"
src="http://data.magnumenergy.com/[YourCode]/">
</iframe>
</div></td>
</tr>
</table>
<div class="ui-footer ui-bar-inherit" style="padding-left:5px;padding-right:5px;">
</div>
</div>
I then copied this to the data/widget/tuicemens folder, I then added a new custom wiget in the UI and pointed to tuicemens/magweb
easy peasy I can now keep an eye on the solar and Autogen setup. the only draw back to this currently is there are only 3 sizes to choose for this widget so if the info isn't available in the displaying widget you have to scroll down or to the side to view.