aioshelly icon indicating copy to clipboard operation
aioshelly copied to clipboard

Add support for devices with multiple profiles

Open monester opened this issue 1 year ago • 8 comments

For example ShellyPlus 2PM can be configured as switch with 2 relays or a cover.

curl http://192.168.1.133/rpc/Shelly.ListProfiles

{
  "profiles": {
    "cover": {
      "components": [
        {
          "type": "input",
          "count": 2
        },
        {
          "type": "cover",
          "count": 1
        }
      ]
    },
    "switch": {
      "components": [
        {
          "type": "input",
          "count": 2
        },
        {
          "type": "switch",
          "count": 2
        }
      ]
    }
  }
}

monester avatar Nov 06 '23 16:11 monester

Sorry for late reply.

Library not loaded: /usr/local/lib/libgridstore.0.dylib

The libgridstore.0.dylib means GridDB C Client library.

Because the package for GridDB Python Client already includes C Client Library, so you don't need install GridDB C Client on MacOS.

But you must set the path installed GridDB C Client Libraries to DYLD_LIBRARY_PATH .

Example:
~/.pyenv/versions/3.6.9/lib/python3.6/site-packages/griddb/

To get the path/to/python/site-packages (after installing griddb_python):

$ python3 -m pip show griddb_python

It will display the output similar to:

Name: griddb-python
Version: 0.8.5
Summary: GridDB Python Client Library built using SWIG
Home-page: https://github.com/griddb/python_client/
Author: Katsuhiko Nonomura
Author-email: [[email protected]](mailto:[email protected])
License: Apache Software License
Location: /Users/xxx/.pyenv/versions/3.6.9/lib/python3.6/site-packages
Requires:
Required-by:

You can find the path/to/python/site-packages at Location: field.

Before running the program that use griddb_python, please export path/to/python/site-packages to DYLD_LIBRARY_PATH:

Example:
$ export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Users/xxx/.pyenv/versions/3.6.9/lib/python3.6/site-packages"

knonomura avatar Sep 29 '23 08:09 knonomura