Use RPi to forward wireless signals to OH installation on a Synology NAS?

Right now, I am using openHAB on a raspberry pi 3b (openhabian) and everything works fine. However, I am thinking about moving the installation to my Synology NAS. The “problem” is that my NAS is located in a server rack in the basement, where the wireless signals of my Z-Wave stick, my 433Mhz cul, and my EnOceanPi (sits on the GPIOs of the RPi) definitely won’t reach the whole of my house.

I am wondering, if it is possible at all to use the RPi to simply forward all wireless signals to the OH installation on the NAS? What software would I need on the RPi? Is anybody out there recognizing this scenario?

It’s just a thought experiment at this stage. However, I am curious.

No you cannot forward all wireless signals, the RF systems won’t allow for this. You might find a hacky solution to receive them on the Pi and forward the serial communication over IP, but you would need to have both boxes running, so why ?
Are you bored?

1 Like

Think they all are serial devices. /dev/ttySomething.

Can’t give you any specific examples but google ser2net and socat. I have a RPi2 with ser2net serving its gpio serial port (/dev/ttyAMA0) and one usb-rs485 converter (/dev/ttyUSB0) over tcp/ip. This works like a charm. And if I remember correctly with socat you can link those ports between server and client so that the client sees them as local ports.

Googled a bit a found this link in one of topics:

Searched google with “linux serial port over ethernet”.

Hehe, not at all. I am just curious to know if this setup would theoretically be possible. Two reasons to do it MIGHT be to save yourself against an SD card failure and having more comfortable backup solutions at your disposal when the system and all its configuration files are stored on a NAS.

As I wrote, you would always need to have a ‘gateway’ box in place of your current server. And that gateway box would suffer from the same type of problems that your server is currently suffering from, so this idea won’t get you anywhere.
I suspected SD issues to be the true reason behind your question (heck, why don’t people just tell what they think ?). There’s way better solutions to solve these problems.
On SD failures, check out this.
We’re still discussing how to integrate that into openHABian, but you can manually do these steps today.
On backup, as you already run openHABian, setup Amanda. It’s a decent backup solution, you’ll find it in the openHABian setup menu. You can have it store to your NAS, and it also allows for creation of a SD card clone.

what you could do, is setup the raspberry Pi and use e.g. the MQTT Event bus to Forward all items (not the RF/zwave/… signals) to your Synlogy, but then again? Why?
Other ways:

  1. use an external HD for your Pi to boot from (like Markus pointed out - your RPI3 can natively boot from USB)
  2. backup your Pi (at least the config) to your NAS regularly, in case of an corrupted SD, have a spare one handy, restore on that and start your OH2 again
  3. try to relay all incoming messages (Serial is the easiest as Miika pointed out - and I don’t think RF/Zwave/433/… can be easily relayed?) to your Synology, but then again: the Proxy also runs on SD?

I would put my money on 1. or use some backup script for 2.
If you managed 2. please come back here as I think it will affect many OH2-users on how to backup properly and I don’t think we have a “backup a running OH2 to a SMB/Synology” Tutorial…?

Here’s the ‘official’ ‘tutorial’ how to backup if you use openHABian/Amanda with an explicit storage-on-NAS description.
You can install Amanda or any other solution on your own, but it’s pretty tough to do and document that in a generic fashion.
Remember openHABian is also available as a ‘script-only’ version that you can use on non- Pi/Raspian HW/OS combos, too.

1 Like

Thanks, I did know Amanda, but was under the impression it uses cloudbased backup. There is some discussion in the forum on how to use github as a means to “backup” your configuration. and then theres rsync… :wink:

I do something similar. I have RPi 3’s on each floor that run OH2 (with EnOcean, in my case). The RPi’s talk via MQTT over WiFi to a central OH2 server.

MQTT has a mode where it interfaces to the OH2 event bus, and I use that for communication between the OH2 instances.

Another option I’ve thought about is to use Karaf Cellar for handling the OH2 instances, but I haven’t got round to that yet. Not sure that it would make the communication easier than the MQTT solution.