Is Grott a proxy server? #351
-
Can someone please clarify the following for me..
If I understand correctly, Grott interposes itself between the inverter and the Growatt server. Does this mean that it is acting as a proxy server on the LAN in some way? Or is it interposing itself in some other manner? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 1 reply
-
Indeed it is a proxy server. You can find more info in the wiki. |
Beta Was this translation helpful? Give feedback.
-
If you're struggling to understand it, consider this:
So in essence the inverter uses Grott as an intermediary to connect to the Growatt servers and by doing so Grott gets to read the messages between the inverter and Growatt. Hope it helps. (Edit: should be noted there is an exception only in GrottServer mode where Grott assumes all the roles of Growatt's server but the principle/mode of operation is the same) |
Beta Was this translation helpful? Give feedback.
-
Thank you both for the information. I am a Java developer who uses openHAB and who has written several binding integrations into openHAB. I shall probably be buying a Growatt inverter next week. And I shall be seeking to integrate it into OH via Grott. I see that Grott can forward data via MQTT to (say) the MQTT server running on OH. In that configuration one would probably have a separate RPi running Grott, and another RPi running OH. It probably requires a lot of configuration work mapping the Grott data via MQTT into OH format. Which is probably not very user friendly for the average Joe. So I think that I shall attempt to make a tighter integration between Grott and OH; for example by running Grott and OH on the same RPi and passing data within the two applications on the same computer. I will have a look into your code to see what can be done. But if you have any thoughts I would much appreciate it. :) |
Beta Was this translation helpful? Give feedback.
-
^
EDIT: I would need to make sure that the Grott proxy server is insulated from the OpenHAB main UI server running on the same machine. |
Beta Was this translation helpful? Give feedback.
-
Integration with openhab is a good idea. Have you seen that Grott supports extensions (https://github.com/johanmeijer/grott/wiki/Extensions). It it very easy to create an extension which does a http request which can send json data to a openhab http listen. There is a extension example with http request in the samples (library.https://github.com/johanmeijer/grott/blob/Beta-(2.8.x)/examples/Extensions/grottext.py) At this moment there are also extension for Home Assistent and generating csv (excel) files. |
Beta Was this translation helpful? Give feedback.
-
Yes, I think that I can use that one. Many thanks. Apropos the JSON payload, I saw your examples of typical JSON contents, with JSON elements for current/voltage/power/energy for both PV strings and for the grid. Since my solar system will also have a battery, do you know if there are any JSON elements for the battery data? |
Beta Was this translation helpful? Give feedback.
-
What type inverter do you have? You probably have to specify invtype= in the grott.ini. you can specify spf, sph, spa, min or tl3. I tried to define also most of the battery values in the records. If not everything is there we can try to find it. |
Beta Was this translation helpful? Give feedback.
Indeed it is a proxy server. You can find more info in the wiki.