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 489B

1234567891011121314151617181920212223242526
  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 = b'payload'
  11. COMMAND = "aplay %s/ring.wav -D plughw:UACDemoV10,0" % __BASEPATH__
  12. #
  13. # Logging
  14. #
  15. APP_NAME = "exec_command"
  16. LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout'
  17. LOGLVL = 'DEBUG'
  18. LOGHOST = 'cutelog'
  19. LOGPORT = 19996
  20. formatter = report.SHORT_FMT