ayasystems / SolaxHTTP

Solax inverter python domoticz plugin
GNU General Public License v3.0
2 stars 1 forks source link

Error in last plugin #4

Closed pvil closed 1 year ago

pvil commented 1 year ago

I have tested the last version from 1 month ago and the plugin crash in a line 428

I have replace this lines and works fine:

kwhdiario          = json_object['Data'][8]*1000          **changed**
acumuladoKwh       = json_object['Data'][6]        **changed**
self.TEMP          = str(json_object['Data'][7])

self.FREQUENCY     = str(json_object['Data'][50])

UpdateDevice("S1_CURRENT",    0, self.S1_CURRENT)
UpdateDevice("S2_CURRENT",    0, self.S2_CURRENT)
UpdateDevice("S1_VOLTAGE",    0, self.S1_VOLTAGE)
UpdateDevice("S2_VOLTAGE",    0, self.S2_VOLTAGE)
UpdateDevice("S1_POWER",      0, self.S1_POWER)
UpdateDevice("S2_POWER",      0, self.S2_POWER)
UpdateDevice("TO_GRID",       0, self.TO_GRID)
UpdateDevice("FROM_GRID",     0, self.FROM_GRID)
if(acumuladoKwh>0 and kwhdiario>0):**changed**
  UpdateDevice("FV_POWER",      0, str(acumuladoKwh)+";"+str(kwhdiario)) **changed**
ayasystems commented 1 year ago

Thanks for share, you code was merged

https://github.com/ayasystems/SolaxHTTP/commit/e385c23982721d424255b0ca9698b8bb12b63101

https://github.com/ayasystems/SolaxHTTP/commit/e241dca49db436dee49203d1a2954e5f4ea9ab74

Regards