It is quite easy to setup for mains measuring. I documented it a on github.
BitterAndReal/TWCManager
If you want to display your solar panel production that has nothing to do with the TWCManager but could be done with the same hardware if you want to write code for it. Maybe it's easier to use...