HowTo: Node Red – Display W-Lan networks in the area

I have to admit that I haven't found a real use for this feature yet, but I'm sure someone will find some use for it.

This article explains how you can use NodeRed and a Raspberry Pi to display the currently available WiFi in your area.


Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/

Affiliate links/advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂 


Requirements

Helpful articles:
To be able to use this configuration, NodeRed should of course already be installed.
How to prepare a RaspberryPi and then install NodeRed on it is described in the following articles.

The following articles describe what has to be done to prepare the RaspberryPi so far:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH

NodeRed – Installing NodeRed on the RaspberryPi
NodeRed – Install new nodes

Required material:
-no-

Required material:

In the following list you will find all the parts you need to implement this article.


Log into the NodeRed configuration interface

Before you can edit your NodeRed configuration, you must - if activated - first log into the NodeRed configuration interface.

View of the login dialog. Here you have to enter the login data that you specified during the configuration of the login. You can find information about this in the article NodeRed - set up user login.

Install the required node

Damit Ihr diese aktuelle Liste der verfügbaren W-Lan’s abrufen könnt müsst Ihr die Node „node-red-contrib-wifiscan“ installieren. Wie Ihr Nodes installiert ist im Artikel NodeRed – Install new nodes explained.


Import node code

In diesem Beispiel wird auf das betätigen einer Inject-Node die aktuelle Liste abgerufen und formatiert über eine Debug-Node ausgegeben. Natürlich könnt Ihr hier auch andere Node nutzen um den „W-Lan-Listen-abruf“ zu starten oder auszugeben.

To import this example into your NodeRed installation, you need to import the node code below.

This is what the output of the example looks like in the NodeRed Editor.
Node configuration view.

Node code:

[{"id":"a7fc9bb7.ffa278","type":"wifiscan","z":"8c9f8f17.13eb78","name":"","x":470,"y":720," wires":[["1166b120.2b169f"]]},{"id":"7aaa6018.cd772","type":"inject","z":"8c9f8f17.13eb78","name":"start scan ","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1, "x":300,"y":720,"wires":[["a7fc9bb7.ffa278"]]},{"id":"1166b120.2b169f","type":"function","z": "8c9f8f17.13eb78","name":"build list","func":"var temp=""; for (var i = 0; i <msg.payload.length; i++) 
    {
        temp=temp+"SSID: "+msg.payload[i].ssid;
        temp=temp+", Strength: "+msg.payload[i].signal_level+"dBm";
        temp=temp+", Mac: "+msg.payload[i].mac;
        temp=temp+", Channel: "+msg.payload[i].channel;
        temp=temp+"\n";
    }

msg.payload=temp;
return msg;
","outputs":1,"noerr":0,"x":640,"y":720,"wires":[["392c3b92.f72184"]]},{"id":"392c3b92.f72184","type":"debug","z":"8c9f8f17.13eb78","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":790,"y":720,"wires":[]}]

Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.