Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRITICAL MQTT: There was an error while processing an MQTT message: <class 'IndexError'> list index out of range #65

Open
Shaun-Harrison opened this issue Oct 7, 2020 · 1 comment

Comments

@Shaun-Harrison
Copy link

Hello

First time using appdaemon and monitor together, currently running the old monitor as a service on rpi's around the house, so getting myself up to speed

I've stopped all the current monitor services so that I can get this working on my RPI4 first before looking at using the other RPI's around the house

So this is my appdaemon.yaml

appdaemon:
  time_zone: Europe/London
  latitude: ##
  longitude: ##
  elevation: ##
  plugins:
    HASS:
      type: hass
      namespace: HomeAssistant
      ha_url: ##
      token: ##
    MQTT:
       type: mqtt
       namespace: mqtt
       client_host: ##
       verbose: True
http:
  url: http://raspberrypi:5050
admin:
api:
hadashboard:

And my apps.yaml
home_presence_app:

  module: home_presence_app
  class: HomePresenceApp
  plugin:
    - HASS
    - MQTT
  known_devices:
    - ## Pixel3
    - ## HuaweiP
  depart_check_time: 30
  depart_scans: 3
  minimum_confidence: 60
  not_home_timeout: 15
  system_check: 30
  system_timeout: 60
  log_level: DEBUG

However, when running I'm constantly getting this errror

2020-10-07 11:57:18.172918 INFO MQTT: Unable to decode MQTT message
2020-10-07 11:57:18.252249 INFO AppDaemon: Scheduler running in realtime
2020-10-07 11:57:18.300100 INFO AppDaemon: Adding /conf/apps to module import path
2020-10-07 11:57:18.301460 INFO AppDaemon: Adding /conf/apps/home_presence_app to module import path
2020-10-07 11:57:18.306070 INFO AppDaemon: Loading App Module: /conf/apps/home_presence_app/home_presence_app.py
2020-10-07 11:57:18.316435 INFO AppDaemon: Initializing app home_presence_app using class HomePresenceApp from module home_presence_app
2020-10-07 11:57:18.330237 DEBUG home_presence_app: set state: monitor.monitor_state, {'state': 'idle', 'attributes': {'locations': [], 'version': '2.3.4', 'nodes': 0, 'online_nodes': [], 'offline_nodes': [], 'friendly_name': 'Monitor System State'}, 'replace': True}
2020-10-07 11:57:18.331515 WARNING home_presence_app: home_presence_app: Entity monitor.monitor_state not found in namespace mqtt
2020-10-07 11:57:18.333222 INFO AppDaemon: home_presence_app: Entity monitor.monitor_state created in namespace: mqtt
2020-10-07 11:57:18.337363 DEBUG home_presence_app: Calling listen_state for home_presence_app
2020-10-07 11:57:18.351326 INFO home_presence_app: Previous message repeated 1 times
2020-10-07 11:57:18.352020 DEBUG home_presence_app: call_service: mqtt/publish, {'topic': 'monitor/state', 'payload': '{"locations": [], "version": "2.3.4", "nodes": 0, "online_nodes": [], "offline_nodes": [], "last_changed": "2020-10-07T11:57:18+01:00", "state": "idle"}'}
2020-10-07 11:57:18.519552 WARNING home_presence_app: No Gateway Sensors specified, Monitor-APP will run Arrive and Depart Scan every 2 minutes. Please specify Gateway Sensors for a better experience
2020-10-07 11:57:18.522568 DEBUG home_presence_app: Registering run_every starting 2020-10-07 11:57:19.521041+01:00 in 60s intervals for home_presence_app
2020-10-07 11:57:18.526036 DEBUG home_presence_app: Registering run_every starting 2020-10-07 11:57:20.524758+01:00 in 60s intervals for home_presence_app
2020-10-07 11:57:18.529554 DEBUG home_presence_app: Registering run_every starting 2020-10-07 11:57:19.528183+01:00 in 30s intervals for home_presence_app
2020-10-07 11:57:18.532206 DEBUG home_presence_app: Calling listen_event for home_presence_app
2020-10-07 11:57:18.535054 DEBUG home_presence_app: Listening on MQTT Topic monitor
2020-10-07 11:57:18.536294 DEBUG home_presence_app: Calling listen_event for home_presence_app
2020-10-07 11:57:18.538286 DEBUG home_presence_app: Registering run_in in 0 seconds for home_presence_app
2020-10-07 11:57:18.540171 DEBUG home_presence_app: register_service: monitor/remove_known_device, {}
2020-10-07 11:57:18.541716 DEBUG home_presence_app: register_service: monitor/run_arrive_scan, {}
2020-10-07 11:57:18.542401 DEBUG home_presence_app: register_service: monitor/run_depart_scan, {}
2020-10-07 11:57:18.543175 DEBUG home_presence_app: register_service: monitor/run_rssi_scan, {}
2020-10-07 11:57:18.543900 DEBUG home_presence_app: register_service: monitor/run_node_command, {}
2020-10-07 11:57:18.544653 DEBUG home_presence_app: register_service: monitor/restart_device, {}
2020-10-07 11:57:18.545372 DEBUG home_presence_app: register_service: monitor/reload_device_state, {}
2020-10-07 11:57:18.546085 DEBUG home_presence_app: register_service: monitor/load_known_devices, {}
2020-10-07 11:57:18.546820 DEBUG home_presence_app: register_service: monitor/clear_location_entities, {}
2020-10-07 11:57:18.547599 DEBUG home_presence_app: register_service: monitor/clean_devices, {}
2020-10-07 11:57:18.551522 INFO AppDaemon: App initialization complete
2020-10-07 11:57:19.011956 DEBUG home_presence_app: Registering run_in in 45 seconds for home_presence_app
2020-10-07 11:57:19.018543 DEBUG home_presence_app: Registering run_in in 105 seconds for home_presence_app
2020-10-07 11:57:19.966267 CRITICAL MQTT: There was an error while processing an MQTT message: <class 'IndexError'> list index out of range
2020-10-07 11:57:20.017156 DEBUG home_presence_app: call_service: mqtt/publish, {'topic': 'monitor/scan/arrive', 'payload': ''}
2020-10-07 11:57:20.040131 DEBUG home_presence_app: call_service: mqtt/publish, {'topic': 'monitor/echo', 'payload': ''}
2020-10-07 11:57:20.070976 DEBUG home_presence_app: monitor/scan/arrive payload:
2020-10-07 11:57:20.090764 DEBUG home_presence_app: monitor/echo payload:
2020-10-07 11:57:20.094462 DEBUG home_presence_app: Echo received from unknown:
2020-10-07 11:57:21.023401 DEBUG home_presence_app: Registering run_in in 30 seconds for home_presence_app
2020-10-07 11:57:27.915413 INFO MQTT: Previous message repeated 7 times
2020-10-07 11:57:27.916192 CRITICAL MQTT: There was an error while processing an MQTT message: <class 'IndexError'> list index out of range
2020-10-07 11:57:38.055923 INFO MQTT: Previous message repeated 11 times
2020-10-07 11:57:38.056810 CRITICAL MQTT: There was an error while processing an MQTT message: <class 'IndexError'> list index out of range
2020-10-07 11:57:48.224286 INFO MQTT: Previous message repeated 13 times
2020-10-07 11:57:48.224993 CRITICAL MQTT: There was an error while processing an MQTT message: <class 'IndexError'> list index out of range

I cannot find any reason why the critical error is showing, but nothing seems to be working so guessing this is the first issue to tackle

@Odianosen25
Copy link
Owner

Hello @Shaun-Harrison,

First apologies for the late response. The issue might be how the message is sent from your node. Please ensure that the nodes don't use weird characters in the topic name or something.

I also know the error logs in the MQTT plugin is not so greate so will need to create better ways of outputting the errors so its clearer. But if your issue has been fixed, cool.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants