AppDaemon App to get generated power from ZeverSolar inverter

I have developed an AppDaemon application which pulls generated power from our ZeverSolar Inverter and sends this to the HA front end using MQTT. No need to use REST or poll the data from the cloud.

I am new to python coding and AppDaemon, so any suggestions for improvements would be appreciated. I have shared the code and instructions in GitHub.

AppDaemonZeverSolar

SolarGenPanel
SolarGenGauge

Always good to see new apps.

Minor edit

Remember to modify the MQTT entry to suite the changes from step 3.

suite should be suit.

Thanks Nick. Changes done.

@cheongk I’ve tried your application, but I can’t get it to work. I’m also very new to HA and just using it for a few days. At step 3 I followed the instructions to add the URL of my ZeverSolar inverter, but I don’t know what to do with the MQTT message structure. When I go to the log of AppDaemon I get the following errors:

2020-01-20 09:12:16.138854 INFO zever_solar: ------------------------------------------------
2020-01-20 09:12:16.179197 INFO zever_solar: Initiatilize: Get energy from solar system.
2020-01-20 09:12:16.234570 WARNING zever_solar: ------------------------------------------------------------
2020-01-20 09:12:16.248280 WARNING zever_solar: Unexpected error running initialize() for zever_solar
2020-01-20 09:12:16.259295 WARNING zever_solar: ------------------------------------------------------------
2020-01-20 09:12:16.280984 WARNING zever_solar: Traceback (most recent call last):
File “/usr/lib/python3.8/site-packages/appdaemon/app_management.py”, line 145, in initialize_app
await utils.run_in_executor(self, init)
File “/usr/lib/python3.8/site-packages/appdaemon/utils.py”, line 276, in run_in_executor
response = future.result()
File “/usr/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/appdaemon/apps/zeversolarget.py”, line 32, in initialize
self.handle = self.run_every(self.doGetGenAndSendMQTT, datetime.now(), 1 * 60)
File “/usr/lib/python3.8/site-packages/appdaemon/utils.py”, line 191, in inner_sync_wrapper
f = run_coroutine_threadsafe(self, coro(self, *args, **kwargs))
File “/usr/lib/python3.8/site-packages/appdaemon/utils.py”, line 285, in run_coroutine_threadsafe
result = future.result(self.AD.internal_function_timeout)
File “/usr/lib/python3.8/concurrent/futures/_base.py”, line 439, in result
return self.__get_result()
File “/usr/lib/python3.8/concurrent/futures/_base.py”, line 388, in __get_result
raise self._exception
File “/usr/lib/python3.8/site-packages/appdaemon/adapi.py”, line 2476, in run_every
raise ValueError(“start cannot be in the past”)
ValueError: start cannot be in the past
2020-01-20 09:12:16.296697 WARNING zever_solar: ------------------------------------------------------------

IP-address is correct, so that can’t be the problem.

What could be the problem? I’m using AppDaemon 4m (version 3 is also available), don’t know if that cases any problems. And do I need more add-ons than only AppDaemon?

Extra info: using HA with Hassio on Rasberry Pi.

Hi Will,

Another user has found a similar problem as you. I’ve fixed my code and checked it into github. Can you please use the new code from there?
(Refer: https://community.home-assistant.io/t/zeversolar-not-working/164037/1)

Okay, first thing that I need to know is if you are using MQTT in your hass.io? I am also running mine on a Raspberry Pi. All that my application does is to pull the data from Zeversolar (your solar inverter) and sends it to the hass.io through MQTT messages. If you haven’t got MQTT running, it won’t work. Sorry, I couldn’t figure out how to get the readings to my front end apart from using MQTT.

To install MQTT, please refer to this link.
Note: I find it a bit of learning curve to install MQTT but got it working in the end.

Good luck.

Kind regards,
Cheong

Thanks for the quick reply! Unfortunately my SD-card crashed today so I have to check this later on.

Will keep you posted as soon I can access my HA again.