Closed smartlionglobal closed 11 months ago
Looks like you have an issue with your mqtt configuration, can you check the logs of mosquito?
hm.. seems nothing strange:
2023-10-04 17:22:16: New connection from 192.168.1.122:60904 on port 1883. 2023-10-04 17:22:16: New client connected from 192.168.1.122:60904 as DVAS_C4CC0C (p2, c1, k30, u'mqtt2'). 2023-10-04 17:31:20: Client DVAS_C4CC0C closed its connection. 2023-10-04 17:31:25: New connection from 192.168.1.122:53891 on port 1883. 2023-10-04 17:31:25: New client connected from 192.168.1.122:53891 as NSPanel1 (p2, c1, k30, u'mqtt2'). 2023-10-04 17:37:33: Client NSPanel1 closed its connection. 2023-10-04 17:37:38: New connection from 192.168.1.122:53698 on port 1883. 2023-10-04 17:37:38: New client connected from 192.168.1.122:53698 as NSPanel1 (p2, c1, k30, u'mqtt2'). 2023-10-04 17:45:02: Saving in-memory database to /data//mosquitto.db. 2023-10-04 17:53:14: Client NSPanel1 has exceeded timeout, disconnecting. 2023-10-04 18:15:03: Saving in-memory database to /data//mosquitto.db.
Restart appdaemon and check the logs, there should be an entry from appdaemon
hm... well if i restart appdeamon: 2023-10-04 18:32:37.793175 INFO AppDaemon: App initialization complete
and restart NSPanel
2023-10-04 18:33:13: New connection from 192.168.1.122:50307 on port 1883. 2023-10-04 18:33:13: New client connected from 192.168.1.122:50307 as NSPanel1 (p2, c1, k30, u'mqtt2').
But if I will go to integrations, and Tasmota device, if choose my NSPanel then on HA I can see button states change when pressing buttons on NSPanel - isn't that proof that mqtt is working somehow?
Ah, your identation is wrong.
plugins:
HASS:
type: hass
MQTT:
type: mqtt
namespace: mqtt
client_id: "appdaemon"
client_host: core-mosquitto.local.hass.io
client_port: 1883
client_user: "mqtt2"
client_password: "*****"
client_topics: NONE
You need to move the mqtt block to the right, so it's on the same level as HASS.
Impossible!!! I was looking on that from 1 month check in thousands different configurations. Thank you!!!
PROBLEM DESCRIPTION
I'm seeing the waiting for content message on the Panel and I'm unable to find the configuration issue.
[] I've double checked each step explained in the FAQ:
https://docs.nspanel.pky.eu/faq/#waiting-for-content-this-is-taking-longer-than-usual-on-the-screen
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
secrets: /config/secrets.yaml appdaemon: latitude: 52.379189 longitude: 4.899431 elevation: 2 time_zone: Europe/Amsterdam plugins: HASS: type: hass MQTT: type: mqtt namespace: mqtt client_id: "appdaemon" client_host: core-mosquitto.local.hass.io client_port: 1883 client_user: "mqtt2" client_password: "*****" client_topics: NONE http: url: http://127.0.0.1:5050 admin: api: hadashboard:
apps.yaml here:
nspanel-1: module: nspanel-lovelace-ui class: NsPanelLovelaceUIManager config: panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT" panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend" model: eu
Log output here: System: Home Assistant OS 10.5 (amd64 / qemux86-64) Home Assistant Core: 2023.9.0 Home Assistant Supervisor: 2023.09.2
Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.
s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service init-appdaemon: starting Looking in links: https://wheels.home-assistant.io/musllinux/ Collecting babel Downloading Babel-2.13.0-py3-none-any.whl (10.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 7.8 MB/s eta 0:00:00 Installing collected packages: babel Successfully installed babel-2.13.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv s6-rc: info: service init-appdaemon successfully started s6-rc: info: service appdaemon: starting s6-rc: info: service appdaemon successfully started s6-rc: info: service legacy-services: starting [17:34:16] INFO: Starting AppDaemon... s6-rc: info: service legacy-services successfully started 2023-10-04 17:34:19.874228 INFO AppDaemon: AppDaemon Version 4.4.2 starting 2023-10-04 17:34:19.874719 INFO AppDaemon: Python version is 3.11.5 2023-10-04 17:34:19.875131 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml 2023-10-04 17:34:19.875595 INFO AppDaemon: Added log: AppDaemon 2023-10-04 17:34:19.876036 INFO AppDaemon: Added log: Error 2023-10-04 17:34:19.876434 INFO AppDaemon: Added log: Access 2023-10-04 17:34:19.876950 INFO AppDaemon: Added log: Diag 2023-10-04 17:34:20.107009 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin 2023-10-04 17:34:20.315273 INFO HASS: HASS Plugin Initializing 2023-10-04 17:34:20.315691 WARNING HASS: ha_url not found in HASS configuration - module not initialized 2023-10-04 17:34:20.316000 INFO HASS: HASS Plugin initialization complete 2023-10-04 17:34:20.316600 INFO AppDaemon: Initializing HTTP 2023-10-04 17:34:20.317109 INFO AppDaemon: Using 'ws' for event stream 2023-10-04 17:34:20.321289 INFO AppDaemon: Starting API 2023-10-04 17:34:20.323420 INFO AppDaemon: Starting Admin Interface 2023-10-04 17:34:20.323921 INFO AppDaemon: Starting Dashboards 2023-10-04 17:34:20.338720 INFO HASS: Connected to Home Assistant 2023.9.0 2023-10-04 17:34:20.360270 INFO AppDaemon: App 'nspanel-1' added 2023-10-04 17:34:20.361870 INFO AppDaemon: Found 1 active apps 2023-10-04 17:34:20.362683 INFO AppDaemon: Found 0 inactive apps 2023-10-04 17:34:20.363389 INFO AppDaemon: Found 0 global libraries 2023-10-04 17:34:20.364113 INFO AppDaemon: Starting Apps with 1 workers and 1 pins 2023-10-04 17:34:20.365515 INFO AppDaemon: Running on port 5050 2023-10-04 17:34:20.399531 INFO HASS: Evaluating startup conditions 2023-10-04 17:34:20.409939 INFO HASS: Startup condition met: hass state=RUNNING 2023-10-04 17:34:20.410230 INFO HASS: All startup conditions met 2023-10-04 17:34:20.452138 INFO AppDaemon: Got initial state from namespace default 2023-10-04 17:34:22.372657 INFO AppDaemon: Scheduler running in realtime 2023-10-04 17:34:22.376206 INFO AppDaemon: Adding /config/appdaemon/apps to module import path 2023-10-04 17:34:22.376726 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui to module import path 2023-10-04 17:34:22.377136 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend to module import path 2023-10-04 17:34:22.377559 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations to module import path 2023-10-04 17:34:22.377921 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/backend to module import path 2023-10-04 17:34:22.378323 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/frontend to module import path 2023-10-04 17:34:22.387634 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/hello.py - ignoring 2023-10-04 17:34:22.388403 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py 2023-10-04 17:34:22.587602 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/config.py - ignoring 2023-10-04 17:34:22.589144 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/updater.py - ignoring 2023-10-04 17:34:22.590723 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/localization.py - ignoring 2023-10-04 17:34:22.592016 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py - ignoring 2023-10-04 17:34:22.593410 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/controller.py - ignoring 2023-10-04 17:34:22.594914 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/icons.py - ignoring 2023-10-04 17:34:22.596092 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/theme.py - ignoring 2023-10-04 17:34:22.597285 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/helper.py - ignoring 2023-10-04 17:34:22.598785 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/apis.py - ignoring 2023-10-04 17:34:22.600062 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py - ignoring 2023-10-04 17:34:22.601248 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/mqtt.py - ignoring 2023-10-04 17:34:22.602315 INFO AppDaemon: Loading app nspanel-1 using class NsPanelLovelaceUIManager from module nspanel-lovelace-ui 2023-10-04 17:34:22.604520 INFO AppDaemon: Calling initialize() for nspanel-1 2023-10-04 17:34:22.679961 INFO nspanel-1: Starting 2023-10-04 17:34:22.681058 WARNING AppDaemon: Unknown Plugin Configuration in get_plugin_api() 2023-10-04 17:34:22.683519 INFO nspanel-1: Input config: {'panelRecvTopic': 'tele/tasmota_your_mqtt_topic/RESULT', 'panelSendTopic': 'cmnd/tasmota_your_mqtt_topic/CustomSend', 'model': 'eu'} 2023-10-04 17:34:22.685376 INFO nspanel-1: Loaded config: {'panelRecvTopic': 'tele/tasmota_your_mqtt_topic/RESULT', 'panelSendTopic': 'cmnd/tasmota_your_mqtt_topic/CustomSend', 'updateMode': 'auto-notify', 'model': 'eu', 'sleepTimeout': 20, 'sleepBrightness': 20, 'screenBrightness': 100, 'defaultBackgroundColor': 'ha-dark', 'featureExperimentalSliders': False, 'sleepTracking': None, 'sleepTrackingZones': ['not_home', 'off'], 'sleepOverride': None, 'locale': 'en_US', 'timeFormat': '%H:%M', 'dateFormatBabel': 'full', 'dateAdditionalTemplate': '', 'timeAdditionalTemplate': '', 'dateFormat': '%A, %d. %B %Y', 'cards': [{'type': 'cardEntities', 'entities': [{'entity': 'iText.', 'name': 'MQTT Config successful', 'icon': 'mdi:check', 'color:': [0, 255, 0]}, {'entity': 'iText.', 'name': 'Continue adding', 'icon': 'mdi:arrow-right-bold'}, {'entity': 'iText.', 'name': 'cards to your', 'icon': 'mdi:card'}, {'entity': 'iText.', 'name': 'apps.yaml', 'icon': 'mdi:cog'}], 'title': 'Setup successful'}], 'screensaver': {'type': 'screensaver', 'entity': 'weather.example', 'weatherUnit': 'celsius', 'forecastSkip': 0, 'weatherOverrideForecast1': None, 'weatherOverrideForecast2': None, 'weatherOverrideForecast3': None, 'weatherOverrideForecast4': None, 'doubleTapToUnlock': False, 'alternativeLayout': False, 'defaultCard': None, 'key': 'screensaver'}, 'hiddenCards': []} 2023-10-04 17:34:22.687128 WARNING nspanel-1: ------------------------------------------------------------ 2023-10-04 17:34:22.687672 WARNING nspanel-1: Unexpected error running initialize() for nspanel-1 2023-10-04 17:34:22.688141 WARNING nspanel-1: ------------------------------------------------------------ 2023-10-04 17:34:22.690926 WARNING nspanel-1: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app await utils.run_in_executor(self, init) File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor response = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py", line 25, in initialize apis.mqtt_api.mqtt_publish(topic_send.replace("CustomSend", "GetDriverVersion"), "x") ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'mqtt_publish' 2023-10-04 17:34:22.692111 WARNING nspanel-1: ------------------------------------------------------------ 2023-10-04 17:34:22.693718 INFO AppDaemon: App initialization complete