12345678910111213141516171819202122232425262728293031 |
- import config
- import function
- import logging
- import mqtt
- import report
- import time
-
- logger = logging.getLogger(config.APP_NAME)
-
- # TODO: Change Nodered topics to videv
- # TODO: Extend virtual devices
- # * All Off
- # * ...
- # TODO: Remove gui from rooms and devices
- # TODO: Rework devices to base.mqtt (pack -> set, ...)
- # TODO: Implement handling of warnings (videv element to show in webapp?)
-
-
- if __name__ == "__main__":
- if config.DEBUG:
- report.appLoggingConfigure(None, None, ((config.APP_NAME, logging.DEBUG), ), fmt=report.SHORT_FMT, host='localhost', port=19996)
- else:
- report.stdoutLoggingConfigure(((config.APP_NAME, logging.INFO), ), report.SHORT_FMT)
- #
- mc = mqtt.mqtt_client(host=config.MQTT_SERVER, port=config.MQTT_PORT, username=config.MQTT_USER,
- password=config.MQTT_PASSWORD, name=config.APP_NAME)
-
- func = function.all_functions(mc)
-
- while (True):
- time.sleep(1)
|