Execute a command on receiving a mqtt message
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

config.py 471B

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 ring.wav -D plughw:UACDemoV10,0"
  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