This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.
This adapter works through Growatt's cloud servers. There is also the Grott project that intercepts the data from the communication.
ioBroker Growatt Adapter to communiacte with Growatt Shine Server. I'm not affiliated. Usually, the data is sent from the data logger to the cloud every 5 minutes. You can change it, see below.
Not all plant types are implemented.
Currently only data can be read, writing parameters or changing parameters is not possible.
Of course if you like my work via Paypal to PLChome at fontanestr dot de
Please enter the name and password that you also use in the Shine app or in the web portal.
On the Growatt website under energy, plant management, operating tools you can send yourself a key by e-mail.
This data record contains the stored master data
Reads the last data record from the history of the data logger. This function supports minute intervals for the data logger.
These data are not available for all plants (not INV/MAX/TLX). This dataset contains live data. This function supports minute intervals for the data logger.
This data record contains aggregation data.
This data record contains some data from the device. Some data are also available in the other categories.
This data set contains the weather forecast.
Reads the entries in the fault log of the current year and creates objects with the messages for this. Only the first page with the most current reports is read.
If this is activated, some settings can be edited for some inverters.
Objects are created below the inverter serial number element for the settings. A channel is created for each setting.
Below the objects are "read", "write", "msg" and and the node values. Below the values are parameters.
If the values of the parameters could be read, they are written with ACK=true. "read" is set to true on successful reading with ack. If reading fails, "Read" is set to false ack=true. Writing to "Read" from "true" without ACK triggers a read operation. If a new connection to the cloud is established, the settings are also read out.
To write the settings, the parameters must first be set. Then "write" is set to true with ack=false. If the data was written successfully, "write" is set to "true" ack=true, if the inverter reported an error, "write" is set to "false" ack=true. In addition, the return message of the inverter is written to the "msg" status.
If writing was successful, reading is automatically triggered.
The inverter can only change one setting at a time and the transmission path is from ioBroker via the cloud to the WLAN adapter and then to the inverter. The settings are processed one after the other via a queue. A session time that is too short can lead to problems.
The writing of the settings was developed to the best of our knowledge. However, the author does not assume liability for errors contained in or for damages arising from the use of the software.
Select it if your Growatt page is a C&I Plant page with indexbC or plantDo in the Path of the Growatt webinterface.
The black C&I pages (commercial and industrial) have an other path to the objects but it semms to work if this Checkbox is on. It Changed index to indexbC in the webpath.
The default timeout for HTTP requests. The default value 60 seconds, as with web browsers
This timeout monitors the collection of data from the Growatt server. If the server does not process all of the data within this time, an error is reported, the session is ended and a new cycle timer is started. The default value is 600 seconds. If the value is 0, this check function is not executed.
The adapter only logs in once and not with every data request from the Growatt server. By default it is on.
Here you can set when the adapter logs out of the server and logs in again. A 0 means never log out. Default value is 0=infinity.
The interval at which the data is requested from the server. The time required for the data query is then deducted from the next one. If the query lasts longer than the waiting time, the adapter only sleeps 100ms. The default value is 30 seconds.
If an error occurs when querying the values at the Growatt server, this time is used instead of the cycle time. The default value is 120 seconds
Another url can be entered here, for example to use the US domain. But it must start with "https://". The default is blank, so https://server.growatt.com is used.
Here you can define what should happen to each value (object) that is picked up by the inverter. There are a lot of values that do not belong to your inverter. These can be removed here. Since there is no event with which the object list can be reloaded when saving. The update button must be used when save is pressed.
The object remains, the value is updated.
The object is deleted and the value loaded by the inverter is discarded. After the update, only the ID and the action are displayed because the object no longer exists. If you select normally, the object will be created again after saving.
The object remains, the values from the inverter are discarded.
The instance must be running and logged in to the server. Then the settings of the data logger can be called up via the refresh button in this tab. The data is not requested automatically, the request can only be made via the button. The fields displayed for the data logger cannot be changed. It is only about retrieved data. Buttons are displayed for each logger. Settings can be edited with the button. When using GROTT, changing settings in the INI must be enabled. Please do not use the settings if a value appears that you did not expect. Attention this is based on reingeneering. I am not liable for damage to the device.
The current interval in minutes is read from the data logger and an input form appears in which the value can be adjusted. If you get a successful response, the data logger should be restarted to activate the settings.
The server for data transmission on the logger can be set here. When using Grott or US, the local or US IP can be specified here. If you get a successful response, the data logger should be restarted to activate the settings.
The port on the server for data transmission on the logger can be set here. If you get a successful response, the data logger should be restarted to activate the settings.
It will be asked whether the firmware of the data logger is up to date. The update must be done on the growatt page.
Every boot is good. The settings are accepted.
It is possible to send a command to the instance via sendTo. The adapter then responds. The following commands are implemented. The return value is returned depending on the parameter transfer. If the parameters are passed as a JSON string, a JSON is returned. If the parameters are passed as an object, an object is returned.
This command lists the history. It can be used, for example, to supplement data in a database. Regardless of the time range, Growatt always seems to return 80 records. If the interval is set to 1 minute and more than 80 minutes are needed, the command must be executed several times and the start from 0 must be increased more and more.
Parameter | Type | Description |
---|---|---|
type | String | The type of inverter can be found in object "growatt. - instance - . - nr - .devices. - sn - .growattType". |
sn | String | The serialnumber of inverter can be found in object path "growatt. - instance - . - nr - .devices. - sn - ". |
startDate | Date | The atart |
endDate | Date | The end mast be grater then start |
start | Integer | 0 is the start page for the call with the most recent data first |
Example call:
sendTo('growatt.0','getHistory',{"type":"<your inverter type>","sn":"<your inverter serial>","startDate":new Date((new Date()).getTime()- 60*60*1000),"endDate":new Date() , "start":0},(res)=>{console.log(res)})
Example code:
const sn = " your sn "; //your inverter sn
const inType = " your typ "; // the invertertyp
const hist = 'growatt.0. your nr .devices. your sn .historyLast.'; // the Path to history
const storeField =['accChargePower','etoGridToday']; //the fields to store
const history = "influx.0" //your History sql.0 or influx.0 or history.0 ...
const min = 10 // größer 10 min auffüllen....
on({id: hist+'calendar', change: "ne"},(obj)=>{
if ((obj.state.val - obj.oldState.val) > min*60000) {
console.log(obj.state.val - obj.oldState.val);
function fillup(res) {
res.forEach((r)=>{
const ti = (new Date(r.calendar)).getTime();
if (ti > obj.oldState.val && ti < obj.state.val) {
function store(n) {
sendTo(history, 'storeState', {
id: hist+n,
state: {ts: ti, val: r[n], ack: true}
}, result => {console.log(`added ${hist+n} ${new Date(ti)} ${r[n]}`)});
}
storeField.forEach((f) => {store(f)});
}
})
}
sendTo('growatt.0','getHistory',{"type":inType,"sn":sn,"startDate":obj.oldState.val,"endDate":obj.state.val, "start":0},fillup)
sendTo('growatt.0','getHistory',{"type":inType,"sn":sn,"startDate":obj.oldState.val,"endDate":obj.state.val, "start":1},fillup)
sendTo('growatt.0','getHistory',{"type":inType,"sn":sn,"startDate":obj.oldState.val,"endDate":obj.state.val, "start":2},fillup)
sendTo('growatt.0','getHistory',{"type":inType,"sn":sn,"startDate":obj.oldState.val,"endDate":obj.state.val, "start":3},fillup)
}
});
It gives you information about the dataloggers. This function has no parameters. Either "{}" or {} must be passed. The return is an array of object.
Parameter | Type | Description |
---|
It reads out the interval and returns it. the return value is an OBJ. The interval is in msg.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
Writes the interval at which the logger sends the data.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
value | integer | The new value in minutes |
An object is returned with a message.
It reads the IP to which the logger sends the data and returns it. The return value is an OBJ. The IP is in msg.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
It writes the IP to which the logger sends the data. It's useful for the Grott project. The return value is an object that says what happened.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
value | integer | The new value in minutes |
An object is returned with a message.
It reads the port to which the logger sends the data and returns it. The return value is an OBJ. The IP is in msg.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
It writes the port to which the logger sends the data. It's useful for the Grott project. The return value is an object that says what happened.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
value | integer | The new value in minutes |
An object is returned with a message.
Calls up the firmware check from the logger. If an update is necessary, you can see it in the answer.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
Causes a warm start of the data logger.
Parameter | Type | Description |
---|---|---|
sn | string | The serial number of the logger is returned by getDatalogger. |
Have a look at Manage Loggers and Button Interval
In hotspot mode it is only possible to change the interval on the old firmware. Growatt has removed the website from the firmware. Therefore, the description has also been removed.
There is no change to the charts on growatt side. There you can only see a change in the data from the datalogger.
-*-
(PLCHome) Write inverter settings, it can be activated via the config
-*-
The MIT License (MIT)
Copyright (c) 2024 PLCHome
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.