GithubHelp home page GithubHelp logo

djelibeybi / hass-soma-connect Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 552 KB

Custom SOMA Connect integration with async support and better connectivity resilience

License: MIT License

Python 98.08% Shell 1.92%
hacs hass hassio home-assistant soma soma-shades soma-tilt

hass-soma-connect's Introduction

Who am I?

Setting the more existential question aside, I am Avi Miller.

During the day, I do open source things for Oracle Cloud Infrastructure.

At night and on weekends, my love for technology extends to annoying my husband with smart home upgrades as well as more useful stuff like volunteering for community-based organizations.

What's here

I am not actually a real developer, but I'm very good at pretending to be one on the internet.

Mostly I dabble. Every now and then I noodle on things too. The results of my dabbling and noodling can be found in the various repos herein contained.

I'm particularly proud of the following things I've dabbled with and noodled on:

I'm also rather proud of my contributions to Photons, a Python 3.6+ framework for interacting with LIFX products. Photons is used by the docker-lifx-daydusk container.

What's not here

Stuff I maintain professionally for Oracle including the following repos:

I contribute to the following repos:

I manage the official Oracle Linux images on Docker Hub, the Oracle Container Registry and the GitHub Container Registry which are built from the rootfs tarballs in this repo:

Finally, I am also one of the GitHub administrators for Oracle. If you have any questions about Oracle's open source projects or contributions, please email the team at [email protected].

hass-soma-connect's People

Contributors

dependabot[bot] avatar djelibeybi avatar pre-commit-ci[bot] avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

stleusc

hass-soma-connect's Issues

USB Bridge is not found

Hello, I installed the version on me and I entered the IP address of the bridge, which in the meantime is already the USB stick, but unfortunately it is not recognized. I tried the last version and the beta version

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/hacs.yml
  • actions/checkout v4
.github/workflows/hassfest.yml
  • actions/checkout v4
pep621
pyproject.toml
poetry
pyproject.toml
  • python ^3.11
  • aiosoma ^1.1.3
  • black ^24.0.0
  • isort ^5.11.2
  • pytest ^7.2.0
  • pytest-cov ^4.0.0
  • pre-commit ^3.0.0
  • pytest-asyncio ^0.23.0
  • pytest-aiohttp ^1.0.4

  • Check this box to trigger a request for Renovate to run again on this repository

Request: Support sensor for position and battery voltage

/get_shade_state/"MAC" : This endpoint needs a MAC address from the list. The MAC address can be copied in the format it appears in the list (for example: http://192.168.0.104:3000/get_shade_state/dd:9b:89:47:a5:e7). This will return the current position of the shade. Position is in the range 0..100

Especially nice to poll that every 1s while the shades are moving!

/get_battery_level/"MAC" : This endpoint returns the current battery level from the device. The battery level is in units of 10 mV. The battery level should usually be between 360 and 410. Anything under 320 is critically low. The device itself considers 360 the minimum to move the motor - anything under this will reject all motion commands.

Unexpected error fetching soma_connect data: unsupported operand type(s) for -: 'int' and 'NoneType'

Replaced an original "2" device with a replacement "2" device, and then with a "2C" device per Soma support. Following these changes, I'm now seeing this error with the integration and only getting 1 device in Home Assistant.

This error originated from a custom integration.

Logger: custom_components.soma_connect.coordinator
Source: custom_components/soma_connect/coordinator.py:127
Integration: SOMA Connect (documentation, issues)
First occurred: 10:51:54 (37 occurrences)
Last logged: 11:27:26

Unexpected error fetching soma_connect data: unsupported operand type(s) for -: 'int' and 'NoneType'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/soma_connect/coordinator.py", line 127, in _async_update_data
    self._positions[shade.mac] = int(100 - shade.position)
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

One interesting thing to note is that the older devices and macs show when I visit the :3000/list_devices page, so I'm wondering if there's some sort of conflict or issue with devices that are named "null" or "old" as I see in the list. I first reset them via Smart Shades and then after that removed them from the app, but they're still showing in the list from Soma Connect.

Any pointers? Anything else I should look for that might be causing this issue?

Also, an interesting note is that the newer "2C" devices show up as gen "1" via Soma Connect but show as 2S in the Smart Shades app. All devices are on firmware 2.3.3 and Soma Connect is on 2.3.1. If I disable this version and go with the native SOMA Connect app, it appears to correctly show the only 6 shades I have connected (despite the list_devices api showing 4 more that are no longer connected), but also has "" for the model on each unit.

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.