Problem with dzvents (maybe https problem ? Or lack of functionality ?)

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Problem with dzvents (maybe https problem ? Or lack of functionality ?)

Post 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 ?
Last edited by candrea77 on Friday 18 August 2017 23:40, edited 1 time in total.
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: Problem with dzvents (maybe https problem ?)

Post 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.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: Problem with dzvents (maybe https problem ?)

Post 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) ?
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
SweetPants

Re: Problem with dzvents (maybe https problem ?)

Post 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.
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: Problem with dzvents (maybe https problem ?)

Post 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 ?
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: Problem with dzvents (maybe https problem ?)

Post by elmortero »

Info about Local Networks without authentication: Application settings
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: Problem with dzvents (Maybe https problem ? Or lack of functionality ?)

Post 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.
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
SweetPants

Re: Problem with dzvents (maybe https problem ?)

Post 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
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: Problem with dzvents (maybe https problem ?)

Post 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



.
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
Post Reply

Who is online

Users browsing this forum: madpatrick and 1 guest