ha-wyzesense icon indicating copy to clipboard operation
ha-wyzesense copied to clipboard

Issue adding second bridge

Open Caustik314 opened this issue 4 years ago • 5 comments

Hello! I apologize if this has already been brought up, I could not find any details on this issue: I'm trying to add a second bridge on a USB extension cable.

I successfully connected one bridge that has one contact sensor paired to it.
But when I add a second hub, neither is found when rebooting HA.

If I do the "dmesg | grep hidraw" thing, its only shows my mouse on hidraw0. When I take one out, it shows both my mouse and one hub on hidraw1. Then I plug the second back in and it shows the mouse, hub1 and now hub2 on hidraw2.

then I have in config,yaml: `binary_sensor:

  • platform: wyzesense device: "/dev/hidraw1/" device: "/dev/hidraw2/"`

restart and it kicks an error: 2020-05-30 12:18:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up wyzesense platform for binary_sensor Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform     await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)   File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for     return fut.result()   File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run     result = self.fn(*self.args, **self.kwargs)   File "/config/custom_components/wyzesense/binary_sensor.py", line 116, in setup_platform     ws = beginConn()   File "<decorator-gen-2>", line 2, in beginConn   File "/usr/local/lib/python3.7/site-packages/retry/api.py", line 74, in retry_decorator     logger)   File "/usr/local/lib/python3.7/site-packages/retry/api.py", line 33, in __retry_internal     return f()   File "/config/custom_components/wyzesense/binary_sensor.py", line 114, in beginConn     return Open(config[CONF_DEVICE], on_event)   File "/config/custom_components/wyzesense/wyzesense_custom.py", line 563, in Open     return Dongle(device, event_handler)   File "/config/custom_components/wyzesense/wyzesense_custom.py", line 285, in __init__     self.__fd = os.open(device, os.O_RDWR | os.O_NONBLOCK) FileNotFoundError: [Errno 2] No such file or directory: '/dev/hidraw2/'

Any ideas what's going wrong and causing the conflict? Is there a way I can name the hubs via mac, or is my syntax not quite right?

EDIT: So I had to remove the last / so that it reads "/dev/hidraw1" instead of "/dev/hidraw1/" but the error above might be similar since neither is loaded so it still says it doesn't exist. remove one so theres only one bridge plugged in and it works great! So I'm just going to try to pair this one sensor to the working bridge for now, but I'm available for testing if anyone wants to help me work through adding a second bridge! Running VirtualBox on Windows 10. Thanks in advance!

Caustik314 avatar May 30 '20 18:05 Caustik314

Why do you want to have two bridges connected to the same instance of home assistant?

On Sat, May 30, 2020, 11:38 AM Caustik314 [email protected] wrote:

Hello! I apologize if this has already been brought up, I could not find any details on this issue: I'm trying to add a second bridge on a USB extension cable.

I successfully connected one bridge that has one contact sensor paired to it. But when I add a second hub, neither is found when rebooting HA.

If I do the "dmesg | grep hidraw" thing, its only shows my mouse on hidraw0. When I take one out, it shows both my mouse and one hub on hidraw1. Then I plug the second back in and it shows the mouse, hub1 and now hub2 on hidraw2.

then I have in config,yaml: `binary_sensor:

  • platform: wyzesense device: "/dev/hidraw1/" device: "/dev/hidraw2/"`

restart and it kicks an error: 2020-05-30 12:18:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up wyzesense platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/wyzesense/binary_sensor.py", line 116, in setup_platform ws = beginConn() File "", line 2, in beginConn File "/usr/local/lib/python3.7/site-packages/retry/api.py", line 74, in retry_decorator logger) File "/usr/local/lib/python3.7/site-packages/retry/api.py", line 33, in __retry_internal return f() File "/config/custom_components/wyzesense/binary_sensor.py", line 114, in beginConn return Open(config[CONF_DEVICE], on_event) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 563, in Open return Dongle(device, event_handler) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 285, in init self.__fd = os.open(device, os.O_RDWR | os.O_NONBLOCK) FileNotFoundError: [Errno 2] No such file or directory: '/dev/hidraw2/'

Any ideas what's going wrong and causing the conflict? Is there a way I can name the hubs via mac, or is my syntax not quite right?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kevinvincent/ha-wyzesense/issues/146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC362MMIQMT4LQWAPFBHV63RUFHDLANCNFSM4NOZWGEQ .

photinus avatar Jun 01 '20 05:06 photinus

I have a little button I made out of one of the contact sensors, which I really didn't want to have to disassemble to re-pair the thing to another bridge, but I've already done that now. I feel kinda selfish now and I totally understand why you're thinking anyone would want to do that lol!

I suppose if someone had some crazy huge house and needed more range to create sort of like a wifi mesh for their sensors?

Caustik314 avatar Jun 01 '20 05:06 Caustik314

The bridges need to plug into the server that running HA, how do you extend range? Does USB extension cable works? for how long?

hfcheng66 avatar Jun 10 '20 00:06 hfcheng66

I've currently got mine running well on a USB3.0 12 foot extension cable. I bought a USB2.0 "active" 35ft extension which failed to work. I just ordered a 15ft "active" USB3.0 extension. I'll try to remember to report back when it gets here, I believe Monday. I'm going to try to string the two 3.0 cables together to give me 27ft feet which will work just fine for my setup... if it works lol! My HA server is in my basement so I wanted to get the receiver out of there. I have also seen wireless USB extension adapters and USB over ethernet cable adapters if you need more distance, but I have not used either before. They are both a bit more expensive options. I have used hdmi over ethernet and that works great!

Caustik314 avatar Jun 10 '20 01:06 Caustik314

Well, after a ton of shipping delays, I finally got my 15ft 3.0 active cable today! Ran the hub out of the basement just to the top of the stairwell (27ft of cable, 12ft horizontal, 15ft vertical). Seem to have gained about 30RSSI! My garage door was at -110RSSI, it's now at -79! I no longer have RSSIs below -80 with my hub in a much more central location!

I hope this may help others in the same situation! I'm using the insignia 12ft 3.0, and the 15ft "active" 3.0 from Monoprice.

Caustik314 avatar Jun 24 '20 18:06 Caustik314