Browse Source

- removed json dependancy, as it is not used
- added "-d" switch for debug mode

FloKra 4 years ago
parent
commit
8df46ebd02
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/cul2mqtt.py

+ 4 - 2
src/cul2mqtt.py

@@ -12,7 +12,6 @@ import time
 from time import sleep
 import datetime
 import paho.mqtt.client as mqtt
-import json
 import os
 
 version = 0.1
@@ -37,6 +36,9 @@ if len(sys.argv) >= 2:
         verbose = False
     elif sys.argv[1] == "-v":
         verbose = True
+    elif sys.argv[1] == "-d"
+        debug = True
+        verbose = True
 
 # serial (USB) CUL device
 receive_from_serial_cul = True
@@ -83,7 +85,7 @@ def no_duplicates_constructor(loader, node, deep=False):
 
 yaml.add_constructor(yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, no_duplicates_constructor)
 
-print("CULagent v" + str(version))
+print("CUL2MQTT v" + str(version))
 print("=====================================")
 
 try: