Execute a command on receiving a mqtt message
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.py 634B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. import os
  4. import report
  5. __BASEPATH__ = os.path.abspath(os.path.dirname(__file__))
  6. MQTT_USER = "user"
  7. MQTT_PASS = "pass"
  8. MQTT_SERVER = "host"
  9. TOPIC = 'topic'
  10. PAYLOAD_KEY = 'key' # Give a key or None to compare plain DATA
  11. PAYLOAD_DATA = 'data' # Give data to compare or None if no comparison is needed
  12. COMMAND = "aplay %s/ring.wav -D plughw:UACDemoV10,0" % __BASEPATH__
  13. #
  14. # Logging
  15. #
  16. APP_NAME = "exec_command"
  17. LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout'
  18. LOGLVL = 'DEBUG'
  19. LOGHOST = 'cutelog'
  20. LOGPORT = 19996
  21. formatter = report.SHORT_FMT