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

Make mysensors component async #13641

Merged

Conversation

MartinHjelmare
Copy link
Member

@MartinHjelmare MartinHjelmare commented Apr 2, 2018

Description:

  • Use async dispatcher and discovery.
  • Run is_serial (I/O) in executor.
  • Make mysensors actuator methods async.
  • Upgrade pymysensors to 0.14.0.
  • Use async serial gateway.
  • Use async TCP gateway.
  • Use async mqtt gateway.
  • Make sure gateway is started after discovery of persistent devices and after corresponding platforms have been loaded. This will still not wait for the connection to the arduino gateway to be established. So automations that trigger on home assistant start and sends messages to arduino gateway can still fail. I plan to fix this in an upcoming PR.
  • Don't wait to start gateway until after hass start.

fixes #12575

Pull request in home-assistant.github.io with documentation (if applicable):
home-assistant/home-assistant.io#5090

Example entry for configuration.yaml (if applicable):

mysensors:
  gateways:
    - device: '/dev/ttyACM0'
  version: '2.2'

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

@MartinHjelmare
Copy link
Member Author

I'm going to update the docs a bit too.

@MartinHjelmare
Copy link
Member Author

Is anyone interested in reviewing this? Otherwise I'll go ahead and merge this. It's been ready for a month now.

* Use async dispatcher and discovery.
* Run I/O in executor.
* Make mysensors actuator methods async.
* Upgrade pymysensors to 0.13.0.
* Use async serial gateway.
* Use async TCP gateway.
* Use async mqtt gateway.
* Make sure gateway is started after discovery of persistent devices
  and after corresponding platforms have been loaded.
* Don't wait to start gateway until after hass start.
@MartinHjelmare MartinHjelmare merged commit be3b227 into home-assistant:dev May 11, 2018
@MartinHjelmare MartinHjelmare deleted the test-mysensors-async-gateways branch May 11, 2018 07:49
@balloob balloob mentioned this pull request May 28, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* Make mysensors component async

* Use async dispatcher and discovery.
* Run I/O in executor.
* Make mysensors actuator methods async.
* Upgrade pymysensors to 0.13.0.
* Use async serial gateway.
* Use async TCP gateway.
* Use async mqtt gateway.

* Start gateway before hass start event

* Make sure gateway is started after discovery of persistent devices
  and after corresponding platforms have been loaded.
* Don't wait to start gateway until after hass start.

* Bump pymysensors to 0.14.0
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MySensors 2.2.0
3 participants