Page 1 of 1

Device script not trigered?

Posted: Monday 25 March 2019 21:45
by devros
Hi all, im quite lost with simple problem
cant use this script on one device but works on another, striped down to just log

Code: Select all

return {
	active = true, -- set to false to disable this script
	on = {
		devices = {
			'Sklep/close'
		},
	},
	execute = function(domoticz, switch)
	domoticz.log('test', domoticz.LOG_FORCE)
	end
}
on normal switch it works
2019-03-25 21:36:07.270 Status: User: Admin initiated a switch command (665/yamaha/Off)
2019-03-25 21:36:07.607 Status: dzVents: Info: Handling events for: "yamaha", value: "Off"
2019-03-25 21:36:07.607 Status: dzVents: Info: ------ Start external script: sensors_door.lua: Device: "yamaha (yamaha2)", Index: 665
2019-03-25 21:36:07.607 Status: dzVents: !Info: test
2019-03-25 21:36:07.607 Status: dzVents: Info: ------ Finished sensors_door.lua

but on my Rflink switch its not working (Rflink switch EV1527 subtype)
2019-03-25 21:41:28.587 Status: User: Admin initiated a switch command (753/Sklep/close/Off)
2019-03-25 21:41:28.589 Status: RFLink Sending: 10;EV1527;033470;e;OFF;
2019-03-25 21:41:29.059 (RFLINK) Light/Switch (Sklep/close)
2019-03-25 21:41:30.473 Status: User: Admin initiated a switch command (753/Sklep/close/On)
2019-03-25 21:41:30.474 Status: RFLink Sending: 10;EV1527;033470;e;ON;

any idea what could be probem?

Re: Device script not trigered?

Posted: Tuesday 26 March 2019 0:21
by waaren
devros wrote: Monday 25 March 2019 21:45 Hi all, im quite lost with simple problem
cant use this script on one device but works on another, striped down to just log

Code: Select all

return {
	active = true, -- set to false to disable this script
	on = {
		devices = {
			'Sklep/close'
		},
	},
	execute = function(domoticz, switch)
	domoticz.log('test', domoticz.LOG_FORCE)
	end
}
Spoiler: show
on normal switch it works
2019-03-25 21:36:07.270 Status: User: Admin initiated a switch command (665/yamaha/Off)
2019-03-25 21:36:07.607 Status: dzVents: Info: Handling events for: "yamaha", value: "Off"
2019-03-25 21:36:07.607 Status: dzVents: Info: ------ Start external script: sensors_door.lua: Device: "yamaha (yamaha2)", Index: 665
2019-03-25 21:36:07.607 Status: dzVents: !Info: test
2019-03-25 21:36:07.607 Status: dzVents: Info: ------ Finished sensors_door.lua

but on my Rflink switch its not working (Rflink switch EV1527 subtype)
2019-03-25 21:41:28.587 Status: User: Admin initiated a switch command (753/Sklep/close/Off)
2019-03-25 21:41:28.589 Status: RFLink Sending: 10;EV1527;033470;e;OFF;
2019-03-25 21:41:29.059 (RFLINK) Light/Switch (Sklep/close)
2019-03-25 21:41:30.473 Status: User: Admin initiated a switch command (753/Sklep/close/On)
2019-03-25 21:41:30.474 Status: RFLink Sending: 10;EV1527;033470;e;ON;
any idea what could be probem?
Cannot reproduce this on V4.10570 (but I notice that the actual Rflink command that your setup is sending contains ;e; where mine sends a ;1;.
My Rflink Gateway USB hardware has Version: 48.4
dzVents script

Code: Select all

return {
    on =    { devices   = { 'Switch5/close'}},
            
        logging =   {       level   =   domoticz.LOG_DEBUG,                                
                        marker  =   "/ test" },                                           
    
    execute = function(domoticz, item, info)
        domoticz.log("Hi " ..item.name ,domoticz.LOG_DEBUG)
    end
}
Blockly
Blockly
Blockly
b.png (41.07 KiB) Viewed 650 times
log
Spoiler: show
2019-03-25 23:59:35.672 Status: RFLink Sending: 10;EV1527;014748;1;OFF;
2019-03-25 23:59:36.140 (RFLink) Light/Switch (Switch5/close)
2019-03-25 23:59:36.389 Status: dzVents: Info: Handling events for: "Switch5/close", value: "Off"
2019-03-25 23:59:36.389 Status: dzVents: Info: / test: ------ Start external script: ff.lua: Device: "Switch5/close (RFLink)", Index: 1784
2019-03-25 23:59:36.390 Status: dzVents: Debug: / test: Hi Switch5/close
2019-03-25 23:59:36.396 Status: dzVents: Info: / test: ------ Finished ff.lua
2019-03-25 23:59:36.423 Status: Off

2019-03-25 23:59:37.577 Status: User: Admin initiated a switch command (1784/Switch5/close/On)
2019-03-25 23:59:37.579 Status: RFLink Sending: 10;EV1527;014748;1;ON;
2019-03-25 23:59:38.064 (RFLink) Light/Switch (Switch5/close)
2019-03-25 23:59:38.303 Status: dzVents: Info: Handling events for: "Switch5/close", value: "On"
2019-03-25 23:59:38.304 Status: dzVents: Info: / test: ------ Start external script: ff.lua: Device: "Switch5/close (RFLink)", Index: 1784
2019-03-25 23:59:38.306 Status: dzVents: Debug: / test: Hi Switch5/close
2019-03-25 23:59:38.307 Status: dzVents: Info: / test: ------ Finished ff.lua
2019-03-25 23:59:38.331 Status: On

Re: Device script not trigered?

Posted: Tuesday 26 March 2019 0:36
by devros
Thanks finally found what was wrong on my side
I forgot to create devices from idx device pages :-o. Yay that stupid mistake :-)

Interesting that its not visible from log...