Closed Cees2439867 closed 4 years ago
How I did it Create in Domoticz/Settings/Hardware a type “Dummy (Does nothing, use for virtual switches only)”. After that create a virtual sensor of type “Elektric (Actual+Counter)”. Go to Domoticz/Settings/Devices find your device and note down the device number for later use (Idx). Go to Domoticz/Others and find your device there. Select modify and change the type in "Supply". Also "Energy Read" = Computed (Black dot selects it). Go to Domoticz/Settings/System and in the middle of the page you find “Local networks (no username/password)”. Enter the range where Domoticz has its IP address. For instance “192.168.1.*”.
Update the system: sudo apt-get update && sudo apt-get upgrade
Install PHP: sudo apt install php -y
In my case version 7.3 was installed. You require also curl, check this with: curl -V
Install also the the Curl dependency with: sudo apt install php7.3-curl
Then put the script in place: cd /home/pi/domoticz/scripts sudo mkdir pass2php cd pass2php sudo nano growatt-inverter.php Paste the text from windows into the now open file on Domoticz. Update the script with the correct data. Look at the instructions at the top of the file, very helpful. Change username, password, enter the correct local address of your Raspberry PI like “192.168.1.114:8080”. At line 65 you enter the number of the device (Idx). Save the file
Creat a cronjob: sudo crontab -e
Add the following line: /5 * php /home/pi/domoticz/scripts/pass2php/growatt-inverter.php
Fantastic, after five minutes you find the first value showing up!
Ha it seems you were working on the Pass2PHP script and reported back in the Domoticz PLUGIN repository. But glad to know it is working for you as well. :)
Hi Sincze, I am so grateful for your work, it works fantastic, thanks!