Does anyone have an example of a Mikrotik router

Hi,
I wonder if anyone out there can give me a syntax example of how to use the raw input to the node-red-contrib-mikrotik

For example how would I do the equivalent of
/ip firewall filter enable numbers=1

Have looked everywhere and found nothing so any help would be appreciated.

Thanks

Tom

Looking at the github page:

This is an alfa verion. Available actions: log, resources, wifi, connections, reboot, raw.

1 Like

Hi,

In the documentation it seems to suggest that "Raw" will do it for me.... Am I missing something ?

  • Raw: uses msg.payload as command. To pass command with parametrs use JSON object with "command" property as msg.payload . For example: {"command":["/system/script/run","=.id=myscript"]} . This example runs script myscript

So I thought something like this wold work, but I can't get it to do so.

msg.payload='{"command":["/ip/firewall/filter/disable","numbers=1"]}.';

Regards

Tom

For anyone's future reference it's the following using the raw input

msg.payload=['/ip/firewall/filter/disable','=numbers=*1'];

Hi, Would you mind posting a fully flow of how you have implemented this please as I have been trying unsuccessfully to implement this and I cannot seem to get the format correct ?

Thanks.

I managed to figure it out, for those searching for help like me, I put the details that tashbee provided into a Node Red Function block as follows.

msg.payload=['/ip/firewall/filter/disable','=.id=*Test'];
return msg;

Thanks tashbee