Python Code to Export Energy or otherwise

Greetings
I want to develop a method of querying the inverter at 2300 and beginning a forced discharge. I am thinking that it would be good to do this in python, not sure how i would automate.

I am also thinking that someobody here may have already had this idea and developed a similar project.

All known wisdom welcomed.

Thank You

B

there are definitely some scripts for similar things on the original GivEnergy community forum GivEnergy

I use Predbat and Home Assistant so don’t have my own scripts (although I do have HA automations that do this via GivTCP)