Posts: 5
Joined: Mon Jan 13, 2020 7:15 pm

Tunneling bluetooth device from a pi to another pi ?

Sat Apr 17, 2021 6:07 pm


I use Domoticz on a Raspberry Pi 4B with a "Raspbian GNU/Linux 10 (buster)" OS. This Pi is located into a 12U Server rack with a APC supply, a NAS, etc. on the 1st floor of my house.

I want to connect a Xiaomi Mi Plant Flower device (a device that can send moisture, conductivity and temperature over bluetooth). I can reach this device from the Domoticz Pi 4 using bluetooth (BluePi + Domoticz python libraries) ; this works great... but the device need to be at less than 2 meters! If the distance is greater, I cannot reach it over bluetooth.

Ex: From the Domoticz Pi, I can see the Flower device:

Code: Select all

$ sudo hcitool lescan
LE Scan ...
80:EA:CA:88:B7:96 (unknown)
80:EA:CA:88:B7:96 Flower care

I don't want to move the Domoticz Server out of the Server rack for various reasons (Security, Powered Supply, etc.), so I can't get it close to where the flower should be located (Ground floor; far from the server Rack).

I wonder if it would be be possible to tunnel the bluetooth device of a second Pi 4 that I could place nearby the flower device, to the Domoticz Pi?

I was thinking of something like this with a tunnel (Something that would looks like an NFS mount; or a network bridge interface... i would love something using SSH):

Code: Select all

[Flower device]:BT <~~ bluetooth ~~> BT:[Pi Gateway]:SSH? <~~ tunnel the bluetooth device over SSH ~~> SSH:[Domoticz Pi]
Would it be possible to "mount" the bluetooth device of the [Pi Gateway] into the [Domoticz Pi 4] so this latest could ready bluetooth data as if bluetooth devices were connected to it?

I really have no idea if this is possible, nor even how to do that; but it could be great :-)



PS: I just found that I could have several Domoticz (master and slave communication - and then share a device connected into a slave Domoticz to the master domoticz. This could be a workaround; but a tunnel/gateway would be great too ;-)

Posts: 5
Joined: Mon Jan 13, 2020 7:15 pm

Re: Tunneling bluetooth device from a pi to another pi ?

Mon May 10, 2021 7:34 pm

The workaround with domoticz sharing (master/slave) does not work (yet).
There is a known bug regarding python plugins/hardware devices and the share mechanism does not work.

Opened bugs: , and

I'm stuck for now :-(

Return to “General discussion”