ludeeus / ad-hacs Goto Github PK
View Code? Open in Web Editor NEWSample AppDaemon app for HACS.
License: MIT License
Sample AppDaemon app for HACS.
License: MIT License
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.