"The GivEnergy App uses an API and connects to your GivEnergy Cloud Monitoring account. The APP provides basic information about your Home Energy Demand, Solar PV Generation, Grid import energy and GivEnergy Battery Usage. "
https://kb.givenergy.cloud/article.php?id=5
With mcsMQTT the integration is performed on the Cloud Page, URL tab by setting up the URL to givenergy. The POST method is used and authentication is provided as part of a login endpoint
An HS Device is created to work with this URL. Through this device the endpoints are sent
A session is started with the following endpoint where YYYY and ZZZZ are login credentials
The mcsMQTT MQTT Page, Association tab will show the returned response which includes a success key and other information. The success will be true for a valid login.
Other API endpoint can now be requested such as below. The full set of API endpoints are provided in the link at the top of this post
or
All information that is returned is presented in the Association table of the MQTT page. Association with HS devices can be done with the "A" column checkbox
The success key should be monitored with a HS event and the login endpoint sent when success is false so that a new session can be established. Alternately a period logic can be performed as there is no ill-effects from multiple logins. In general a session should be maintained as long as a connection exists, but when the connection is lost then the session is no longer available.
Attached is update to mcsMQTT to accomodate the session logic.
https://kb.givenergy.cloud/article.php?id=5
With mcsMQTT the integration is performed on the Cloud Page, URL tab by setting up the URL to givenergy. The POST method is used and authentication is provided as part of a login endpoint
An HS Device is created to work with this URL. Through this device the endpoints are sent
A session is started with the following endpoint where YYYY and ZZZZ are login credentials
Code:
/login?account=YYYY&password=ZZZZ
Other API endpoint can now be requested such as below. The full set of API endpoints are provided in the link at the top of this post
Code:
/plant/getPlantList
Code:
/inverter/getInverterInfo?plantId=1&serialNum=XXXXX
The success key should be monitored with a HS event and the login endpoint sent when success is false so that a new session can be established. Alternately a period logic can be performed as there is no ill-effects from multiple logins. In general a session should be maintained as long as a connection exists, but when the connection is lost then the session is no longer available.
Attached is update to mcsMQTT to accomodate the session logic.
Comment