Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the intention to add control via the /v2/api/control endpoints? #278

Open
stevegal opened this issue Apr 17, 2023 · 18 comments
Open

Is the intention to add control via the /v2/api/control endpoints? #278

stevegal opened this issue Apr 17, 2023 · 18 comments
Labels
enhancement New feature or request

Comments

@stevegal
Copy link

I've asked solis for the control api documentation and they sent me a pdf of the control api.

Would this be something that would be considered for support in the future?

@viking2010
Copy link

I didn't know there was a control api document. Would it be possible to share it?

@stevegal
Copy link
Author

I'm not sure I'm allowed to share it publically as it says "classification: Secret". Much of the security seems to be the same as you have in this repo (the hashed content header etc). Interesingly the password it requires in the v2/api/login {"userInfo":"username", "passWord": "md5hexdigestofpassword"} where the UserInfo is your username (or email?) and teh passWord is the md5 hex digest of the password.

So far I've got it to login and give me a token (the login gives a lot more than just the token), I'm just not sure where to add the token as section 3.2 just says "need to use Token".

I'll try to just add a "Token" header and see if that works 🤷

@stevegal
Copy link
Author

I didn't know there was a control api document. Would it be possible to share it?

As I said, not sure if I'm allowed. However I just raised a request and asked for details of how to control via the api and they sent me the document in a few days.

@stevegal
Copy link
Author

got a working example...

https://github.com/stevegal/solis_control/blob/main/solis_control.py

Note this this quite brittle and is more of a WIP at this stage! (note must have 3 time slots in the config for example!)

there are a lot more control "cid" available as well, but being able to control the charge & discharge times is a good start.

@hultenvp
Copy link
Owner

Nice! I've been thinking what entities to use if this is to be integrated with home assistant. I need to look deeper into it, but I guess it should be a derivative of a base entity. Then it would also need its own custom card or so to be able to control

@cafedelmar01
Copy link

uld also need its own custom

got a working example...

https://github.com/stevegal/solis_control/blob/main/solis_control.py

Note this this quite brittle and is more of a WIP at this stage! (note must have 3 time slots in the config for example!)

there are a lot more control "cid" available as well, but being able to control the charge & discharge times is a good start.

Mind Sharing how to get this working? (Looking for an solution to disable and enable powerexport remote by HA)

@stevegal
Copy link
Author

Mind Sharing how to get this working? (Looking for an solution to disable and enable powerexport remote by HA)

Sure, you need to install pyscript HACS plugin first, then just paste the service code into the a file called solis_control.py in the pyscript directory and you should be ready to add it into your automations... or just it as a base for other scripts to call.

https://github.com/stevegal/solis_control readme has the info you need. The plant id etc can be found in the same way as in awesome plugin, but it needs your username and password in addition to api keys. I'm not sure it needs turning on from solis for you. I asked if tehy had an api where I could change times and they responded with some documentation, which I got working without further contact with them, so I'm not sure if it gets turned on when you ask for your API keys (this would be my guess)

@cafedelmar01
Copy link

Mind Sharing how to get this working? (Looking for an solution to disable and enable powerexport remote by HA)

Sure, you need to install pyscript HACS plugin first, then just paste the service code into the a file called solis_control.py in the pyscript directory and you should be ready to add it into your automations... or just it as a base for other scripts to call.

https://github.com/stevegal/solis_control readme has the info you need. The plant id etc can be found in the same way as in awesome plugin, but it needs your username and password in addition to api keys. I'm not sure it needs turning on from solis for you. I asked if tehy had an api where I could change times and they responded with some documentation, which I got working without further contact with them, so I'm not sure if it gets turned on when you ask for your API keys (this would be my guess)

That would be awesome! Is it on some how possible to retrieve a list of push/pull api index? The is i would love to control remotely is the "backflow/export grid setting"

@stevegal
Copy link
Author

stevegal commented Sep 2, 2023

The api that I was using seems to have changed. There is, however, a new tikcet type of End User Control Access now available on the solis cloud platform. I've raised a ticket with them and I'm waiting a response.

@TGRolando
Copy link

I don't suppose you have had any further luck with this.
I've been in contact and signed their NDA. I've got the pdf document but haven't got any API keys yet.
I'm also raising a ticket for "End User Control Access"

@RutgerBeyen
Copy link

I'm very interested in this functionality as well.
Seems Solis did deactivate my API access after requesting the "end user control access", so waiting for all access to be working again before I can test anything.
I'd be happy to assist when working on this feature

@stevegal
Copy link
Author

the control in the linked repo seems to be working fine. There was a bit of instability as solis rolled out their (unpublished) next version that they use in their web app, but the v2 control functionality seems to be stable.

@graemejross
Copy link

Hi @stevegal - I requested remote access, signed the nda, installed pyscript HACs plugin, installed solis_control.py and setup a script to call the service with my credentials. When I run the script, no errors are generated but there is also no effect to my inverter settings. Do you know if this is still working? Do you have any tips on debugging, for example how can I tell if the api has been called and if any error messages were issued? Thanks for the good work!

@steveworkman
Copy link

@stevegal I asked Solis for the API this morning and I was not asked to sign an NDA. The docs are on their OSS server.

@ausloki
Copy link

ausloki commented Jul 8, 2024 via email

@steveworkman
Copy link

I contacted Solis support through their official channels and the above was what I got

What email pls. is only think stopping me from using it 😊 Refuse to sign an NDA From: Steve Workman @.> Date: Monday, 8 July 2024 at 3:01 PM To: hultenvp/solis-sensor @.> Cc: Subscribed @.> Subject: Re: [hultenvp/solis-sensor] Is the intention to add control via the /v2/api/control endpoints? (Issue #278) @stevegalhttps://github.com/stevegal I asked Solis for the API this morning and I was not asked to sign an NDA. The docs are on their OSS server. * API https://oss.soliscloud.com/doc/SolisCloud%20Device%20Control%20API%20V2.0.pdf * List of commands https://oss.soliscloud.com/doc/SolisCloud_control_api_command_list.xlsx — Reply to this email directly, view it on GitHub<#278 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUESEBQ7C5PBYXQR6CL6LVDZLI2LRAVCNFSM6AAAAAAXBSNVPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJTGE4TCNRWGQ. You are receiving this because you are subscribed to this thread.Message ID: @.>

@calentadorsolarpasoapaso

I got it working today, maybe the API changed recently and stevegal branch was not working to me. I´ll create a branch with my changes.

@fboundy
Copy link

fboundy commented Dec 7, 2024

I've added this via PR #398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests