Page 1 of 1
Problem with dzvents (maybe https problem ? Or lack of functionality ?)
Posted: Friday 18 August 2017 15:42
by candrea77
Hello,
I'm trying to test the dvvents feature , but i'm having trouble with a simple script :
Code: Select all
return {
active = true, -- set to false to disable this script
on = {
devices = {
'AutomaticAlarm', -- device name
},
},
execute = function(domoticz, device)
print(device.name)
if (device.state == 'On') then
domoticz.variables('AutomaticAlarmInsert').set(1)
else
domoticz.variables('AutomaticAlarmInsert').set(0)
end
commandArray = {}
end
}
When this script is executed, I get this error in log :
Please note that my domoticz setup run only with https enabled (http is disable due to security reason)
Can someone tell me if this error is due to the http disabled ?
If http is the problem, there is a way to have dzvents working with https ?
Re: Problem with dzvents (maybe https problem ?)
Posted: Friday 18 August 2017 16:29
by dannybloe
You have to enable http but only for internal connections. That's why you have to enable 127.0.0.1 which is not accessible from the outside. See the docs about how to get started with dzVents.
Re: Problem with dzvents (maybe https problem ?)
Posted: Friday 18 August 2017 17:15
by candrea77
Hello,
is there a way to start http and bind it only to lo (127.0.0.1) and not to all interfaces (0.0.0.0) ?
Re: Problem with dzvents (maybe https problem ?)
Posted: Friday 18 August 2017 17:32
by SweetPants
candrea77 wrote: ↑Friday 18 August 2017 17:15
is there a way to start http and bind it only to lo (127.0.0.1) and not to all interfaces (0.0.0.0) ?
As far as I know, you can't. Just enable HTTP and allow also connections from 127.0.0.1.
Re: Problem with dzvents (maybe https problem ?)
Posted: Friday 18 August 2017 18:30
by candrea77
Sorry for boring you again , maybe it is only a misundesrting....
I not able to find any documentation about "enable HTTP and only allow connections from 127.0.0.1." ... How can I do that whitout using iptables ?
I know that I can setup domoticz to don't require password for certain subnets (but this is not the exact setting).
I don't find any settings to permit http login only from 127.0.0.1 .... can you guide me through ?
Re: Problem with dzvents (maybe https problem ?)
Posted: Friday 18 August 2017 22:38
by elmortero
Info about Local Networks without authentication:
Application settings
Re: Problem with dzvents (Maybe https problem ? Or lack of functionality ?)
Posted: Friday 18 August 2017 23:40
by candrea77
By my point of view dzVents have a lack of functionality due to the fact that domoticz permit the use of the system without http enable and dzVents does not support it.
But , if there is a way to enable http only for lo (and bind only to it) , this cannot be a problem.
elmortero wrote:Info about Local Networks without authentication
That's not what I mean ... this allow to login from lo without credential. I use this function also for any https check from 127.0.0.1 (like my monit check script or something else).
I want to know if there is a setting for this :
dannybloe wrote:You have to enable http but only for internal connections.
Otherwise, I need to leave http open and by my pov this is a lack of security .... any system that require login with username and password must be in https/ssl.
Re: Problem with dzvents (maybe https problem ?)
Posted: Saturday 19 August 2017 10:01
by SweetPants
candrea77 wrote: ↑Friday 18 August 2017 18:30I don't find any settings to permit http login only from 127.0.0.1 .... can you guide me through ?
127.0.0.1.png
You don't need a username/password for 127.0.0.1, you stay on the same system
Re: Problem with dzvents (maybe https problem ?)
Posted: Saturday 19 August 2017 15:27
by candrea77
SweetPants wrote:
You don't need a username/password for 127.0.0.1, you stay on the same system
Read my previous post in order to undesrtand my needings. This is not what I need and is not what I'm asking for .....
Thanks
.