Recommendation for remote or wired digital I/O to combine with NR running on Raspberry Pi

I'm renovating a house and since it's quite big, I was thinking of automating things like lights, heating, and so on.

I have a small Raspbery Pi 4 that I could use as dedicated NR server, but the I/O is clearly insufficient, and I might need a way of linking additional sensors, thermostats, and so on. It is a big house, so it might be useful if I could set up some remote I/O running over the internal WiFi or ethernet.

At work, I am using NR from a dedicated server and get the information not directly from the sensors themselves, but from machine PLCs or PCs, so I don't really have anything to compare with.

Any recommendations will be welcome :slight_smile:

Run Mosquitto on your Raspberry Pi 4.

Assuming that your wifi covers the whole house, a common arrangement is to have sensors connected to cheap, wifi enabled ESP8266 or ESP32 boards and communicating with Node-red by MQTT.
MQTT works over ethernet too, and even Lorawan if you have a sensor at the bottom of the garden!

4 Likes

What I have in my house (and I believe a number of people on the forum have similar setups) is a Raspberry Pi running headless that acts as the server for my house. I then have WiFi-enabled microcontrollers (e.g. Wemos D1 Minis) fitted with various sensors or relays or LEDs around the house. All of the communication is via MQTT. The Raspberry Pi runs Node-RED and displays and controls things via the dashboard.

EDIT: Pretty much the same response as what @jbudd has posted.

3 Likes

I have well over 100 remove devices communicating with NR via MQTT. There is a discord forum called digiblur. There is tons of info there to help get you started plus a lot of great smart people. What you are wanting to do has been done many, many times. The other thing to look up is Tasmota.

Good luck!!

1 Like

Thanks for the replies. I'll take a look. I have some Echo Dot devices I want to integrate into the setup, and it looks they play nice with NR, so... :slight_smile:

I know it’s an older thread but new to the forum so missed this discussion. Sounds like you might have an even better solution at work with getting the sensor data from the PLCs. Why not use some experience from that and apply it at home? My PLC I/O module projects have been rock solid with hardwired Ethernet communication and NR. Unfortunately, I can’t say the same for all the WIFI “smart home” devices.

Well... At work I do have the proper PLC software licenses (VIA portal v13), which I do not have at home. Their programs are already done for scanning the sensors and load the info on the tag list, that can be accessed later with the S7 nodes in NR. I have seen raspberry Pi-based Soft PLCs that can be programmed directly in Node-Red, and I am also familiar with Siemens and Mitsubishi PLCs, but the cost of any PLC often runs in the hundreds of euros.

I already have a RPi with a passive cooling metal case, so that's what I wanted to use.

1 Like

I'd like to introduce a netgate hardware to your appication.This netGate named PN6400 can communicate with your sensors via 485/zigbee/WiFi/232 uart and so on.You can control the natGate by Node-red ,and may upload data to cloud such as thingscloud.
The description of netGate is herePN6400

@magicfire, if you have a commercial interest in this product please declare that when you recommend it.

Thanks for your notification.
For sure, I am a Node-RED user/code contributor as well as a netGate company runner.Our company named chvda , locates in Beijing, China, and focus on embedded system R&D.
I will obey the forum rules, especially when talking about our products.
By the way, if I need to do some commercial activities,is there any dos and don'ts I should pay special attention to?

From your post, I see that you didn't really read my question.

I already have a Raspberry Pi to run NR. My problem was the physical I/O and how to connect it. @jbudd 's reply was more in line with what I needed, but I haven't been able to try yet (and that's why I didn't mark it a solution, for now).

As @jbudd mentioned, MQTT is an interesting option.

I use MQTT for communication with Wifi- and Zigbee-components, and in my opinion Zigbee is the more stable option.

If you are interested in adding Zigbee components from vendors like Ikea and Philips (Philips Hue) in the same network, you might want to take a look at Zigbee2MQTT. With this open source software, you can add a lot of MQTT-enabled components, that communicate via Zigbee.

An extensive list of supported devices can be found here.

Integration with Node-Red automations is very easy.

PN6400 offers 4 DI + 4 DO +4 AI +2 AO +Modbus +232 uart +ZigBee(based on Z2M)
I still suppose it may link pleny of sensors for you.
Nodes are ready to use as below, and the help documents are in English:

But I don't need a PC, just remote I/O that can connect to the Pi.

Your basic decision is do you want to go hardwired (as per your experience with PLC at work) or ar eyou happy that wireless will give you good enough results

Once you make that decision you can then decide on what connectivity technoogy - in the case of wireless you have wifi, 433mhz, thread/matter (not really an option just yet), zigbee or zwave and bluetooth

In my case i have gone with Wifi and have deployed small cheap wifi routers throughout my house and yard for a dedicated IOT network - each of these come back to a centralised location where my swithces and NR run.

I can then mix and match sensors - for instance i have Bluetooth enabled Temp and Humidity sensors that talk to local ESP32 boards and then relay that info through WIFI to the nearest router and then on to NR with MQTT.

Craig

2 Likes

I would avoid wiring direct to your Pi as its all too easy to damage GPIO pins.
ESPs are small cheap and very flexible, allowing you to build custom devices for most IOT needs.
As you mentioned Alexa, an ESP flashed with Tasmota or similar supports direct control by Alexa, for basic on off colour brightness etc via Echo's built in Philips Hue capabilities. So you can just discover it and control without even needing to code anything in NR.

2 Likes

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