cabberley / HA_RedbackTech

Home Assistant Integration for Redback Technologies Inverters and Batteries
GNU General Public License v3.0
4 stars 1 forks source link

Failed Setup, will retry #2

Closed LachyGoshi closed 4 months ago

LachyGoshi commented 5 months ago

Screenshot_20240607-200334 Screenshot_20240607-201612 Screenshot_20240607-200347 Hi mate, great stuff but she no go bang for me ☹️

Any logs I can help look in to? I've tried a few times by deleting the failed entry and re setting up, and I'm sure my API and portal logins are correct.

Screenshot_20240607-200146 I even tried renaming it when logging in incase there was a conflict with one of the previous integrations.

Do I need to delete them at all first? I didn't think so.

cabberley commented 5 months ago

You will only be able to have 1 entry for each client_id account which should have the Inverters and batterys that that API can see. image

I have tried to reproduce it, but can't. I have seen when I was working on this that if the Python module didn't download in time when it updates, I did get a config error.
Can you try:

  1. Deleting all the configs,
  2. Restarting HA and trying to add it again?
  3. If it does error during setup can you have a look at the logs on HA.
  4. Download the Full Logs.
  5. Finally Restart HA again and see if after the restart it loads correctly?
LachyGoshi commented 4 months ago

Screenshot_20240616-192547 Where is the best place to find logs specific to the integration? Is there an easy way to filter the system logs just to find related entries?

I have just fully removed and reinstalled the latest version, same error still shows as above but I did notice that tapping on it brings up the message about my SI (non battery inverter) not having mode set options. This is true, it is pretty much a dumb inverter that has no modes.

So looks like at least the integration is logging in to the API/portal ok, but needs some filter to determine if it is hybrid/battery controller or not.

cabberley commented 4 months ago

@LachyGoshi the details I need should be in your HA system logs. (Settings\System\Logs). In the list of logs there should be one referencing the redback integration. and if you open it up it should have a lot of lines with file names and line numbers similar to this from a different integration. It is those details I need to start with. It may help if you try and reload the integration, it should generate a new error in the logs and be at the top, making it easier to find.

image

LachyGoshi commented 4 months ago

Yeah that's where I have been looking, nothing in there from "redback technologies". If I re enable Juices integration I sometimes get the below message in the logs:

This error originated from a custom integration.

Logger: custom_components.redback Source: helpers/update_coordinator.py:325 integration: Redback Technologies Portal (documentation, issues) First occurred: 17:55:20 (2 occurrences) Last logged: 19:57:21

Error requesting redback data: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.redbacktech.com/Api/v2/Auth/token')

But with juices integration disabled, home assistant restarted, no entries from this integration.

Is there a logging level I can increase to? I do have "debug logging" enabled on this integration.

Screenshot_20240617-201021

cabberley commented 4 months ago

@LachyGoshi I have made some code modifications, I suspect the HTTP 500 error is due to this inverter not having "schedules" that the battery\hybrid inverters have. This one has relays. Do you use the smart relays on this inverter? They are handled through a different API. In HACS Could you please update the "Redback Technologies SmartHybrid" Integration, Then install version 2024.6.5

This, if I guessed right should hopefully enable you to see your SI inverter.

LachyGoshi commented 4 months ago

Screenshot_20240618-194237 Screenshot_20240618-194303 Screenshot_20240618-194345 Screenshot_20240618-194514 Screenshot_20240618-194548 Screenshot_20240618-194804 Screenshot_20240618-194807 Screenshot_20240618-194754 Screenshot_20240618-195323 Amazing, seems to be loading now!

I successfully added a quick schedule and it's shown in the web portal and started!

What is the difference between active event inverter mode and scheduled inverter mode.... Wondering why the scheduled would be charge when it is actively running my discharge schedule? Screenshot_20240618-195146

Screenshot_20240618-195238

cabberley commented 4 months ago

@LachyGoshi Thats great news! Good to see you can see all of your Redback devices now!

  1. I just write this in the wiki active vs Scheduled events . Let me know if that makes sense?
  2. Do you have anything connected to the Relays on your SI5000? and if so do you use the 'smart' controls of it? There is a separate API that enables you to control what they do, similar to the schedule of the SH5000. have some more work to do on the code and just prioritising my list.
  3. In the next release I will put some more logic in the code to remove the buttons from the SI5000 device as they aren't relevant for that model.
cabberley commented 4 months ago

@LachyGoshi I have just release version 2024.6.6 which should be better for you. In particular it should no longer add the buttons to the SI Inverter, as they are irrelevant. If you provide some more info to the Q's above I can add that into a future release as well.

LachyGoshi commented 4 months ago

Hi mate, sorry I blanked and didn't answer your questions - was too excited in the morning that it was working.

The SI5000 has the logic for a relay control, but mine has no such hardware. I believe the idea is to let the redback control a relay for things like pool pumps etc to run when a set PV power or time of day in met.

The SH5000 has logic for 4 relays, I have 2 in my cabinet which I currently do not use as I have other smart relays / smart plugs to control loads as needed. One day I might use them for something.

cabberley commented 4 months ago

That's all good, nice to hear the work I have done has helped!

Still have some more stuff I want to expose and surface from redback. I also have some other info from them which I will add onto the readme, so help with curtailment and other things.

LachyGoshi commented 4 months ago

Screenshot_20240620-192110 Screenshot_20240620-192150 Screenshot_20240620-192159 Screenshot_20240620-192206 Screenshot_20240620-192257 After deleting the old config, I just downloaded the latest 6.6 release and re set it up.

SI page much more cleaned up (thanks). There are still some sensors listed for my single phase SI5000 that I don't think are relevant (all the phase B and C) and a battery count still listed in diagnostic section.

Overall, this is great, thanks so much. I will have to experiment with the call service action for the immediate setting of hybrid inverter mode/power as that's what I still use "inverter mode set" integration for.

LachyGoshi commented 4 months ago

This has been working well last couple of days so I'll close it shortly.

But before I do, just wondering: Is there a clear definition for all the values listed in the inverter modes? As in what Ppv, xmax, Pinv Pbatt. I can take a guess at what I'm pretty sure these are but it would be nice to know I'm thinking straight.

How can I do the service call for a quick mode change, this is what I still use your old integration for but if you share some examples of how to use the service call I will be able to remove the old integration and just use this one!

cabberley commented 4 months ago

So, the additional, 'modes' that I have documented are only usable if you use the 'schedule' approach to manage your inverter. The 'Portal' Set method they are rejected.

So a new version I am about to release, which can be installed now if you enable beta versions on your HASS adds some new features.

I have added an option for you that adds a portal set button, which will take the Mode and Power values and use the Portal to set the mode with those. IT WILL NOT REVERT to Auto using this tho! There is no duration/timer!

Not sure what you mean by examples. If you go to the Developer Tools/Services screen and select a Redback Service, the fields are all labeled and documented. If your familiar with using the Automations of HASS, you could create your Input Helpers to set some values, then use an automation that when triggered will use those values to populate the Service call and fire it off.

LachyGoshi commented 4 months ago

New version working ok with my two inverters. One hybrid with battery, other normal grid tied inverter. Setup as being on same site.