Coder Social home page Coder Social logo

hass-components's Introduction

❗ Home Assistant 0.88 components directory structure change ❗

ups_pico already updated #3

More info: https://developers.home-assistant.io/blog/2019/02/19/the-great-migration.html

hass-components

Home Assistant custom components

rflink2

RFLink custom component allowing to use second RFLink module

Installation

  • download or clone repository files
  • add to configuration.yaml:
    rflink2:
      port: /dev/ttyACM0
    

ups_pico

Custom component for UPS PIco from PiModules

Requirements

  • smbus2 v0.2.0 Python package - should be installed automatically by HA

Installation

  • download or clone repository files
  • copy dirs/files to your Home Assistant config directory - for example /home/homeassistant/.homeassistant with this structure:
    └── .homeassistant
        ├── configuration.yaml
        │   (... and the other current files)
        └── custom_components
            └── ups_pico
                ├── __init__.py
                └── switch.py
    
  • add to configuration.yaml:
    ups_pico:
    
    switch:
      - platform: ups_pico
    
  • restart Home Assistant
  • you should see entities for sensors and switches like:
    ups_pico.pwr_mode
    ups_pico.volt_rpi
    ups_pico.volt_bat
    ups_pico.temp_ntc1
    switch.ups_pico_enabled_leds
    switch.ups_pico_blue_led
    switch.ups_pico_green_led
    switch.ups_pico_orange_led
    
  • if it doesn't work, look to the log files

hass-components's People

Contributors

milanvo avatar

Stargazers

reaper7 avatar

Watchers

Gaetan Semet avatar James Cloos avatar  avatar pjwerdna avatar  avatar  avatar

hass-components's Issues

ups pico with hass 0.86.0

ups pico (voltage, temperature etc) no longer work with new hass 0.86.0 (switches/leds works)

this is hass log:

2019-01-23 23:31:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 336, in _async_add_entity
    'Invalid entity id: {}'.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: ups_pico.voltBat
2019-01-23 23:31:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 336, in _async_add_entity
    'Invalid entity id: {}'.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: ups_pico.pwrMode
2019-01-23 23:31:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 336, in _async_add_entity
    'Invalid entity id: {}'.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: ups_pico.voltRpi
2019-01-23 23:31:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 336, in _async_add_entity
    'Invalid entity id: {}'.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: ups_pico.tempNtc1

Setup failed for dependencies

Hi mate,

If this works it would be great!
First error;

No module named 'smbus'

So i installed this, but then;

2019-02-08 11:58:59 ERROR (MainThread) [homeassistant.setup] Error during setup of component ups_pico
Traceback (most recent call last):
File "/usr/src/app/homeassistant/setup.py", line 145, in _async_setup_component
hass, processed_config)
File "/config/custom_components/ups_pico.py", line 47, in async_setup
UPS_DATA = UpsPico()
File "/config/custom_components/ups_pico.py", line 132, in init
self.i2c = smbus2.SMBus(1)
File "/usr/local/lib/python3.6/site-packages/smbus2/smbus2.py", line 253, in init
self.open(bus)
File "/usr/local/lib/python3.6/site-packages/smbus2/smbus2.py", line 265, in open
self.fd = os.open("/dev/i2c-{}".format(bus), os.O_RDWR)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'
2019-02-08 11:58:59 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of switch.ups_pico. Setup failed for dependencies: ups_pico
2019-02-08 11:58:59 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.ups_pico: Could not set up all dependencies.

I cant get it to work :(

ups pico with hass 0.88.0

looks like we have next problem with new HAAA 0.88.0 :(

2019-02-20 22:42:26 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.ups_pico.switch. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py", line 147, in _load_file
    module = importlib.import_module(path)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ImportError: No module named 'custom_components.ups_pico.switch'; 'custom_components.ups_pico' is not a package

and

Integrations need to be in their own folder. Change switch/ups_pico.py to ups_pico/switch.py. This will stop working soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.