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

Initial support for Fibaro HomeCenter hubs #17891

Merged
merged 30 commits into from Nov 14, 2018

Conversation

@pbalogh77
Contributor

pbalogh77 commented Oct 27, 2018

Description:

Added Fibaro component to integrate with Fibaro Home Center, using an adapted version of the Fiblary library and the Fibaro REST API.
What works:

  • Lights, Switches, Sensors, Covers, Binary sensors
  • Connection, updates, interaction

What's not working yet:

  • Virtual devices, Scenes, Panels, Locks, etc

Related issue (if applicable): fixes #

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

Example entry for configuration.yaml (if applicable):

fibaro:
    url: "http://yourfibarohc/api/"
    username: "your@superuseremail.com"
    password: "YourPassword1"

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 or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@houndci-bot

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 7, in 
    from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
@houndci-bot

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 7, in 
    from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
@houndci-bot

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 7, in 
    from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
@houndci-bot

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 7, in 
    from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
@frenck

This comment has been minimized.

Member

frenck commented Oct 29, 2018

Could not find a related PR in our documentation repository. Adding docs-missing label.

@frenck frenck added the docs-missing label Oct 29, 2018

@houndci-bot

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 7, in 
    from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
@pbalogh77

This comment has been minimized.

Contributor

pbalogh77 commented Oct 29, 2018

Could someone please help me understand what I'm doing wrong here? I keep getting the this error from lint: https://travis-ci.org/home-assistant/home-assistant/jobs/447813324
fiblary3 is listed as a requirement, it's in requirements_all.txt and all works fine locally, even the req validate script.

@houndci-bot

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 7, in 
    from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
@pbalogh77

This comment has been minimized.

Contributor

pbalogh77 commented Oct 30, 2018

What does the coverage/coveralls error mean and what can I do about it? My component is listed in .coveragerc omit section.

pbalogh77 added some commits Oct 23, 2018

Fibaro HC connection, initial commit
Very first steps working, connects, fetches devices, represents sensors, binary_sensors and lights towards HA.
Cover, switch, bugfixes
Initial support for covers
Initial support for switches
Bugfixes
Some cleanup and improved lights
pylint based cleanup
light switches handled properly
light features reported correctly
Added status updates and actions
Lights, Blinds, Switches are mostly working now
Code cleanup, fiblary3 req
Fiblary3 is now in pypi, set it as req
Cleanup based on pylint
Included in .coveragerc and added how to use guide
Included the fibaro component in coveragerc
Added usage instructions to file header
PyLint inspired fixes
Fixed pylint warnings
PyLint inspired fixes
PyLint inspired fixes
Missing comment added
Missing comment added to please flake8
@pbalogh77

This comment has been minimized.

Contributor

pbalogh77 commented Nov 8, 2018

Could someone please take a look at the error message here? I don't think it's related to my code in any way.

Removed everything but bin.sensors
Stripdown, hoping for a review
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
@amelchio

This already looks good to me. I have a bunch of small questions/proposals but I did not find any major issues.

Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/binary_sensor/fibaro.py Outdated

pbalogh77 added some commits Nov 10, 2018

Fixes based on code review
Fixes based on code review
Implemented stopping
Implemented stopping of StateHandler thread
Cleanup for clarity
Minor fix
Removed unnecessary list copying
@amelchio

Great, I think we can go with this.

Show resolved Hide resolved homeassistant/components/binary_sensor/fibaro.py
Show resolved Hide resolved homeassistant/components/binary_sensor/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/binary_sensor/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated
Show resolved Hide resolved homeassistant/components/fibaro.py Outdated

pbalogh77 added some commits Nov 13, 2018

@MartinHjelmare

Looks good! Can be merged when build passes.

@MartinHjelmare MartinHjelmare merged commit 3128729 into home-assistant:dev Nov 14, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.02%) to 93.048%
Details

@wafflebot wafflebot bot removed the in progress label Nov 14, 2018

@amelchio

This comment has been minimized.

Member

amelchio commented Nov 17, 2018

This was an awesome first contribution. The code is high quality and your response to feedback is exemplary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment