Publishs ambient information to mqtt server
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

config.j2 801B

123456789101112131415161718192021222324252627282930313233343536
  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_SERVER = "{{ smart_sat_ambientinfo_hostname }}"
  7. MQTT_USER = "{{ smart_sat_ambientinfo_username }}"
  8. MQTT_PASS = "{{ smart_sat_ambientinfo_password }}"
  9. MQTT_TOPIC = "{{ smart_sat_ambientinfo_topic }}"
  10. DAT_PATH_DHT = None # os.path.join(__BASEPATH__, 'dat', 'dht')
  11. DAT_PATH_BMP = None # os.path.join(__BASEPATH__, 'dat', 'bmp')
  12. try:
  13. import board
  14. except ImportError:
  15. DHT_22_PORT = 4
  16. USE_PULSE_IO = True
  17. else:
  18. # DHT-PORT
  19. DHT_22_PORT = board.D4
  20. #
  21. # Logging
  22. #
  23. APP_NAME = "ambient_info"
  24. LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout'
  25. LOGLVL = 'WARNING'
  26. LOGHOST = 'cutelog'
  27. LOGPORT = 19996
  28. formatter = report.SHORT_FMT