djansen1987 / SAJeSolar

SAJ eSolar Portal Sensors
GNU General Public License v3.0
21 stars 13 forks source link

All data lose -New platform migrate. #72

Open TecnoTalarn opened 6 months ago

TecnoTalarn commented 6 months ago

Hello, I have been using this software for over a year without any problems. Today, December 8th, I lost all the information I was collecting without any prior warning. I thought my HA was corrupted, and pulled the backup. Same result, I don't see the battery, I don't see any information from the SAJ portal. Looking at the manufacturer's app, everything is OK. Finally, I connect to the SAJ portal and I don't see my inverter or any data. I see that there is a switch to a "new platform", I enter that platform and there is all the information. I already understood that it happened. They have migrated my plant to the new portal, without warning. I imagine it's happening to all users. And those of us who depend on HA are now blind. In my case, I need to know the battery charge to decide if I should connect the inverter to the grid, since I am usually not connected to it. Do you know if there is a way to fix this quickly? If it had happened in the middle of summer, I wouldn't worry too much, but at this time, I need to be aware of how the battery is doing.

Thanks.

TecnoTalarn commented 6 months ago

Well, I've tried without success since I'm not very good at application programming, to modify the URL where it connects but it's not enough. It would be possible to modify the way of passing the login data, and also, for sure, it would not be able to capture the data that is on the web. The maximum I have achieved is to put the URL of the login. 2023-12-09 00:36:56.255 ERROR (MainThread) [custom_components.saj_esolar.sensor] https://esaj-home.saj-electric.com/login returned 405

stefagi commented 6 months ago

I have the same problem. I'm trying to use the url "inversor.saj-electric.com" as described here: https://github.com/djansen1987/SAJeSolar/releases/tag/v1.5.1 without success

TecnoTalarn commented 6 months ago

Well, I have seen that the greenheiss or solarprofit inverters are still operational on the old platform, but the SAJ devices are no longer there. I tried to connect to the greenheiss platform with my user and it can be accessed, but there is no inverter and if you try to add an inverter SAJ detects a wrong SN. What I haven't tried is re-enabling the inverter on the old SAJ website, because I think they would delete it immediately.

I hope someone more knowledgeable than me can find a way to access the new platform soon!

TecnoTalarn commented 6 months ago

https://esaj-home.saj-electric.com/monitor/device-monitor-detail?deviceSn=XXXXXXXXXXXX This is the only page that is needed. Maybe the API can go much better, but if we could get the info from here, it would be fine.

This other page also works, at the moment: https://inversor.saj-electric.com/cloud/cloudMonitor/deviceInfo?devicesn=XXXXXXXXXXXX But I don't see how to edit the component so that it goes directly to read this.

palmfieldsflame commented 6 months ago

I had the same problem from yesterday but mine has started working again just now with no changes to the the configuration. Hope it stays working.

miquelbotanch commented 6 months ago

Here in Barcelona, it has been giving me strange values during a day or so, after that, all of a sudden the integration returned me "no numeric value" for grid production and battery level, and now, it's working again.

Maybe I'm getting the info from another server or SAJ changed something IMG_6290

TecnoTalarn commented 6 months ago

Hello again I made changes on my module to connect a SOLARPROFIT page, and run fine. Also I see all data are again in esolar fop webserver. Maybe a database error on server, and have resolved.

If anyone need solarprofit mod, I can send. My version is very old, but I made a lot of changes in order to see more data from server, like independent array values or negative power value on battery to see charge or discharge.

Thanks from Catalonia.

palmfieldsflame commented 6 months ago

My HA was not pulling data from the SAJ portal again today. I looked here and there seemed to be no one else facing the same issue as me. I then checked my HA logs and found these errors. Error1 error2

After some investigation It turns out that my data is on the international node and the urls for the international and European nodes are different also the url for the European node is the same as the old url. The url for the international node is https://intop.saj-electric.com/saj/login. Searched for 'https://fop.saj-electric.com/saj/login' and replaced it with 'https://intop.saj-electric.com/saj/login' in sensor.py and now my data is back.

OlorinSledge commented 6 months ago

My HA was not pulling data from the SAJ portal again today. I looked here and there seemed to be no one else facing the same issue as me. I then checked my HA logs and found these errors. Error1 error2

After some investigation It turns out that my data is on the international node and the urls for the international and European nodes are different also the url for the European node is the same as the old url. The url for the international node is https://intop.saj-electric.com/saj/login. Searched for 'https://fop.saj-electric.com/saj/login' and replaced it with 'https://intop.saj-electric.com/saj/login' in sensor.py and now my data is back.

I was also having the same issue and noticed I was now using the international node.

To fix this you need to search for all instances of "fop" and replace with "intop". There are two locations in sensor.py:

  1. Line 55: BASE_URL = 'https://fop.saj-electric.com/saj/login'
  2. Line 506: vol.Optional("provider_domain",default="fop.saj-electric.com"): cv.string,

Change the "fop" to "intop" for both the above lines and everything will be working again.

djansen1987 commented 5 months ago

If anyone can make a pull request so it works in both situations i am happy to merge it. Unfortuanly i also do not have a saj device anymore and there for it is not on top of my priorities. Also happy to assign a second owner to the projects

santiagoGPNC commented 5 months ago

@OlorinSledge @palmfieldsflame in the most recent version of the code, the domain can be passed through the configuration . This was done for the benefit of solarprofit and greenheiss users, but I think should work for this as well.

e.g. adding

provider_domain: https://intop.saj-electric.com
provider_path: saj

will most likely do the same as you mention

connornz commented 5 months ago

My HA was not pulling data from the SAJ portal again today. I looked here and there seemed to be no one else facing the same issue as me. I then checked my HA logs and found these errors. Error1 error2 After some investigation It turns out that my data is on the international node and the urls for the international and European nodes are different also the url for the European node is the same as the old url. The url for the international node is https://intop.saj-electric.com/saj/login. Searched for 'https://fop.saj-electric.com/saj/login' and replaced it with 'https://intop.saj-electric.com/saj/login' in sensor.py and now my data is back.

I was also having the same issue and noticed I was now using the international node.

To fix this you need to search for all instances of "fop" and replace with "intop". There are two locations in sensor.py:

  1. Line 55: BASE_URL = 'https://fop.saj-electric.com/saj/login'
  2. Line 506: vol.Optional("provider_domain",default="fop.saj-electric.com"): cv.string,

Change the "fop" to "intop" for both the above lines and everything will be working again.

Which file is this? I can't find these lines anywhere in the .py files... Can someone help?

santiagoGPNC commented 5 months ago

@connornz you should be able to change the domain in your configuration.yaml following the configuration instructions

provider_domain: https://intop.saj-electric.com provider_path: saj

connornz commented 5 months ago

@connornz you should be able to change the domain in your configuration.yaml following the configuration instructions

provider_domain: https://intop.saj-electric.com provider_path: saj

Like this?

sensor:

santiagoGPNC commented 5 months ago

on a glance, yes (assuming you have the most recent version, that is.)

connornz commented 5 months ago

on a glance, yes (assuming you have the most recent version, that is.)

Doesn't matter what I do. I get the following "ERROR (MainThread) [custom_components.saj_esolar.sensor] return data NONE"

djansen1987 commented 2 months ago

Did you get it resolved ?

connornz commented 2 months ago

Nope. But haven’t tried recently. I manually specified the Int domain as I use the international server but still no luck. Given up for now. Using modbus to read battery percentage, but usage No enterties for battery that I can use in the energy dashboard.On 8 Apr 2024, at 5:38 AM, Daniel Jansen @.***> wrote: Did you get it resolved ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

djansen1987 commented 2 months ago

I also want to look in to the Modbus. Could you perhaps share how you connected the modbus and what device you use to read the values in Home assistant ?