Hotspot enable/disable using Node-red

i'm trying to to connect and disconnect to a hotspot network using node-red, when i uses netstat command in command line it simply disables my wi-fi...
i want my node-red to allow me to connect/disconnect to hotspot using switch.

First you need to work out the command line commands that will do what you want. Do you know which commands you need? That is nothing to do with node-red of course. Once you have done that the problem will probably be that the node-red user does not have the required permissions to run those commands so you need to look at how to give an individual user the ability to run those commands without sudo or at least without having to provide a password.

HI @Colin,
sorry for responding very late, i was occupied with other things, yes i have figured out all the command lines to that on the system , tried it worked with command prompt. i have linked it with node-red now, it is working but i'm getting the raw data also, debug:true, msg: successfully connected ideally it should only show connected or disconnected...

also right now my script is on the desktop and i have given that path to my node-red, but if i move my js file to some other location then it doesn't execute...

Sorry I have no idea where you are seeing this raw data or where connected is being seen.

Also I don't know what js file you are talking about nor how you are executing it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.