Multiple Invertors on Account
Closed this issue · 3 comments
I have 2 SAJ inverters at my place but the addon only returns the last one added. Is there an extra variable where you can select a specific plant, or select all.
I'd either return both values individually and create a sensor adding them together or get the PLANT TOTAL from the portal if possible.
Both are returned
2021-12-23 12:31:43 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Set-Cookie: COOKIE
Set-Cookie: fopEsolarRememberMe=COOKIE
2021-12-23 12:31:43 DEBUG (MainThread) [custom_components.saj_esolar.sensor] {'plantDetail': {'type': 0, 'runningState': 1, 'nowPower': 759.0, 'todayElectricity': 2.81, 'monthElectricity': 2.81, 'yearElectricity': 2.81, 'totalElectricity': 19.23, 'income': 1.44, 'todayGridIncome': 0.21, 'devOnlineNum': 1, 'devTotalNum': 1, 'totalPlantTreeNum': 0.03, 'totalReduceCo2': 0.02, 'todayAlarmNum': 0, 'lastUploadTime': '2021-12-23 12:30:10', 'userType': 2, 'snList': ['R5S2502J2047E410**'], 'energyCompareYearList': ['2020', '2021']}, 'status': 'success', 'pageNo': 1, 'pageSize': 10, 'plantList': [{'plantuid': 'D6CB0927-6CF2-41F3-818D-0CE44E45DB**', 'plantname': 'FischerHome2', 'projectpic': '', 'systempower': 3.0, 'currency': 'AU$', 'type': 0, 'installername': '', 'countryCode': 'AU', 'country': 'Australia', 'province': 'New South Wales', 'city': '', 'county': '', 'foreignRemark': '', 'address': '', 'latitude': -, 'longitude': , 'createDateStr': '2021-12-22 13:33:30', 'isOnline': 'Y', 'runningState': 1, 'nowPower': 759.0, 'todayElectricity': 2.81, 'totalElectricity': 19.23, 'enableEdit': 'Y', 'enableDelete': 'Y', 'enableVisitor': 'Y', 'isFavorite': '0', 'isRename': 0, 'isMulBind': 0, 'isTimeError': 0}, {'plantuid': '309AF148-F156-479A-A2AD-5CFE89A621**', 'plantname': 'FischerHome', 'projectpic': 'monitorftp/upload/plant/2021/11/23/D67D95F4-A314-49E7-BB0E-B54B6D34A599.jpeg', 'systempower': 8.0, 'currency': 'AU$', 'type': 0, 'installername': '', 'countryCode': 'AU', 'country': 'Australia', 'province': 'New South Wales', 'city': 'Lindfield', 'county': '', 'foreignRemark': '', 'address': '', 'latitude': -, 'longitude': , 'createDateStr': '2021-11-09 10:25:54', 'isOnline': 'Y', 'runningState': 1, 'nowPower': 1251.0, 'todayElectricity': 4.35, 'totalElectricity': 996.39, 'enableEdit': 'Y', 'enableDelete': 'Y', 'enableVisitor': 'Y', 'isFavorite': '0', 'isRename': 0, 'isMulBind': 0, 'isTimeError': 0}], 'pageHtml': '
- \n
- « Previous \n
- 1 \n
- Next » \n
- Page Total 2 Records
and only this one updated in logs
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: nowPower State: 759.0
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: runningState State: 1
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: todayElectricity State: 2.81
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: monthElectricity State: 2.81
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: yearElectricity State: 2.81
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: totalElectricity State: 19.23
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: todayGridIncome State: 0.21
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: income State: 1.44
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: lastUploadTime State: 2021-12-23 12:30:10
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: totalPlantTreeNum State: 0.03
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: totalReduceCo2 State: 0.02
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: todayAlarmNum State: 0
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: plantuid State: D6CB0927-6CF2-41F3-818D-0CE44E45DB**
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: currency State: AU$
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: address State: 15
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: isOnline State: Y
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: status State: success
2021-12-23 12:33:44 DEBUG (MainThread) [custom_components.saj_esolar.sensor] Device: peakPower State: 870.0
Ahhhh.. might close this. You can add multiple invertors to a plant, so I have restructured the setup on the esolar portal