This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Photovoltaik Visu
#1
Hi,

I want to visualize my PV system. I use a Schneider IEM3155 for the measurement. Unfortunately I only get the total value in Kwh, but I would like to have the daily value. Here is my script and the error:

---------------- Objektadressen ---------------------
-- Hier die Adressen der jeweiligen Objekten einfügen
-- Wo der PV-Energiewert gespeichert wird (Objekt)
adr_PVEnergie = "1/2/3"

-- Wo der PV-Tageswert gespeichert wird (zur Visu)
adr_PVTageswert = "1/2/4"

-- Wann der Tageswert zurückgesetzt werden soll
hour_reset = 23
min_reset = 59

---- Logik ----
now = os.date(t)

if (now.hour == hour_reset and now.min == min_reset) then

    PVEnergie = grp.getvalue(adr_PVEnergie)

  storage.set('vortageswert', PVEnergie)

    grp.write(adr_PVTageswert, 0)

else

    PVEnergie = grp.getvalue(adr_PVEnergie)

  vortageswert = storage.get('vortageswert')

  PVTageswert = PVEnergie - vortageswert

    grp.write(adr_PVTageswert, PVTageswert)
   
end


Error:

Resident script:30: attempt to perform arithmetic on global 'vortageswert' (a nil value)

stack traceback:
Reply


Messages In This Thread
Photovoltaik Visu - by tirei - 10.05.2020, 11:06
RE: Photovoltaik Visu - by tirei - 10.05.2020, 20:04

Forum Jump: