1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-12-06 18:44:14 -05:00
Files
hacs-oasis_mini/README.md
Nathan Spencer 379b6f67f2 Swap out direct HTTP connection with server MQTT connection to handle firmware 2.60+ (#98)
* Switch to using mqtt

* Better mqtt handling when connection is interrupted

* Get track info from the cloud when playlist or index changes

* Add additional helpers

* Dynamically handle devices and other enhancements

* 📝 Add docstrings to `mqtt`

Docstrings generation was requested by @natekspencer.

* https://github.com/natekspencer/hacs-oasis_mini/pull/98#issuecomment-3568450288

The following files were modified:

* `custom_components/oasis_mini/__init__.py`
* `custom_components/oasis_mini/binary_sensor.py`
* `custom_components/oasis_mini/button.py`
* `custom_components/oasis_mini/config_flow.py`
* `custom_components/oasis_mini/coordinator.py`
* `custom_components/oasis_mini/entity.py`
* `custom_components/oasis_mini/helpers.py`
* `custom_components/oasis_mini/image.py`
* `custom_components/oasis_mini/light.py`
* `custom_components/oasis_mini/media_player.py`
* `custom_components/oasis_mini/number.py`
* `custom_components/oasis_mini/pyoasiscontrol/clients/cloud_client.py`
* `custom_components/oasis_mini/pyoasiscontrol/clients/http_client.py`
* `custom_components/oasis_mini/pyoasiscontrol/clients/mqtt_client.py`
* `custom_components/oasis_mini/pyoasiscontrol/clients/transport.py`
* `custom_components/oasis_mini/pyoasiscontrol/device.py`
* `custom_components/oasis_mini/pyoasiscontrol/utils.py`
* `custom_components/oasis_mini/select.py`
* `custom_components/oasis_mini/sensor.py`
* `custom_components/oasis_mini/switch.py`
* `custom_components/oasis_mini/update.py`
* `update_tracks.py`

* Fix formatting in transport.py

* Replace tabs with spaces

* Use tuples instead of sets for descriptors

* Encode svg in image entity

* Fix iot_class

* Fix tracks list url

* Ensure update_tracks closes the connection

* Fix number typing and docstring

* Fix docstring in update_tracks

* Cache playlist based on type

* Fix formatting in device.py

* Add missing async_send_auto_clean_command to http client

* Propagate UnauthenticatedError from async_get_track_info

* Adjust exceptions

* Move create_client outside of try block in config_flow

* Formatting

* Address PR comments

* Formatting

* Add noqa: ARG001 on unused hass

* Close cloud/MQTT clients if initial coordinator refresh fails.

* Address PR again

* PR fixes

* Pass config entry to coordinator

* Remove async_timeout (thanks ChatGPT... not)

* Address PR

* Replace magic numbers for status code

* Update autoplay wording/ordering

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-24 01:09:23 -07:00

5.0 KiB

Release Buy Me A Coffee/Beer HACS Custom

Downloads Latest Downloads

Oasis Mini logo

Oasis Control for Home Assistant

Home Assistant integration for Oasis kinetic sand art devices.

Installation

There are two main ways to install this custom component within your Home Assistant instance:

  1. Using HACS (see https://hacs.xyz/ for installation instructions if you do not already have it installed):

    Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

    1. Use the convenient My Home Assistant link above, or, from within Home Assistant, click on the link to HACS
    2. Click on Integrations
    3. Click on the vertical ellipsis in the top right and select Custom repositories
    4. Enter the URL for this repository in the section that says Add custom repository URL and select Integration in the Category dropdown list
    5. Click the ADD button
    6. Close the Custom repositories window
    7. You should now be able to see the Oasis Mini card on the HACS Integrations page. Click on INSTALL and proceed with the installation instructions.
    8. Restart your Home Assistant instance and then proceed to the Configuration section below.
  2. Manual Installation:

    1. Download or clone this repository
    2. Copy the contents of the folder custom_components/oasis_mini into the same file structure on your Home Assistant instance
      • An easy way to do this is using the Samba add-on, but feel free to do so however you want
    3. Restart your Home Assistant instance and then proceed to the Configuration section below.

While the manual installation above seems like less steps, it's important to note that you will not be able to see updates to this custom component unless you are subscribed to the watch list. You will then have to repeat each step in the process. By using HACS, you'll be able to see that an update is available and easily update the custom component.

Configuration

Open your Home Assistant instance and start setting up a new integration.

There is a config flow for this Oasis Control integration. After installing the custom component, use the convenient My Home Assistant link above.

Alternatively:

  1. Go to Configuration->Integrations
  2. Click + ADD INTEGRATION to setup a new integration
  3. Search for Oasis Control and click on it
  4. You will be guided through the rest of the setup process via the config flow

Options

After this integration is set up, you can configure the integration to connect to the Kinetic Oasis cloud API. This will allow pulling in certain details (such as track name and image) that are otherwise not available.

Actions

The media player entity supports various actions, including managing the playlist queue. You can specify a track by its ID or name. If using a track name, it must match an entry in the tracks list. To specify multiple tracks, separate them with commas. An example is below:

action: media_player.play_media
target:
  entity_id: media_player.oasis_mini
data:
  media_content_id: 63, Turtle
  media_content_type: track
  enqueue: replace

Support Me

I'm not employed by Kinetic Oasis, and provide this custom component purely for your own enjoyment and home automation needs.

If you already own an Oasis device, found this integration useful and want to donate, consider sponsoring me on GitHub or buying me a coffee (or beer 🍺) instead by using the link below:

Buy Me a Coffee at ko-fi.com