Page 1 of 1
ZeverSolar input
Posted: Wednesday 05 September 2018 11:25
by dennisb1
I'm looking for a easy way to import my ZeverSolar S3000 into domoticz.
I now have this working with pvoutput but i want to remove the man in the middle since its far from perfect.
I have found a perl script that will load all information in a sqlite database but i haven't found a way to import this into domoticz.
https://github.com/smeyn/ZeverSolar
There is also a local web interface that this perl script use to load the information from. Is there a way to import this into domoticz or retrive the information directly into domoticz? There is a cgi page that gives the following;

- omvormer.png (16.93 KiB) Viewed 3243 times
I'm sure there must be a easy way to import this?
The main status page gives the following and is used by the script that smeyn has on github;

- omvormer1.png (23.27 KiB) Viewed 3243 times
Re: ZeverSolar input
Posted: Friday 14 December 2018 16:35
by JanAtHome
Let me no , i have the same inverter a 6000 type , but no connection to domotic.
Re: ZeverSolar input
Posted: Monday 13 May 2019 19:55
by pfwolbers
Hello,
I've made some code to read the inverter.
You need to have:
- Script on device trigger
- Smart P1 meter called "Electra" (you can rename)
- IP adres of inverter (mine: 192.168.0.3)
- Uservariable: E_Today, E_Total, E_Total_Yesterday (Type: Integer)
- DummyDevice: Electra (Actueel + Teller) Type -> Levering (ID is needed for 'UpdateDevice')
Code: Select all
commandArray = {}
if (devicechanged["Electra"]) then --Smart meter every 10s update when daytime (shuts down automatically when no sun)
--Only try to read data from inverter when daytime
if timeofday['Daytime'] then
--print("start !")
local f = assert(io.popen("curl -s http://192.168.0.3/home.cgi" , 'r')) --Read data from webpage zeversolar
--print("f " .. f)
if (f ~= nil and f ~= '') then
--print("start read !")
local s = assert(f:read('*a'))
--print("Solar".. s)
if (s ~= nil and s ~= '') then --Check for valid value of response of read command
--print("s " .. s)
lines = {}
for t in s:gmatch("[^\n]+") do
table.insert(lines, t)
end
--local ID = lines[3]
--local Key = lines[4]
--local HW = lines[5]
--local SW = lines[6]
--local TimeDate = lines[7]
--local Key = lines[10]
local PacW = lines[11]
local E_Today = lines[12]
local Status = lines[13]
--print("PacW " .. PacW)
--print("E_Today " .. E_Today)
--print("Status " .. Status)
if Status == "OK" then
--print("Status == OK ")
commandArray['Variable:E_Today'] = tostring(E_Today*1000);
commandArray['Variable:E_Total'] = tostring(E_Today*1000 + uservariables['E_Total_Yesterday']);
commandArray[1] = {['UpdateDevice'] = 302 .. "|0|" .. PacW .. ";" .. uservariables['E_Total']}
end
end
end
f:close()
else
--Write current total to total yesterday for correct calculation tomorrow
commandArray['Variable:E_Total_Yesterday'] = tostring(uservariables['E_Total']);
local PacW_Zero = 0
commandArray[1] = {['UpdateDevice'] = 302 .. "|0|" .. PacW_Zero .. ";" .. uservariables['E_Total']}
end
end
return commandArray
Good Luck!
Re: ZeverSolar input
Posted: Saturday 30 November 2019 9:39
by phoenixblue
Hi,
I see that the status is used the write the value to Domoticz when it's ok.
Is it also possible to write the value to an device when it's not ok?
Re: ZeverSolar input
Posted: Saturday 30 November 2019 10:32
by pfwolbers
Sure, add an "else". But why?
Re: ZeverSolar input
Posted: Saturday 30 November 2019 12:42
by phoenixblue
Have some problems with the inverter. And I have the idea that it's not always send the error code to the cloud.
So I want to monitor the error code direct to Domoticz.
Update:
I have insert an extra uservariable "E_Status" that fills the current status of the inverter.
Code: Select all
commandArray['Variable:E_Status'] = tostring(Status);
And write those info into an text dummy sensor:
Code: Select all
commandArray = {}
local localvar1 = 172
commandArray['UpdateDevice'] = localvar1 .. '|0|' .. tostring(uservariables["E_Status"])
Re: ZeverSolar input
Posted: Saturday 22 February 2020 15:10
by bjoan
Hello,
I am new to Domoticz - I've installed it to grab data from my Zeversolar unit - that's why I'm in this post.
I'm trying to accomplish this "
You need to have:
- Script on device trigger
- Smart P1 meter called "Electra" (you can rename)
- IP adres of inverter (mine: 192.168.0.3)
- Uservariable: E_Today, E_Total, E_Total_Yesterday (Type: Integer)
- DummyDevice: Electra (Actueel + Teller) Type -> Levering (ID is needed for 'UpdateDevice')"
and I'm a bit confused.
1. I know my Zversolar IP. - changed it in script - checked the "curl .." script on Pi console - data from Zeversolar is correct
2. Added script on device trigger to Events in Domoticz
3. Added dummy device Electra type Electric Instant+Counter (Idx=8) (changed the Idx from 302 to 8 at two places in script)
4. Added uservariables (starting value is 0)
But I don't know what to do with the " Smart P1 meter called "Electra" (you can rename)" ? Add a hardware Smart P1 meter ( USB or LAN) or add second dummy device ?
Could you please explain what I am doing wrong ?
Thank you in advance
Re: ZeverSolar input
Posted: Saturday 22 February 2020 20:41
by pfwolbers
The script reads the data every time the smart meter data is received. That's why it is needed. You can of course change the trigger of the script to something else
Re: ZeverSolar input
Posted: Thursday 25 November 2021 14:15
by JanAtHome
Hello everyone
The script above works perfectly, I'm very happy with it.
Thanks to, pfwolbers.
The following adjustments were necessary for me.
The created user variables were type integer. I don't think that's right and the format should be String. (set to string)
When creating the script, you need to take Lua>Device.
First I had Lua>All but then you get an error message every minus in the log.
So much for my update.
Greetings Jan