ZeverSolar input
Moderator: leecollings
ZeverSolar input
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; 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;
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; 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;
-
- Posts: 38
- Joined: Wednesday 10 January 2018 16:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 38153
- Location: Raalte Holland
- Contact:
Re: ZeverSolar input
Let me no , i have the same inverter a 6000 type , but no connection to domotic.
-
- Posts: 11
- Joined: Monday 05 January 2015 19:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: the netherlands
- Contact:
Re: ZeverSolar input
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')
Good Luck!
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
- phoenixblue
- Posts: 76
- Joined: Friday 25 November 2016 11:20
- Target OS: Windows
- Domoticz version:
- Contact:
Re: ZeverSolar input
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?
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?
-
- Posts: 11
- Joined: Monday 05 January 2015 19:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: the netherlands
- Contact:
Re: ZeverSolar input
Sure, add an "else". But why?
- phoenixblue
- Posts: 76
- Joined: Friday 25 November 2016 11:20
- Target OS: Windows
- Domoticz version:
- Contact:
Re: ZeverSolar input
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.
And write those info into an text dummy sensor:
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);
Code: Select all
commandArray = {}
local localvar1 = 172
commandArray['UpdateDevice'] = localvar1 .. '|0|' .. tostring(uservariables["E_Status"])
-
- Posts: 1
- Joined: Saturday 22 February 2020 14:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ZeverSolar input
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
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
-
- Posts: 11
- Joined: Monday 05 January 2015 19:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: the netherlands
- Contact:
Re: ZeverSolar input
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
-
- Posts: 38
- Joined: Wednesday 10 January 2018 16:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 38153
- Location: Raalte Holland
- Contact:
Re: ZeverSolar input
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
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
Who is online
Users browsing this forum: No registered users and 0 guests