Giter Club home page Giter Club logo

sonic's Introduction

Home Assistant Sonic custom integration

hacs_badge

This is a beta version of a custom integration for Sonic smart water shutoff valve, more features are still to be added. Additionally I am exploring local access to the sonic device to remove the need to communicate with the cloud API.

It utilises the herolabsapi python library that I have written to interact with Sonic devices using the official Hero Labs API (cloud based).

Integration Development

Full commit history

Installation

Ideally this will be adopted as an inbuilt integration, however while development and testing are ongoing the recommended way to install Sonic is through HACS.

To install it:

  1. Open HACS within Home Assistant
  2. Click the Integrations section, then Explore and Download Repositories button.
  3. Search for Sonic then click on the download button
  4. Select the latest version (or latest beta version) and download
  5. Then restart Home Assistant
  6. Go to Settings / Devices & Services (Integrations Tab) / Add Integration and search for Sonic (Hero Labs) then follow the configuration steps below

Configuration

  1. Log into the integration with your Hero Labs account details (Email & Password).
  2. Any sonic devices on your account should be discovered, an additional device will be setup for each property registered to your account (e.g. if you have 2 properties with a sonic device at each property you will have 4 devices setup).
  3. You can assign each device to an area within your home.

To update the integration

As development happens there will be updates to the integration, so it will be good to periodically update,

In HACS:

  1. Click on Integrations,
  2. Scroll down and find the "Sonic"
  3. Click the 3 dots on the lower right corner and click "Redownload"

How you can help?

Please file issues within the github repository for anything that you think could be broken, is broken, could be improved or is a requested feature.

sonic's People

Contributors

dependabot[bot] avatar lukaszp2 avatar marc-amperias avatar markvader avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sonic's Issues

Temperature and pressure

I notice that you already added the code for fetching the water temperature and pressure, but this doesn't show how up in my home assistant instance, is this part already working?

To add - additional sensors

Valve status (there are more messages from the valve than just open and close). It also can report opening/closing/opening requested etc. Return this string value as a sensor

Can't start configuration

Hi,

I can't start configuration process while adding integration, this is error message:

Error
Config flow could not be loaded: Unknown error

In the Networking tab i have something like that:

image

Sonic won’t turn valve on after pressure test

Hi,

When I enable this integration and Sonic performs a pressure test, the device won’t turn the water on again. To get the sonic to turn the valve back on I have to either disable or uninstall this integration and turn off/on the sonic at the plug.

If I don’t have this installed/enabled the Sonic works as expected and turns itself back on after a pressure test.

Do all the tests etc. that can be done in the Sonic app have to be turned off and done in HA?

Battery sensor no longer displayed

The battery sensor for the Sonic isn't displayed any more. The following error is showin the logs:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 590, in state
    numerical_value = int(value)
                      ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'high'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 504, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 788, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 742, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 810, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 594, in state
    raise ValueError(
ValueError: Sensor sensor.battery has device class 'None', state class 'measurement' unit 'battery' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'high' (<class 'str'>)

Sonic WiFi - only configuration information returned

Implemented with a sonic WiFi NOT pro. Only configuration settings are returned no diagnostics (pressure, temp etc)
Raised with Hero Labs Support. Anyone managed to use this with the WiFi version successfully

note Alexa support also does not work with WiFi version. Hero Labs have acknowledge this Alexa issue so may be related.

Name discrepancies between entities

I recently installed the integration for my new sonic device and noticed that the 2 entities don't have the same name.
In the Sonic app the device is called : 2 Church Meadows

In the integration it discovered 2 entities named as follows:

Sonic Device: HERO SONIC - 3 church meadows
and
Sonic Property Settings: 2 church meadows

it looks like the number has been iterated.

Installed, but can't login

Installed and started config.

When trying to put in username and password, I get an "! Unexpected Error".

Password is 40 chars long if that makes a difference

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.