JanJaapKo / domoticz-GoodWeSEMS

Domoticz GoodWe Solar Inverter plugin (SEMS API)
http://www.domoticz.com/forum/viewtopic.php?f=65&t=28983
MIT License
6 stars 4 forks source link

Battery #14

Open Pe245 opened 2 years ago

Pe245 commented 2 years ago

It would be great to see batt level (%) and batt power (W) for automation purposes

JanJaapKo commented 2 years ago

Hi @Pe245 ,

Good idea. I'm gonna need to dive into that. I'll need to figure out which values make sense to read in (Goodwe spits out a lot of stuff). Could you send me some debug logging? Just set the plugin's log level to debug and filter in the Domoticz log window for your solar panels. Hope this works (it's been a while since working on this plugin) and Domoticz doesn't truncate the log lines......

PvdGulik commented 2 years ago

Goodmoring,

Trying to update with "git pull", but get this error. I don't recall that I changed anything...

Updating e1326f0..ea1284c error: Your local changes to the following files would be overwritten by merge: pycache/GoodWe.cpython-37.pyc pycache/plugin.cpython-37.pyc Please commit your changes or stash them before you merge. Aborting

What to do?

Thanks, Pieter

JanJaapKo commented 2 years ago

Hey the .pyc files are binaries that python creates when running a script locally (you probably ran plugin_test.py). In the last updates they were added to the ignore file, but you'll need to pull that first ;) This should help: git checkout .

I normally refer to this page: start using git

PvdGulik commented 2 years ago

Thanks, worked for me! I'll test the changes.

Have a nice day

Pe245 commented 2 years ago

Hi, Strange thing - when I set plugin log level to debug and press update, the whole domoticz crashes down.

Generally speaking - three basic data are needed for automation:

Inverter load (W) - now is available (ID 000A000E) The power generated by the photovoltaic system (W) not available Battery charge level (% or Wh) not available

Fine is Voltage - (ID 000A0003), Temperature (ID 000A0001) and Frequency (ID 000A0012) - all available now, but not usable for automation purposes.

Goodwe provides a lot of other information such as currents and individual phase outputs, but these will never be needed for normal automation. I'm not a programmer so I can only help like this, sorry. Petr

JanJaapKo commented 2 years ago

Hi @Pe245 , I've got 2 questions, basically:

1) Interesting observation that Domoticz crashes after update. Which version of Domoticz, python and OS are you running?

2) unit E/14 is the input of a certain string of panels. This is not very accurate (I calculate it by multiplying the string's current and Voltage value so it is a snapshot and not averaged over some time) it is meant to give an idea of the generated power when more than 1 string is used (I've got a string facing East and one facing West). The inverter's output power is given in unit 4. This is the same power as you see in the Goodwe SEMS portal app. I'm assuming this it the power supplied from the inverter to the net, so either from the panels or the battery. I'm not sure how this is reported. The GoodWe API returns about 26 kB of info so there is quite some details, not everything has a very meaningful name however, so it is sometimes a bit guessing what is used for what. With my setup I could check values received with what I was seeing on the app at that moment....

So basically question number 2 is: is unit 4 not usable for your automation?

JanJaapKo commented 2 years ago

@Pe245 , I just pushed a version that logs some fields that I think are interesting to see about the battery. Can you check if they actually log something usefull?

Pe245 commented 2 years ago

Hello,

  1. I have to update domoticz to set it up and running. So now I am on latest beta.
  2. My observation is unit 14 is every time the same value as SEMS portal gives as FV output in watts, . Unit 4 is something else and I don´t know what. SEMS @.***

Domoticz

@.***

Petr

From: Jan-Jaap Kostelijk @.> Sent: Saturday, April 30, 2022 11:07 AM To: JanJaapKo/domoticz-GoodWeSEMS @.> Cc: Hrůza Petr @.>; Mention @.> Subject: Re: [JanJaapKo/domoticz-GoodWeSEMS] Battery (Issue #14)

Hi @Pe245https://github.com/Pe245 , I've got 2 questions, basically:

  1. Interesting observation that Domoticz crashes after update. Which version of Domoticz, python and OS are you running?
  2. unit E/14 is the input of a certain string. This is not very accurate (I calculate it by multiplying the strings current and Voltage so it is a snapshot and not averaged over some time) it is meant to give an idea of the generated power when more than 1 string is used (I've got a string facing East and one facing West). The inverter's output power is given in unit 4. This is the same power as you see in the Goodwe SEMS portal app. I'm assuming this it the power supplied from the inverter to the net, so either from the panels or the battery. I'm not sure how this is reported. The GoodWe API returns about 26 kB of info so there is quite some details, not everything has a very meaningful name however, so it is sometimes a bit guessing what is used for what. With my setup I could check values received with what I was seeing on the app at that moment....

So basically question number 2 is: is unit 4 not usable for your automation?

— Reply to this email directly, view it on GitHubhttps://github.com/JanJaapKo/domoticz-GoodWeSEMS/issues/14#issuecomment-1113954167, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY3SVXXNPRLFPCFT5CWXDGDVHTZZZANCNFSM5UFG3FCQ. You are receiving this because you were mentioned.Message ID: @.**@.>>

Pe245 commented 2 years ago

So am I supposed to switch to debug mode again? (A little bit afraid of 😊)

From: Jan-Jaap Kostelijk @.> Sent: Saturday, April 30, 2022 1:21 PM To: JanJaapKo/domoticz-GoodWeSEMS @.> Cc: Hrůza Petr @.>; Mention @.> Subject: Re: [JanJaapKo/domoticz-GoodWeSEMS] Battery (Issue #14)

@Pe245https://github.com/Pe245 , I just pushed a version that logs some fields that I think are interesting to see about the battery. Can you check if they actually log something usefull?

— Reply to this email directly, view it on GitHubhttps://github.com/JanJaapKo/domoticz-GoodWeSEMS/issues/14#issuecomment-1113970804, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY3SVXRAG3MHGN2CTGNOOC3VHUJS5ANCNFSM5UFG3FCQ. You are receiving this because you were mentioned.Message ID: @.**@.>>

JanJaapKo commented 2 years ago

Hi @Pe245 ,

Sorry for late reply, was away for holiday and work.......

Yes you need to set it to debug. Which works fine on buster but perhaps not on higher versions of Raspian. Without debug, I can't do much, I need those logs (as I don't have a battery installed I can't use my own logging)

JanJaapKo commented 2 years ago

ok, due to a crashed RPi, I had to upgrade to bullseye. The plugin runs fine with debug logging on Bullseye. So if you want to have the battery added then I need the data structures that are returned on the GetMonitorDetailByPowerstationId endpoint. I see I missed logging the full response in the previous version, I just updated it. So please make sure to pull the latest version on the addBattery branch. Look vor the line which sais: response station data request

Pe245 commented 2 years ago

Hi, I am sailing now, will return end of June. I will post it then. P.

Dne 17. 6. 2022 21:00 napsal uživatel Jan-Jaap Kostelijk @.***>:

ok, due to a crashed RPi, I had to upgrade to bullseye. The plugin runs fine with debug logging on Bullseye. So if you want to have the battery added then I need the data structures that are returned on the GetMonitorDetailByPowerstationId endpoint. I see I missed logging the full response in the previous version, I just updated it. So please make sure to pull the latest version on the addBattery branch. Look vor the line which sais: response station data request

— Reply to this email directly, view it on GitHubhttps://github.com/JanJaapKo/domoticz-GoodWeSEMS/issues/14#issuecomment-1159153500, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY3SVXQOW2I35M3AN34YXXTVPTDMDANCNFSM5UFG3FCQ. You are receiving this because you were mentioned.Message ID: @.***>

Pe245 commented 2 years ago

Hi I am back. Pulled latest version from git and turned log to debug. What do you exactly need next? Petr

From: Jan-Jaap Kostelijk @.> Sent: Friday, June 17, 2022 9:00 PM To: JanJaapKo/domoticz-GoodWeSEMS @.> Cc: Hrůza Petr @.>; Mention @.> Subject: Re: [JanJaapKo/domoticz-GoodWeSEMS] Battery (Issue #14)

ok, due to a crashed RPi, I had to upgrade to bullseye. The plugin runs fine with debug logging on Bullseye. So if you want to have the battery added then I need the data structures that are returned on the GetMonitorDetailByPowerstationId endpoint. I see I missed logging the full response in the previous version, I just updated it. So please make sure to pull the latest version on the addBattery branch. Look vor the line which sais: response station data request

— Reply to this email directly, view it on GitHubhttps://github.com/JanJaapKo/domoticz-GoodWeSEMS/issues/14#issuecomment-1159153500, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY3SVXQOW2I35M3AN34YXXTVPTDMDANCNFSM5UFG3FCQ. You are receiving this because you were mentioned.Message ID: @.**@.>>