Step-8:Final step to check the proxychain :
2.N-Maps scan
- Find the detail information for network connected devices.
- Find the live ports and open ports in device/system.
- used to protect business and personal websites.
I am Krishna Vinoth. Over all 10+ years of experience in automotive embedded developing and testing.
Control DIY smart IoT devices from your Raspberry Pi by installing an MQTT server and Node-RED.
Messaging Queuing Telemetry Protocol, or MQTT, is a lightweight messaging protocol designed for low bandwidth devices and environments. It’s a fast, easy-to-deploy, and energy-efficient solution to connect and exchange information between multiple IoT devices. It requires an MQTT broker/server and the topic to which messages are published and subscribed by the devices or users to send or receive the information.
In this guide, we will deploy the MQTT broker and Node-RED tool on Raspberry Pi to connect MQTT-enabled DIY smart IoT devices and use them for home automation.
To build and deploy an MQTT server with Node-RED, you will need the following:
You will need the 64-bit Lite version of Raspberry Pi OS. In the Raspberry Pi Imager tool on another computer, click Choose OS > Raspberry Pi OS (Other), then select Raspberry Pi OS Lite (64-bit). In addition, you’ll want to use Imager's advanced settings to enable SSH (we used pi and raspberry as the username and password for this guide) and configure the Wi-Fi connection. For more details, check out our guide on how to install an operating system on a Raspberry Pi. After writing the OS to the card, eject it and insert it into your Raspberry Pi.
You can connect to your Raspberry Pi over SSH using PuTTY on Windows or Terminal on macOS and Linux. However, you should know the IP of the Raspberry Pi to connect over SSH. To find out, you can open your wireless router’s DHCP settings or use the Fing app on your smartphone.
Enter the IP address in PuTTY and click Connect. Type your username and password to log in.
On Linux or macOS terminal, type YourPiUsername@IPAddress and then type the password to log in. Once connected via SSH, run the following command to update the package list and upgrade packages.
sudo apt update && sudo apt upgrade –y
To install and enable the MQTT broker (Mosquitto), take the following steps.
sudo apt install mosquitto mosquitto-clients -y
sudo systemctl enable mosquitto.service
mosquitto -v
sudo mosquitto_passwd -c /etc/mosquitto/passwd ravi
Here ravi is the username (you can use whatever you like). Enter the password when prompted. Note down this username and password for later use.sudo nano /etc/mosquitto.conf
Paste the following code in the nano editor.per_listener_settings true
pid_file /run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
allow_anonymous false
listener 1883
password_file /etc/mosquitto/passwd
sudo systemctl restart mosquitto
sudo systemctl status mosquitto
To test whether the MQTT broker is working or not, install MQTTLens or a similar MQTT app in Chrome or any other web browser and launch it. Enter the IP address of the Raspberry Pi and the MQTT username/password. Click Create Connection.
Enter any topic in the Subscribe field and the same topic in the Publish field. Type "Hi" or anything in the message field and click Publish.
If you see the message under the subscriptions, the MQTT broker is working fine.
With Node-RED, you can publish messages or send and receive payloads to or from your smart devices. This payload can be used to trigger smart devices to switch on/off or receive data (such as temperature) from a sensor. You can use your web browser to create such flows in Node-RED and control your smart devices.
To install Node-RED, execute the following command in the Terminal window.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
This will download and install the Node-RED on your Raspberry Pi. It may take a while to complete. Once Node-RED is installed, you need to create a Node-RED settings file by running the following command.
node-red admin init
Then follow these steps:
Once this is done, restart Node-RED.
node-red restart
You can now visit Your-Raspberry-Pi-IP:1880 in a web browser to open and log in to the Node-RED admin panel.
You can now create flows in Node-RED. Below is an example of a Node-RED flow we use to run our WS2812B 8x32 matrix display that shows various sensor information installed in our home in real-time.
To get started, you can also build a DIY smart clock using MAX7219 dot matrix, and connect it to your MQTT server to display text or messages on it.
You can now create flows to control or monitor your MQTT-enabled smart home devices. You can also build DIY Tasmota smart switches or Arduino-based smart sensors, and other smart devices with MQTT control and use them with this MQTT and Node-RED server. You can create flows for home automation based on events, time, or payload received from your smartphone MQTT client.
On your Android smartphone, you can install MQTT Dash to connect to your MQTT broker and send or receive payloads to or from various topics that your smart devices subscribe or publish to.
Contents 1 Overview 2 Create a Project 3 Configure the Project Environment 4 Create a Test Unit 5 Create a Test Table 6 ...