Dat kan dus niet als je niet gedoneerd hebt: At least one of the values v1, v2, v3 or v4 must be present.jobr schreef op woensdag 6 maart 2019 @ 19:30:
Mijn Fronius gaat direct zelf naar PVoutput. Ben niet zo thuis in PVoutput maar kan ik met een apart scriptje alleen de temperatuur zelf toevoegen?
Tijdstip van temp kan dus iets afwijken van tijdstip PV gegevens.
Ik heb dus maar v3=0 toegevoegd
@AUijtdehaag
Bij deze mijn Domoticz dzVents script:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
| return {
active = true,
logging = {
--level = domoticz.LOG_DEBUG, -- Uncomment to override the dzVents global logging setting and use debug
marker = 'PVOutput'
},
on = {
timer = {
'every 5 minutes' -- The number of minutes between posts to PVoutput (normal is 5 but when in donation mode it's max 1)
},
httpResponses = { 'triggerPVoutput' }
},
execute = function(domoticz,item)
----------------------------------------------------------------------------------------------------------
-- PVoutput parameters
----------------------------------------------------------------------------------------------------------
local PVoutputApi = '<vul hier je api key in>' -- Your PVoutput api key
local PVoutputSystemID = '<vul hier je systemid in>' -- Your PVoutput System ID
local PVoutputURL = 'http://pvoutput.org/service/r2/addstatus.jsp' -- The URL to the PVoutput Service
local tempSensor = '<vul je naam van je temp sensor in>'
domoticz.log('PVOutput script running', domoticz.LOG_DEBUG)
if (item.isTimer) then
local temperature = domoticz.devices(tempSensor).temperature
domoticz.log('Temperature is :'..temperature..' degrees', domoticz.LOG_DEBUG)
domoticz.log('Call PVOutput url with callback', domoticz.LOG_DEBUG)
-- ASYNC openUrl
domoticz.openURL({
url = PVoutputURL..'?d='..os.date("%Y%m%d")..'&t='..os.date("%H:%M")..'&v4=0'..'&v5='..temperature,
method = 'GET',
callback = 'triggerPVoutput',
headers = { ['X-Pvoutput-Apikey'] = PVoutputApi,
['X-Pvoutput-SystemId'] = PVoutputSystemID
}
})
end
if (item.isHTTPResponse) then
domoticz.log('Callback from url requested. Statuscode:'..item.statusCode, domoticz.LOG_DEBUG)
if (item.ok) then
local valid = string.find(item.data, "OK 200: Added Status")
if (valid ~= nil) then
domoticz.log('Response received from PVOutput: '..item.data, domoticz.LOG_DEBUG)
domoticz.log('Current status successfully uploaded to PVoutput.', domoticz.LOG_INFO)
else
domoticz.log('Current status NOT successfully uploaded to PVoutput -> '..item.data, domoticz.LOG_ERROR)
end
else
domoticz.log('Current status NOT successfully uploaded to PVoutput. Statuscode:'..item.statusCode, domoticz.LOG_ERROR)
end
end
end
} |
Deze voegt dus alleen de temperatuur en noodgedwongen (ben geen donateur) Energy Consumption=0 in.
PVOutput wordt asynchroon aangeroepen waardoor Domoticz niet gaat hangen als PVOutput traag is of niet bereikbaar.








