t0mer / broadlinkmanager-docker

Broadlink Manager is a python based project that allows you to contorol your broadlink devices. Discover, Leran and send command in a very easy way
Apache License 2.0
261 stars 56 forks source link

Unable to find RMpro on another subnet #2

Closed fliptoback closed 2 years ago

fliptoback commented 4 years ago

Hi, my RMpro is connected to wifi on another subnet 192.168.3.125.

My home-assistant is in a docker on a linux box on IP 192.168.1.111. I am able to ping the RMpro on 192.168.3.125 from the linux box.

Broadlink manager has been installed to a docker container on the linux box. Upon launching the web interface, the searching for devices is unable to return with RMpro. It just cannot find the device.

What should I do?

t0mer commented 4 years ago

Hi, Broadlink Manager is based on python broadlink and broadlink protocol, Broadlink is using MAC Address to communicate with the device and MAC adress cannot be bridged between networks.

fliptoback commented 4 years ago

Thanks Tomer for the reply.

In my house I have all wireless devices connecting to the 192.168.3 subnet and all wired devices to the 192.168.1 subnet.

So does it mean that no matter what I do, broadlink manager will not work with this arrangement?

Thanks again!

RobHofmann commented 4 years ago

I'm facing the same issue here.

liarjo commented 4 years ago

Same issue

clabnet commented 4 years ago

+1

dfarrall commented 3 years ago

+1, looks like a great tool but can't use it based on this.

LucidityCrash commented 3 years ago

find the devices.json file on your filesystem and put in the correct details something like ... [{"name":"RM Mini 3","type":"0x5f36","ip":"192.168.1.100","mac":"xxxxxxxxxxxx"}]

For the type look in the app (Android) and go to the Device info page look at at the PID ... mine shows 000000000000000000000000365f0000 (24 zero's, a hex number - well the whole thing is a hex number but you know what I mean, and then 4 zeros) take the hex number 365f, which translates into a devce ID of 0x5f36 in my case.

HTH.

fliptoback commented 3 years ago

find the devices.json file on your filesystem and put in the correct details something like ... [{"name":"RM Mini 3","type":"0x5f36","ip":"192.168.1.100","mac":"xxxxxxxxxxxx"}]

For the type look in the app (Android) and go to the Device info page look at at the PID ... mine shows 000000000000000000000000365f0000 (24 zero's, a hex number - well the whole thing is a hex number but you know what I mean, and then 4 zeros) take the hex number 365f, which translates into a devce ID of 0x5f36 in my case.

HTH.

Thanks LucidityCrash.

I would like to give it a try. I can figure out the PID via the Android app but where do I find this devices.json file?

LucidityCrash commented 3 years ago

To access it on the machine you run Docker on it will be in the folder you specified in the Volume option. Assuming you used the docker compose given in the readme :

version: "3.6"
services:
  broadlinkmanager:
    image: techblog/broadlinkmanager
    network_mode: host
    container_name: broadlinkmanager
    restart: always
    restart: unless-stopped
    volumes:
      - ./broadlinkmanager:/opt/broadlinkmanager/data

then it will be in the folder broadlink (which will be in whatever folder you were in when you ran docker compose. If you just did a docker run, for example like :

docker run -d --restart=unless-stopped -v /opt/docker/broadlinkmanager:/opt/broadlinkmanager/data --net=host --name broadlinkmanager techblog/broadlinkmanager

then it will be in /opt/docker/broadlinkmanager

btw you might already realise but just in case - the xxxxxxxxxxxx for the mac need to be set to the mac off the RM Mini which you'll find in the app too.

fliptoback commented 3 years ago

To access it on the machine you run Docker on it will be in the folder you specified in the Volume option. Assuming you used the docker compose given in the readme :

version: "3.6"
services:
  broadlinkmanager:
    image: techblog/broadlinkmanager
    network_mode: host
    container_name: broadlinkmanager
    restart: always
    restart: unless-stopped
    volumes:
      - ./broadlinkmanager:/opt/broadlinkmanager/data

then it will be in the folder broadlink (which will be in whatever folder you were in when you ran docker compose. If you just did a docker run, for example like :

docker run -d --restart=unless-stopped -v /opt/docker/broadlinkmanager:/opt/broadlinkmanager/data --net=host --name broadlinkmanager techblog/broadlinkmanager

then it will be in /opt/docker/broadlinkmanager

btw you might already realise but just in case - the xxxxxxxxxxxx for the mac need to be set to the mac off the RM Mini which you'll find in the app too.

Thanks for your reply.

This is my docker-compose file:

version: "3.6"
services:
  broadlinkmanager:
    image: techblog/broadlinkmanager
    network_mode: host
    container_name: broadlinkmanager
    restart: always
    restart: unless-stopped
    volumes:
      - /volume1/docker/broadlinkmanager:/opt/broadlinkmanager/data

When I check the actual physical /volume1/docker/broadlinkmanager directory or when i shell into the broadlinkmanager docker container and then cd to /opt/broadmanager/data, I don't see any json devices file.

The only i see is my docker-compose.yml which I just left at /volume1/docker/broadlinkmanager folder.

I know I am missing something but I couldn't figure out what.

Broadlinkmanager is running at port 7020 and the web interface loads - but just continues to "searching for devices".

Any idea please?

LucidityCrash commented 3 years ago

Unless you've put the device in the same network as the docker image and done a discover it wont exist ... you will need to create it.

Using your favorite editor create a new file called devices.json in that path and add the line I put previously - replacing the type, ip, and mac with the ones for your specific device.

Then restart the docker container

fliptoback commented 3 years ago

Unless you've put the device in the same network as the docker image and done a discover it wont exist ... you will need to create it.

Using your favorite editor create a new file called devices.json in that path and add the line I put previously - replacing the type, ip, and mac with the ones for your specific device.

Then restart the docker container

Thanks again. Gotcha. I am still not getting much luck but here are my steps.

From my android ihc app, I can see that the PID number of my RM Pro is "whole bunch of zeros"+2a27+"4 zeros". So I figured my PID is therefore 2a27 so I reckon my device number is 0x272a.

From the github page (https://github.com/t0mer/broadlinkmanager-docker) I see that a device number 0x272a corresponds to the RM2 Pro Plus.

So my devices.json file contain the following string:

[{"name":"RM2 Pro Plus","type":"0x272a","ip":"192.168.2.106","mac":"redacted"}]

And I saved this file to my folder /volume1/docker/broadlinkmanager. And just to double check that the docker container can see this, I shell into the docker manager and browse to /opt/broadlinkmanager/data and I can see the same devices.json file.

Then I restart the docker container and browse to the web gui at 7020. It still says searching for devices...much to my dismay.

I think I follow all the right steps but something must be amiss.

Any idea?

LucidityCrash commented 3 years ago

Mine still says "searching for devices" for a few seconds then shows a list of devices which is the one I've got configured in devices.json. image beyond that I'm a bit out of ideas. Which user is running the docker container ? Which user owns the devices.json and what are the permissions on it ? (post the output of "ls -l" in the folder with the devices.json file in it)

edit : might be worth trying clicking on the load from file button

fliptoback commented 3 years ago

Which user is running the docker container ? Which user owns the devices.json and what are the permissions on it ? (post the output of "ls -l" in the folder with the devices.json file in it)

edit : might be worth trying clicking on the load from file button

Thanks again. Here is the output in the /opt/broadlinkmanager/data directory while inside the docker container.

root@voyager:/opt/broadlinkmanager/data# ls -l
total 8
-rwxr-xr-x 1 1027 users  83 Dec 24 05:00 devices.json
-rwxr-xr-x 1 1027 users 314 Dec 23 06:48 docker-compose.yml
root@voyager:/opt/broadlinkmanager/data#

The physical folder /volume1/docker/broadlinkmanager - the ownership is the one user (i.e. me)

My device list on the broadlinkmanager looks like this:

2020-12-25_13-59-07

Thanks again

LucidityCrash commented 3 years ago

image

fliptoback commented 3 years ago

Thanks again.

On that Devices List page, because it is continuing "searching for devices", it does not give the options to display those 3 buttons (notably Rescan, Save to File and Load from file). There is just no button that I can press.

How do i stop it from searching for devices?

LucidityCrash commented 3 years ago

As far as I can tell it just stops by itself ... at least that is what it does for me.

t0mer commented 2 years ago

RM Devices will not work in other subnets, that need to be on the same subnet as Broadlnik Manager.