Temp uploadscript to Pvoutput
Posted: Saturday 11 August 2018 17:13
Dear all...
Is there perhaps someone that have a script to upload a single temp sensor to Pvoutput..
I do have a Heatpump and will try to upload some temp devices to PVO so i can monitor my pump.
I upload a powerdevice with this script....
Only i still cannot change the script because i do not understand scripting...
If someone have a other script or a upload working in Dzvents..
I am happy with everything.!!
Thanks!!
Is there perhaps someone that have a script to upload a single temp sensor to Pvoutput..
I do have a Heatpump and will try to upload some temp devices to PVO so i can monitor my pump.
I upload a powerdevice with this script....
Only i still cannot change the script because i do not understand scripting...
Code: Select all
commandArray = {}
print ("Warmtepomp naar P.V.O.")
date = os.date("*t")
if (date.min % 5 == 0) then -- %10 is iedere 10 minuten
solar = otherdevices_svalues['Z: Wp Total']
now, total = solar:match("(%d+);(%d+)")
-- print(solar..' '..now..' '..total)
-- Upload data to PVoutput every 5 mins [ verander %5 in %10 en dan iederre 10 minuten ]
baseURL = "http://pvoutput.org/service/r2/addstatus.jsp?"
SID = "15798"
API = "c53c834f1a035b7eeb61cbf65a3210ea535 API changed "
PVO_URL = baseURL .. "sid=" .. SID .. "&key=" .. API .. "&d=" .. os.date("%Y%m%d") .. "&t=" .. os.date("%H:%M")
PVO_URL = PVO_URL .. "&v1=" .. total .. "&v2=" .. now .. "&c1=1"
--print(PVO_URL)
commandArray['OpenURL'] = PVO_URL
end
return commandArray
I am happy with everything.!!
Thanks!!