Replies: 21 comments 3 replies
-
Currently the script computes information and sends the data as comma separated list to PVOUTPUT:
Instead or apart from sending pvoutput_string, you can also send this comma separated string to domoticz and further process it, like PVOUTPUT does. Note that the pvoutput_string is logged also to standard output, so you could also redirect this to domoticz? Especially, because the logging is now configurable. I do not have experience with domoticz, so I do not know what is possible there. |
Beta Was this translation helpful? Give feedback.
-
Maybe this article will help you? https://domoticx.com/internet-of-things-domoticz-data-ontvangen-vanuit-andere-bron/# |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick response. Thank you |
Beta Was this translation helpful? Give feedback.
-
After a few adjustments I managed to write the data to domoticz. The adjustments I made are: In the file "soliscloud_to_pvoutput.cfg" I created a section for domoticz with the ID number of the devices and the url where domoticz can be reached
To be able to read this I have included in the script
Then created a routine that sends the value to domoticz in the style of the original script (read code used)
And to put it to work the main routine completed with the following code.
This works perfectly. Only in the last few days I often get the message "502 bad gateway" from soliscloud. |
Beta Was this translation helpful? Give feedback.
-
@hotting Great that you managed to couple this to domoticz. Yes, sometimes soliscloud is overloaded, I also see this sometimes in my Raspberry Pi logging. |
Beta Was this translation helpful? Give feedback.
-
I like this. |
Beta Was this translation helpful? Give feedback.
-
@PeJeWe 214 send_pvoutput_data(pvoutput_string) 123 return contents 22 # == read api_secrets in soliscloud_to_pvoutput.cfg ============================ Hopefully you have enough information with this. if you don't use pvoutput you can disable line "send_pvoutput_data(pvoutput_string)" with a # @ZuinigeRijder. |
Beta Was this translation helpful? Give feedback.
-
@hotting Maybe I will incorporate your solution in SolisCloud2PVOutput and make it configurable to send to PVOutput and/or Domoticz. |
Beta Was this translation helpful? Give feedback.
-
@hotting Also a question about the posted code, how is frequency computed? And is it part of the config?
And I also wonder if you should have a retry implemented, like in send_pvoutput_data? |
Beta Was this translation helpful? Give feedback.
-
The content you get back from soliscloud contains more than 400 lines of information in json format. The frequency of the inverter is also passed on in this information. "fac": 50.01, I had also incorporated the frequency into my solution. But that requires some more adjustments in your code. In order not to make the story of the adjustment too complicated, I had removed the freq from the earlier mention. Only the one conscious rule has been forgotten. For completeness.
In the code in the section # == domoticz devices put the value of the device in a variable
Then put the value of the frequency in main section in the variable "frequentie".
And finally leave/add the line where your question was about to the domoticz call
Greetings HansH |
Beta Was this translation helpful? Give feedback.
-
I have created a topic on the domotcz forum |
Beta Was this translation helpful? Give feedback.
-
@hotting I did push my changes and released R1.9.0: I hope this works as expected, I did some minor modifications to your solution (e.g. retry mechanism and some variable name renames) and left frequency out. The configuration file has by default Domoticz disabled and PVOutput enabled. Can you test this version for Domoticz, if it works and report back? |
Beta Was this translation helpful? Give feedback.
-
@hotting I copied this from your post earlier ;-)
Good idea to change the defaults. I will wait till you have a chance to test it, when you have time and back from vacation. |
Beta Was this translation helpful? Give feedback.
-
@hotting I updated your suggestions in a minor release. |
Beta Was this translation helpful? Give feedback.
-
My cron is running, when I check my cron log. |
Beta Was this translation helpful? Give feedback.
-
In line 277 is a faulty code |
Beta Was this translation helpful? Give feedback.
-
@PeJeWe Thanks for notifying. I fixed it: |
Beta Was this translation helpful? Give feedback.
-
Started the script in the afternoon (including AC adjustment) and it worked fine. As planned it stopped at 11:00 PM and the next day at 5:02 AM it was started again via the cron. No problems encountered so far. Nice that you set the default values to 0. I do have one more request but I'll make another idea of it Greetings HansH |
Beta Was this translation helpful? Give feedback.
-
@ZuinigeRijder can you add the daily generation? |
Beta Was this translation helpful? Give feedback.
-
@PeJeWe I see that @hotting sends in the DOMOTICZ_POWER_GENERATED_ID the Watt as well as hi_res_watthour_today, separated by semicolon ;
I think that it is indeed better to split those and just have one value send in each sensor. Something like:
@hotting What do you think? Was there a specific reason you used one sensor with both values separated by semicolon? |
Beta Was this translation helpful? Give feedback.
-
@hotting Can you help in the tweakers topic, because you are also from the Netherlands? See this post: https://gathering.tweakers.net/forum/list_message/75349392#75349392 |
Beta Was this translation helpful? Give feedback.
-
As a user of domoticz i would like a version of the script that exports the data to domoticz is this possible?
Or does anyone have hints to do this i have limited knowledge of python
thank you for the effort taken
g Hans
Beta Was this translation helpful? Give feedback.
All reactions