Skip to content
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

Bump broadlink from 0.16.0 to 0.17.0 #47779

Merged
merged 3 commits into from
Mar 12, 2021
Merged

Conversation

felipediel
Copy link
Contributor

@felipediel felipediel commented Mar 11, 2021

Proposed change

Bump broadlink from 0.16.0 to 0.17.0.

This version has a lot of bug fixes. It also introduces new device types, improves duck typing and adds support for monitoring energy with the new sp2s and sp4b classes.

Changelog:

  • Bump cryptography from 2.6.1 to 3.2
  • Improve exceptions
  • Improve repr(device) and str(device)
  • Reset connection ID and AES key before sending Client Key Exchange packets
  • Add a method to update device name and lock status
  • Split the rm class into rmmini and rmpro classes
  • Split the rm4 class into rmminib, rm4mini and rm4pro classes
  • Split the sp2 class into sp2, sp2s, sp3 and sp3s classes
  • Add a function to send ping packets
  • Refactor the lb1 class
  • Fix encryption errors
  • Filter unsupported features and convert sensor data to float in the sp4b class
  • Improve rm4 communication: prefix the payload to its length before encryption, slice accordingly after decryption and fix find_rf_packet()
  • Fix issue of long codes being reinterpreted by the device
  • Add new product ids

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@balloob balloob merged commit 9ca0cd5 into home-assistant:dev Mar 12, 2021
@felipediel
Copy link
Contributor Author

Thank you!

@XxCabbyoO
Copy link

Thank you!

Thank you felipediel for your great Work on 0.17.0 👍

I have been waiting for this for several months now to finally be able to use my RM4 C Mini with Homeassistant. 💯

@felipediel
Copy link
Contributor Author

felipediel commented Mar 12, 2021

You're welcome!

@XxCabbyoO
Copy link

You're welcome!

will it be delivered in milestone 2021.3.5, or only in 2021.4?

@felipediel
Copy link
Contributor Author

This is always a mystery. Follow the release notes to stay up to date.

@XxCabbyoO
Copy link

XxCabbyoO commented Mar 13, 2021

This is always a mystery. Follow the release notes to stay up to date.

Can't you even just assign it to milestone 2021.3.5 yourself? I am unfortunately a beginner, but had seen this so with other requests.

https://github.com/home-assistant/core/milestone/390

--
if not no problem, of course I can wait ;)

@felipediel
Copy link
Contributor Author

Nope, I don't have privileges for that, but I am sure that those responsible will endeavor to release it soon. baloob reviewed and merged the PR in record time, this is a good sign.

@ngohaiitdog
Copy link

Thanks so much @felipediel for your contribution !!! Been waiting for it to make my RM4S Mini work!

@felipediel
Copy link
Contributor Author

You're welcome!

@nogueirasa
Copy link

The problem

Trying to integrate RM4C mini came with firmware version V52078 but produces the error "Unsupported device: 0x6539"

What is version of Home Assistant Core has the issue?

2021.3.4

What type of installation are you running?

Home Assistant Docker

Integration causing the issue

Broadlink

@nogueirasa
Copy link

nogueirasa commented Mar 14, 2021

The problem

Trying to integrate RM4C mini came with firmware version V52078 but produces the error "Unsupported device: 0x6539"

What is version of Home Assistant Core has the issue?

2021.3.4

What type of installation are you running?

Home Assistant Docker

Integration causing the issue

Broadlink

@felipediel , I installed 0.17.0 with the command bellow, but continuos with the same problem.

docker exec -it homeassistant /bin/bash
pip3 install --upgrade git+https://github.com/mjg59/python-broadlink.git --no-deps

Thanks,

@felipediel
Copy link
Contributor Author

felipediel commented Mar 14, 2021

@nogueirasa You shouldn't patch with v0.17.0 directly, it comes with several breaking changes. You need the code I wrote here to make it work correctly. It won't take long, but if you're in a hurry you can take my master branch.

  1. Open Home Assistant and install "SSH & Web Terminal" add-on
  2. Disable Protection mode
  3. Click "Terminal" on the sidebar and install the patch.
docker exec -it homeassistant /bin/bash
pip3 install git+https://github.com/felipediel/python-broadlink.git --force-reinstall --no-deps
  1. Restart the server.

You need to repeat the process when you update Home Assistant. The patch is not persistent.

@nogueirasa
Copy link

@nogueirasa You shouldn't patch with v0.17.0 directly, it comes with several breaking changes. You need the code I wrote here to make it work correctly. It won't take long, but if you're in a hurry you can take my master branch.

  1. Open Home Assistant and install "SSH & Web Terminal" add-on
  2. Disable Protection mode
  3. Click "Terminal" on the sidebar and install the patch.
docker exec -it homeassistant /bin/bash
pip3 install git+https://github.com/felipediel/python-broadlink.git --force-reinstall --no-deps
  1. Restart the server.

You need to repeat the process when you update Home Assistant. The patch is not persistent.

Working.

Home Assistant Version: core-2021.3.4
Installation Type: Home Assistant Container

Device: Broadlink (BestCon) RM4C Mini
Firmware version: v52078

Thanks @felipediel

@felipediel
Copy link
Contributor Author

You're welcome!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.