solis-sensor icon indicating copy to clipboard operation
solis-sensor copied to clipboard

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

Open stevegal opened this issue 2 years ago • 17 comments

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?

stevegal avatar Apr 17 '23 18:04 stevegal

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

viking2010 avatar Apr 22 '23 19:04 viking2010

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 avatar Apr 28 '23 16:04 stevegal

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 avatar Apr 29 '23 11:04 stevegal

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.

stevegal avatar May 10 '23 20:05 stevegal

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

hultenvp avatar May 26 '23 08:05 hultenvp

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)

cafedelmar01 avatar Jun 03 '23 22:06 cafedelmar01

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)

stevegal avatar Jun 10 '23 13:06 stevegal

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"

cafedelmar01 avatar Jun 10 '23 20:06 cafedelmar01

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.

stevegal avatar Sep 02 '23 13:09 stevegal

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"

TGRolando avatar Sep 30 '23 19:09 TGRolando

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

RutgerBeyen avatar Nov 09 '23 09:11 RutgerBeyen

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.

stevegal avatar Jan 16 '24 21:01 stevegal

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!

graemejross avatar May 23 '24 02:05 graemejross

@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

steveworkman avatar Jul 08 '24 07:07 steveworkman

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 GitHubhttps://github.com/hultenvp/solis-sensor/issues/278#issuecomment-2213191664, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUESEBQ7C5PBYXQR6CL6LVDZLI2LRAVCNFSM6AAAAAAXBSNVPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJTGE4TCNRWGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ausloki avatar Jul 08 '24 07:07 ausloki

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: @.>

steveworkman avatar Jul 08 '24 08:07 steveworkman