question about error [Solved]
Moderator: leecollings
-
- Posts: 146
- Joined: Tuesday 26 May 2015 8:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: right here
- Contact:
question about error
Hi,
I run the presence detection with unifi cloudkey script and that was running fine for long time.
Since a few git pulls ago I get errors in the log (and I get mails as well when an error occurs) so I get regular mails now.
The error is : dzVents: Error: (2.4.26) HTTP/1.1 response: 60 ==>> Peer certificate cannot be authenticated with given CA certificates
I know that the cert is not right official because It is self signed and only used internal. How can I stop this error from occuring for internal sites/certs ??
I run the presence detection with unifi cloudkey script and that was running fine for long time.
Since a few git pulls ago I get errors in the log (and I get mails as well when an error occurs) so I get regular mails now.
The error is : dzVents: Error: (2.4.26) HTTP/1.1 response: 60 ==>> Peer certificate cannot be authenticated with given CA certificates
I know that the cert is not right official because It is self signed and only used internal. How can I stop this error from occuring for internal sites/certs ??
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: question about error
@mcmikev
Can you please share the script ?
What OS are you on ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 146
- Joined: Tuesday 26 May 2015 8:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: right here
- Contact:
Re: question about error
rpi3 with stretch
anonymized script
anonymized script
Code: Select all
return {
on = {
timer = { 'every 5 minutes' },
httpResponses = { 'loggedin' , 'data' }
},
execute = function(domoticz, item)
if (item.isTimer) then
domoticz.openURL({
url = 'https://192.168.x.x:8443/api/login', --Change IP and Port to your Unifi Controller settings
method = 'POST',
postData = { ['password'] = 'xxxxxx' , ['username'] = 'xxxxxxx' }, --Change YourPassword en YourUsername to your password en username for Unifi Controller
callback = 'loggedin'
})
end
if (item.isHTTPResponse and item.ok) then
if (item.trigger == 'loggedin') then
domoticz.openURL({
url = 'https://192.168.x.x:8443/api/s/default/stat/sta', --Change IP and Port to your Unifi Controller settings
method = 'GET',
callback = 'data'
})
else
-- iPhone,
local Mac = {'d4:xx:xx:xx:xx:0a'} --Change to mac addresses of devices you want to monitor
local DzIndx = {95,536,694,695} --Change to Domiticz Idx, the position in DxIndx has to be the same as the mac adress for that device in Mac (previous line)
for i,y in ipairs(Mac)
do
home = string.find( item.data , Mac[i])
if (home == nil) then
domoticz.devices(DzIndx[i]).switchOff().checkFirst()
else
domoticz.devices(DzIndx[i]).switchOn().checkFirst()
end
end
end
end
end
}
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: question about error
If you change line 15 from
Code: Select all
if (item.isHTTPResponse and item.ok) then
Code: Select all
if (item.isHTTPResponse and ( item.ok or item.statusCode == 60 ) ) then
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 146
- Joined: Tuesday 26 May 2015 8:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: right here
- Contact:
Re: question about error
Hi Waaren,
In my file on line 23 there is this : self.ok = false
Is that the only line I need to comment out? Getting a bit frustrated with all the errors constantly LOL
In my file on line 23 there is this : self.ok = false
Is that the only line I need to comment out? Getting a bit frustrated with all the errors constantly LOL
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: question about error
Yes. Just try it and if it works, you will have to repeat that edit every domoticz update.mcmikev wrote:Hi Waaren,
In my file on line 23 there is this : self.ok = false
Is that the only line I need to comment out? Getting a bit frustrated with all the errors constantly LOL
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 146
- Joined: Tuesday 26 May 2015 8:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: right here
- Contact:
Re: question about error
Remarked line 23 (placed - - before it, without the spaces between) but stil the same error.
Any other ideas?
Any other ideas?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: question about error
Yes, change line 20-23 (now)
Code: Select all
if self.statusCode >= 200 and self.statusCode <= 299 then
self.ok = true
else
self.ok = false
if ( not testResponse ) and ( utils.log(self.protocol .. " response: " .. self.statusCode .. " ==>> " .. self.statusText ,utils.LOG_ERROR) ) then end
end
Code: Select all
if self.statusCode >= 200 and self.statusCode <= 299 then
self.ok = true
else
self.ok = false
if self.statusCode ~= 60 then
if ( not testResponse ) and ( utils.log(self.protocol .. " response: " .. self.statusCode .. " ==>> " .. self.statusText ,utils.LOG_ERROR) ) then end
end
end
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 146
- Joined: Tuesday 26 May 2015 8:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: right here
- Contact:
Re: question about error
just made the changes. Let's see
Thanks
Thanks
-
- Posts: 146
- Joined: Tuesday 26 May 2015 8:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: right here
- Contact:
Re: question about error [Solved]
Yes the error is gone with that edit ! thanks Waaren
Who is online
Users browsing this forum: No registered users and 1 guest