domoticz.notify double message in Telegram

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

Moderator: leecollings

Post Reply
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

domoticz.notify double message in Telegram

Post by woody4165 »

Hi

in a script where I use the domoticz.notify command I see that message sent to Telegram (defined in the Domoticz->Settings) appears twice.
I have also defined Pushbullet as notification system and I get only one message there.

Anyone with this issue?
Any suggestion?

Thanks

This is my simple code:

Code: Select all

return {

	active = true, -- set to false to disable this script

	on = {

		timer = {
			'at sunset'
		}
	},

	execute = function(domoticz)
        if domoticz.devices('Living Lamp').state == 'Off' then 
    		if domoticz.devices('IsAtHome').state == 'On' then
                	domoticz.devices('Living Lamp').switchOn().checkFirst()
		    	domoticz.notify('Light info', 'Qualcuno è a casa ed è sera. Accendo la piantana!', domoticz.PRIORITY_NORMAL)
                end
        end
end
}
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: domoticz.notify double message in Telegram

Post by dannybloe »

I think that's a domoticz issue. You can check if indeed only one command is sent back to Domoticz (turn debug mode on and see what the commandArray is after the scripts are completed).
I must say that I have created a couple of global_data.helpers function that do the notification instead of Domoticz (only works for GET requests). That gives me a lot more control over the notification. But that as a side-node.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: domoticz.notify double message in Telegram

Post by woody4165 »

Thanks @dannybloe

Is it correct this to activate debug in domoticz?

I've added

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS -loglevel 3 -debug -verbose -log /home/linaro/domoticz/domoticz.log"
in domoticz.sh and made

Code: Select all

sudo service domoticz.sh stop
sudo service domoticz.sh start
But I don't see nothing more in the Log monitor.
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: domoticz.notify double message in Telegram

Post by dannybloe »

No. It’s the log level setting in Domoticz gui. Settings, others, dzVents.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: domoticz.notify double message in Telegram

Post by woody4165 »

Ok, get it, thanks

This is the only debug message that should relate to

Code: Select all

2017-10-27 17:26:03.612 dzVents: Debug: [3] = SendNotification: Light info#Qualcuno è a casa ed è sera. Accendo la piantana!#0#pushover##
Now that you suggested me that could be a domoticz issue, I tried to define a notification directly in a device and leave the two notification systems I have in the script (but also if I define only Telegram) and I get the notification twice.

Then, I will open a bug in domoticz thread.

Thanks again
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: domoticz.notify double message in Telegram

Post by dannybloe »

Good luck.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest