-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install instructions no longer work #87
Comments
Looks like new release of python-broadlink library doesn't work with Python 2.7, only Python 3 |
Thanks for the response, I updated my Python to 3.7 but still get the same error any tips? appreciate in advance. |
What command do you use to run mqtt.py with Python 3.7? |
im just running ./mqtt.py currently
im just running ./mqtt.py currently |
I guess it still uses Python 2.7 |
now het the following I did the pip install -r requirements.txt and paho installed but the same error. Traceback (most recent call last): |
pip also should be from Python 3 |
progress (I think) appreciate, just need to sort out the custom.conf now. Traceback (most recent call last): |
"Authentication failed" means that the Broadlink device is currently connected to the phone application. In order to use it by this tool you need to reset the device and connect it to broadlink-mqtt only |
I’m using a BG1 do I need to remove it from the app?
From: Eugene Schava [mailto:[email protected]]
Sent: 10 November 2020 14:12
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
"Authentication failed" means that the Broadlink device is currently connected to the phone application. In order to use it by this tool you need to reset the device and connect it to broadlink-mqtt only
I'll add this to the main instructions
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TEROMAWEETFKN5EPTDSPFC4XANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2TGEUIVQJ7WDWQ2BGKDSPFC4XA5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFMZHJDY.gif>
|
I'm not sure. You have either remove it from the mobile app or reset device settings to wipe out the connection between device and application |
Ok so making progress and thank you for the help, it needs to be in the app still, its connecting but I am getting the following any ideas?
[2020-11-10 16:40:01,304] DEBUG Connected to 'BG1' Broadlink device at '192.168.1.73' (MAC 54:48:e6:a7:df:24) and started listening for commands at MQTT topic having prefix 'broadlink/'
[2020-11-10 16:40:02,211] DEBUG Connected to MQTT broker, subscribing to topic broadlink/#
[2020-11-10 16:40:02,211] WARNING OOOOPS! MQTT disconnection
[2020-11-10 16:40:13,224] DEBUG Connected to MQTT broker, subscribing to topic broadlink/#
[2020-11-10 16:40:13,225] WARNING OOOOPS! MQTT disconnection
From: Eugene Schava [mailto:[email protected]]
Sent: 10 November 2020 16:42
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
I'm not sure. You have either remove it from the mobile app or reset device settings to wipe out the connection between device and application
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TDNBKNYR7WHXVD35L3SPFULZANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2TBWLL7DYEPISFPE5TTSPFULZA5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFMZ6SFQ.gif>
|
Ignore my last message, it was a capital in the password that was throwing the error
From: Eugene Schava [mailto:[email protected]]
Sent: 10 November 2020 16:42
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
I'm not sure. You have either remove it from the mobile app or reset device settings to wipe out the connection between device and application
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TDNBKNYR7WHXVD35L3SPFULZANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2TBWLL7DYEPISFPE5TTSPFULZA5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFMZ6SFQ.gif>
|
Once again thank you for the support, I now have the socket working just need to work out now how to add additional sockets, as an update this is what I had to do to get it working:
1/ I had to remove the socket from the app as it was not broadcasting MQTT messages even though it was connected to boradlink-mqtt successfully, this is due to the app having it cloud connected
2/ put the BG1 socket into AP mode
3/ Build a linux laptop and install bpython3 broadlink
4/ join the laptop to the BG1 AP network
5/ run broadlink_cli –joinwifi SSID SSIDPASSWORD
6/ success
From: Eugene Schava [mailto:[email protected]]
Sent: 10 November 2020 16:42
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
I'm not sure. You have either remove it from the mobile app or reset device settings to wipe out the connection between device and application
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TDNBKNYR7WHXVD35L3SPFULZANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2TBWLL7DYEPISFPE5TTSPFULZA5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFMZ6SFQ.gif>
|
what mode (device_type) do you use in your configuration? |
For the first device I did direct connection, I am going to try lookup so I have made these changes to the config.conf do they look right? (Second switch I still need to configure to get the real MAC)
# Type of device. Valid options are 'lookup', 'multiple_lookup', 'rm', 'rm4', 'sp1', 'sp2', 'a1', 'mp1', 'dooya', 'bg1'
device_type = 'lookup' # use lookup
## lookup parameters
lookup_timeout = 20
#local_address = '127.0.0.1'
## parameters for direct connection
# device_host = '192.168.1.73'
# device_mac = '24:df:a7:e6:48:54'
## MQTT connection parameters
mqtt_broker = 'localhost' # default: 'localhost'
mqtt_port = 1883 # default: 1883
mqtt_clientid = 'broadlink'
mqtt_username = 'root'
mqtt_password = 'Welcome1'
mqtt_topic_prefix = 'broadlink/'
mqtt_multiple_subprefix_format = 'BG1_192.168.1.73_24:df:a7:e6:48:54/BG1_192.168.1.74_25:df:a7:e6:48:54/' # use only with 'multiple_lookup' device type (allowed parameters are {type}, {host}, {mac}, {mac_nic})
#mqtt_birth_topic = 'clients/broadlink'
#mqtt_birth_payload = 'Hello!'
mqtt_will_topic = 'clients/broadlink'
mqtt_will_payload = 'Adios!'
From: Eugene Schava [mailto:[email protected]]
Sent: 11 November 2020 10:30
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
just need to work out now how to add additional sockets
what mode (device_type) do you use in your configuration?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TF6Y73JIKUOU5NK2DLSPJRTRANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2TGAJCUBS44HSNYXRW3SPJRTRA5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFM55PHA.gif>
|
You should use multiple_lookup type to use autodiscovery for multiple devices |
Think I mis-understood the instructions, so if I changed my config to juts look like the below, I would not need to put ip and mac of the devices in?
device_type = 'multiple_lookup'
mqtt_multiple_subprefix_format = '{type}_{mac_nic}/
From: Eugene Schava [mailto:[email protected]]
Sent: 11 November 2020 10:36
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
You should use multiple_lookup type to use autodiscovery for multiple devices
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TGBBH6SCCWTGEU6PBTSPJSKNANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2TGEO6YKZEUSE5DKBJDSPJSKNA5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFM56IQY.gif>
|
Yes, this is what auto-lookup is for |
Perfect that’s working it’s now seeing two sockets, last challenge I am seeing this:
[2020-11-11 12:03:52,154] ERROR MQTT topic broadlink/power/2 has no recognized device reference, expected one of BG1_192.168.1.71/,BG1_192.168.1.26/
[2020-11-11 12:03:52,155] ERROR MQTT topic broadlink/power/1 has no recognized device reference, expected one of BG1_192.168.1.71/,BG1_192.168.1.26/
From: Eugene Schava [mailto:[email protected]]
Sent: 11 November 2020 11:34
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
Yes, this is what auto-lookup is for
The only thing that is essential for lookup modes is correct local_address if your device is connected to multiple networks
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TA3JVRVB6PWDZJREL3SPJZB3ANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2TGY6ELOD4QORO3BBZ3SPJZB3A5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFM6E4PY.gif>
|
Looks like you changed mqtt_multiple_subprefix_format to {type}_{host} |
Yes I had to change to {type]_[host} as when I used [mac_nic} it only used the first few characters of the mac address which ended up being the same so had duplicates and threw errors.
All working now successfully controlling both switches via home assistant, last step getting mqtt.py to run all the time
Thanks so much for your help this has been a very interesting project
From: Eugene Schava [mailto:[email protected]]
Sent: 11 November 2020 12:18
To: eschava/broadlink-mqtt <[email protected]>
Cc: digginsa <[email protected]>; Author <[email protected]>
Subject: Re: [eschava/broadlink-mqtt] Install instructions no longer work (#87)
Looks like you changed mqtt_multiple_subprefix_format to {type}_{host}
So now you need to send commands to the topic like broadlink/BG1_192.168.1.71/power/1 not broadlink/power/1
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#87 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFX2TDRFV3YX22AIFQEN7LSPJ6HNANCNFSM4TQP56VQ> . <https://github.com/notifications/beacon/AOFX2THNZ5E33QHFMWZSDULSPJ6HNA5CNFSM4TQP56V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFM6JQUI.gif>
|
I have tried this but I still get the paho is definitely installed as I get Requirement already satisfied if I run the installer again. |
Hello,
I have some BG1 and have followed the install instructions but always get the below error when running ./mqtt.py
File "./mqtt.py", line 4, in
import broadlink # pip install broadlink
File "/home/digginsa/.local/lib/python2.7/site-packages/broadlink/init.py", line 100
dev_type: int,
^
SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered: