Hi, today I succesfully imported your very nice energy dashboard page. I would like to share the things I had to do to fire it up, for the benefit of other users. I use a plugwise energie monitor and my solarpanel inverter is from Goodwe. I use the homey SolarPanels (Zonnepanelen) app and the Plugwise Smile app.
On import I had to remove the Solar input node and connect the switch outputs for solar panel readings to the two solar panel input functions.
The first run delivered some errors in functions in the debugwindow. Caused by:
- retrieving global variables that do not exist
- Use Mqtt input instead of the solar module in the input functions
- persistent storage json files that cannot be found.
The solution to the first is quite simple. If you add the code
||0 (or zero) to the global.get statements in the variable declarations in the functions, the variables resolve to zero in case the variable does not exist yet. Now the variables resolved to “undefined” which causes the functions to fail.
The second error was caused by the two solarpanel input functions, I commented out the first line which reads a fancy msg object, the mqtt input from the homey app is just a simple payload string.
I still have to figure out how to create the persistent storage json files.
I also had to set my initial meter readings and the start year of the gasmeter in two functions to initialize current values. And change the input switch functions to listen to my own mqtt server and the right homey topics.
Some fintuning needed, but it works fine. Thanks for sharing.