You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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:
resource: http://192.168.31.6:5050/api/appdaemon/pixelit_sensor
method: POST
headers:
Content-Type: "application/json"
name: Pixelit
value_template: >
{{ value_json.state }}
scan_interval: 300
notify:
platform: rest
method: POST_JSON
headers:
Content-Type: "application/json"
resource: http://192.168.31.6:5050/api/appdaemon/pixelit_add
title_param_name: "title"
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:
name: pixelit_sleepmode
resource: http://192.168.31.6:5050/api/appdaemon/pixelit_sleepmode
body_on: '{"sleepMode": "true"}'
body_off: '{"sleepMode": "false"}'
is_on_template: '{{ value_json.sleepMode == True }}'
headers:
Content-Type: application/json
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
The text was updated successfully, but these errors were encountered: