alhafoudh / node-red-contrib-mikrotik2

Node-red node to work with Mikrotik WiFi router
ISC License
5 stars 1 forks source link

How insert cmd? #4

Closed Maurotb closed 3 years ago

Maurotb commented 4 years ago

I need to launch /ip firewall filter disable [find comment="209"];

{ "command":["/ip","=.firewall filter disable [find comment="209"]"]
}

but i receive

no such command. Where i'm wrong? Thanks

jiribaudys commented 3 years ago

expand my approach for testing is best Mikrotik console,

[{"id":"7200f1cc.badb","type":"debug","z":"ab9e12bf.20d63","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":140,"wires":[]},{"id":"1f9d84a5.0b90eb","type":"inject","z":"ab9e12bf.20d63","name":"","props":[{"p":"payload","v":"","vt":"str"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":130,"y":220,"wires":[["e1612a85.b35bc8"]]},{"id":"bc36a1a3.9b8d6","type":"mikrotik","z":"ab9e12bf.20d63","device":"3deb62bd.2d5d7e","name":"","action":"9","x":500,"y":320,"wires":[["7200f1cc.badb"]]},{"id":"e1612a85.b35bc8","type":"function","z":"ab9e12bf.20d63","name":"TestGenerator","func":"msg.payload = \"/ip/firewall/filter/set\\n=.id=*26\\n=disabled=false\";\nmsg.topic = \"scritpexecute\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":260,"wires":[["bc36a1a3.9b8d6","7200f1cc.badb"]]},{"id":"3deb62bd.2d5d7e","type":"mikrotik-device","z":"","host":"192.168.1.1","port":"8728","username":"admin","password":"password"}]