Page 1 of 1

notify: http error

Posted: Thursday 16 January 2025 16:28
by lupo2a
I have domoticz Version: 2023.2
In the settings session (notifications) I have configured an HTTP Custom HTTP/Action that works (with the test button)

I'm using the following event attached to a switch

Code: Select all

return {
	on = {
		devices = {
			'Test'
		}

	},
	data = {},
	logging = {},
	execute = function(domoticz, device)
	    domoticz.log('test - start')
        domoticz.notify('Test', "testo fisso", domoticz.PRIORITY_NORMAL,nil,nil,domoticz.NSS_HTTP,0)
        domoticz.log('test - end')
    
    end    
}
in the log what I got is:
2025-01-16 16:26:27.999 Status: User: admin (IP: 192.168.1.133) initiated a switch command (67/Test/Off)
2025-01-16 16:26:28.046 Status: dzVents: Info: Handling events for: "Test", value: "Off"
2025-01-16 16:26:28.046 Status: dzVents: Info: ------ Start internal script: Test: Device: "Test (Virtual)", Index: 67
2025-01-16 16:26:28.046 Status: dzVents: Info: test - start
2025-01-16 16:26:28.046 Status: dzVents: Info: test - end
2025-01-16 16:26:28.046 Status: dzVents: Info: ------ Finished Test
2025-01-16 16:26:28.047 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2025-01-16 16:26:28.109 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2025-01-16 16:26:28.115 Status: Notification: Test
2025-01-16 16:26:31.176 Notification sent (http) => Failed
2025-01-16 16:26:31.176 Error: HTTP:

How can I solv this?

Re: notify: http error

Posted: Thursday 16 January 2025 16:47
by habahabahaba
Try

Code: Select all

domoticz.notify('Test', 'testo fisso', domoticz.PRIORITY_NORMAL)
And in notifications of the switch turn ON only http