Coder Social home page Coder Social logo

ad-hacs's Introduction

404

ad-hacs's People

Contributors

ludeeus avatar

Stargazers

 avatar

Watchers

 avatar

ad-hacs's Issues

how to create pixelit two iot device

hello
I try to write to two devices as follows.
The following returns an error.
How to achieve what I want to do.

AppDaemon config.
pixelit_1:
module: pixelit
class: pixelit
ip: 192.168.31.185
path: "/config/pixelit/"
entity_id: sensor.pixelit_1
debug: False
pixelit_2:
module: pixelit
class: pixelit
ip: 192.168.31.86
path: "/config/pixelit/"
entity_id: sensor.pixelit_2
debug: False

ha config
sensor:

notify:

rest_command:
pixelit_delete:
url: http://192.168.31.6:5050/api/appdaemon/pixelit_delete
method: POST
payload: '{"title": "{{ title }}"}'
content_type: 'application/json; charset=utf-8'

pixelit_update:
url: http://192.168.31.6:5050/api/appdaemon/pixelit_update
method: POST
payload: '{"title": "{{ title }}","message": "{{ message }}"}'
content_type: 'application/json; charset=utf-8'

pixelit_next:
url: http://192.168.31.6:5050/api/appdaemon/pixelit_next
method: POST
payload: '{}'
content_type: 'application/json; charset=utf-8'

switch:

2023-02-28 09:51:43.289580 WARNING pixelit_2: ------------------------------------------------------------
2023-02-28 09:51:43.289835 WARNING pixelit_2: Unexpected error running initialize() for pixelit_2
2023-02-28 09:51:43.290016 WARNING pixelit_2: ------------------------------------------------------------
2023-02-28 09:51:43.292646 WARNING pixelit_2: Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 165, in initialize_app
await utils.run_in_executor(self, init)
File "/usr/lib/python3.10/site-packages/appdaemon/utils.py", line 337, in run_in_executor
response = future.result()
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/appdaemon/apps/PixelIt-hacs/pixelit.py", line 159, in initialize
self.register_endpoint(self.rest_add, "pixelit_add")
File "/usr/lib/python3.10/site-packages/appdaemon/utils.py", line 226, in inner_sync_wrapper
f = run_coroutine_threadsafe(self, coro(self, *args, **kwargs))
File "/usr/lib/python3.10/site-packages/appdaemon/utils.py", line 346, in run_coroutine_threadsafe
result = future.result(self.AD.internal_function_timeout)
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/site-packages/appdaemon/adapi.py", line 1164, in register_endpoint
return await self.AD.http.register_endpoint(callback, endpoint, self.name, **kwargs)
File "/usr/lib/python3.10/site-packages/appdaemon/http.py", line 900, in register_endpoint
raise AttributeError(f"The given endpoint '{endpoint}' already exists and used by {app_name}")
AttributeError: The given endpoint 'pixelit_add' already exists and used by pixelit_1

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.