I have been trying for hours to write script to dynamically vary the flash rate of a silly vLED on the desktop... always worked for the first flash, then nada. Skipping that for now...
Then I discovered the Trigger node... should do the trick very nicely.
send it msg.reset
it resets
send it msg.delay
(with payload as the delay settings it will use) it changes it's frequency
But it doesn't respond the way the directions say it should. It simply keeps on with the preset settings (in this case 250ms)
What am I missing??
[{"id":"af1708dc.4e6ce8","type":"tab","label":"Flasher","disabled":false,"info":""},{"id":"1cd530d8.0510bf","type":"ui_led","z":"af1708dc.4e6ce8","order":2,"group":"85815d64.6c718","width":"2","height":"2","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#0000ff","value":"true","valueType":"bool"},{"color":"#000000","value":"false","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":610,"y":300,"wires":[]},{"id":"efde91d9.e81c1","type":"toggle","z":"af1708dc.4e6ce8","name":"","onOffTopic":"","onValue":"true","onType":"bool","offValue":"false","offType":"bool","toggleTopic":"","toggleValue":"togglenow","toggleType":"str","passOnOff":"ifChanged","x":470,"y":300,"wires":[["1cd530d8.0510bf"]]},{"id":"95c7325.18127d","type":"ui_slider","z":"af1708dc.4e6ce8","name":"Frequency","label":"slider","tooltip":"","group":"85815d64.6c718","order":0,"width":0,"height":0,"passthru":true,"outs":"end","topic":"delay","topicType":"msg","min":"32","max":"2000","step":1,"x":150,"y":320,"wires":[["c6b10cae.c126a","40d1b12f.76016"]]},{"id":"40d1b12f.76016","type":"debug","z":"af1708dc.4e6ce8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":330,"y":360,"wires":[]},{"id":"c6b10cae.c126a","type":"trigger","z":"af1708dc.4e6ce8","name":"Trigger","op1":"togglenow","op2":"false","op1type":"str","op2type":"bool","duration":"-500","extend":false,"overrideDelay":true,"units":"ms","reset":"reset","bytopic":"all","topic":"topic","outputs":1,"x":320,"y":300,"wires":[["efde91d9.e81c1"]]},{"id":"bafe11a7.88056","type":"ui_button","z":"af1708dc.4e6ce8","name":"","group":"85815d64.6c718","order":2,"width":0,"height":0,"passthru":false,"label":"Reset","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"reset","topicType":"msg","x":150,"y":280,"wires":[["c6b10cae.c126a"]]},{"id":"85815d64.6c718","type":"ui_group","name":"","tab":"bb7236c.d277cc8","order":2,"disp":true,"width":"6","collapse":false},{"id":"bb7236c.d277cc8","type":"ui_tab","name":"Flashing LED","icon":"dashboard","disabled":false,"hidden":false}]