Moin,
in diesem Sinne habe ich mir Blockly mal angesehen.
Ich schreibe dazu im Blockly Thread mal.
Gruß,
Hendrik
in diesem Sinne habe ich mir Blockly mal angesehen.
Ich schreibe dazu im Blockly Thread mal.
Gruß,
Hendrik
def to_bool(value, default='exception'): """ Converts a value to boolean. Raises exception if value is a string and can't be converted and if no default value is given Case is ignored. These string values are allowed True: 'True', "1", "true", "yes", "y", "t", "on" False: "", "0", "faLse", "no", "n", "f", "off" Non-string values are passed to bool constructor. :param value : value to convert :param default: optional, value to return if value can not be parsed, if default is not set this method throws an exception :type value: str, object, int, ... :return: True if cant be converted and is true, False otherwise. :rtype: bool """ if type(value) == type(''): if value.lower() in ("yes", "y", "true", "t", "1","on"): return True if value.lower() in ("no", "n", "false", "f", "0", "off", ""): return False if default=='exception': raise Exception('Invalid value for boolean conversion: ' + value) else: return default return bool(value)
def my_to_bool(self, value, attr='', default=False): try: result = self.to_bool(value) #das backend erbt vom smartplugin, das von der utils erbt! except: result = default self.logger.error("BackendServer: Invalid value '"+str(value)+"' configured for attribute "+attr+" in plugin.conf, using '"+str(result)+"' instead") return result [...] self.developer_mode = self.my_to_bool(developer_mode, 'developer_mode', False)
2017-03-09 15:37:30 INFO cherrypy.access.140031804390256 192.168.1.11 - - [09/Mar/2017:15:37:30] "GET /item_detail_json.html?item_path=zentral.verbrauchsdaten.energiewert.klaeranlage.verbrauch.stuendlich HTTP/1.1" 200 1099 "http://192.168.1.152:8383/items.html" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 2017-03-09 15:37:41 INFO cherrypy.access.140031804390256 192.168.1.11 - - [09/Mar/2017:15:37:41] "GET /item_detail_json.html?item_path=zentral.verbrauchsdaten.energiewert.klaeranlage HTTP/1.1" 200 932 "http://192.168.1.152:8383/items.html" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 2017-03-09 15:37:44 INFO cherrypy.access.140031804390256 192.168.1.11 - - [09/Mar/2017:15:37:44] "GET /item_detail_json.html?item_path=zentral.verbrauchsdaten.energiewert.klaeranlage.verbrauch HTTP/1.1" 200 696 "http://192.168.1.152:8383/items.html" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
[BackendServer] class_name = BackendServer class_path = plugins.backend #ip = xxx.xxx.xxx.xxx #port = 8383 #updates_allowed = True #threads = 8 #user = admin #password = very_secure_password #hashed_password = 1245a9633edf47b7091f37c4d294b5be5a9936c81c5359b16d1c4833729965663f1943ef240959c53803fedef7ac19bd59c66ad7e7092d7dbf155ce45884607d #language = en #developer_mode = on #pypi_timeout = 5
smarthome@sh:/usr/local/smarthome/bin$ python3 ./smarthome.py -d 2017-04-05 13:48:27 WARNING smarthome Main -------------------- In it smarthomeNG 1.2.0.man -------------------- -- smarthome.py:__init__:195 2017-04-05 13:48:28 WARNING __init__ Main -- __init__.py:__init__: 70 2017-04-05 13:48:28 WARNING __init__ Main +======================== ====================================================+ -- __init__.py:__init__:71 2017-04-05 13:48:28 WARNING __init__ Main ! The VISU plugin is depr ecated ! -- __init__.py:__init__:72 2017-04-05 13:48:28 WARNING __init__ Main ! - Please switch to the VISU_WEBSOCKET and VISU_SMARTVISU plugins ! -- __init__.py:__init__:73 2017-04-05 13:48:28 WARNING __init__ Main ! - The old VISU plugin w ill be removed in the upcoming smarthomeNG v1.3 ! -- __init__.py:__init__:74 2017-04-05 13:48:28 WARNING __init__ Main ! ! -- __init__.py:__init__:75 2017-04-05 13:48:28 WARNING __init__ Main ! Please read: ! -- __init__.py:__init__:76 2017-04-05 13:48:28 WARNING __init__ Main ! https://github.com/sm arthomeNG/smarthome/wiki/Visu_Unterstützung_in_v1.2 ! -- __init__.py:__init__:77 2017-04-05 13:48:28 WARNING __init__ Main +======================== ====================================================+ -- __init__.py:__init__:78 2017-04-05 13:48:28 WARNING __init__ Main -- __init__.py:__init__: 79 2017-04-05 13:48:30 WARNING item system.datum_uhrzeit.sonne.position It em system.datum_uhrzeit.sonne.position: value (3.404276132583618, 0.826763987541 1987) does not match type num. Via Init None -- item.py:__update:358 2017-04-05 13:48:30 WARNING item Novelan.temperatur.aussen.max Item Nov elan.temperatur.aussen.max: problem evaluating sh.Novlean.temperatur.aussen.db(' max', '24h'): 'SmartHome' object has no attribute 'Novlean' -- item.py:__run_eva l:342 2017-04-05 13:48:30 WARNING logic Main Garage_Lueften: Could not access logic file (/usr/local/smarthome/logics/garage_lueften.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 ERROR logic Main Exception: inconsistent u se of tabs and spaces in indentation (haustuer_lauten.py, line 8) -- logic.py:ge nerate_bytecode:121 Traceback (most recent call last): File "/usr/local/smarthome/lib/logic.py", line 119, in generate_bytecode self.bytecode = compile(code, self.filename, 'exec') File "/usr/local/smarthome/logics/haustuer_lauten.py", line 8 if sh.enigma2.vusolo2.e2instandby() == 0: ^ TabError: inconsistent use of tabs and spaces in indentation 2017-04-05 13:48:30 WARNING logic Main Balkon_rechts_Tuer_Sperre : Could not access logic file (/usr/local/smarthome/logics/balkon-tuer_rechts.py ) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main Kueche_Tuer_Sperre: Could not access logic file (/usr/local/smarthome/logics/kueche-tuer.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main TagNacht_GangOG: Could no t access logic file (/usr/local/smarthome/logics/dimmen_TagNacht_Gang_OG.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main Balkon_links_Tuer_Sperre: Could not access logic file (/usr/local/smarthome/logics/balkon-tuer_links.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main WZ_Tuer_Sperre: Could not access logic file (/usr/local/smarthome/logics/wz-tuer.py) => ignoring. -- logi c.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main WZ_TVSAT_EinAus: Could no t access logic file (/usr/local/smarthome/logics/tv_und_sat_ein.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main Schrankraum_Tuer_Sperre: Could not access logic file (/usr/local/smarthome/logics/schrankraum-tuer.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main Alarm_ausloesen: Could no t access logic file (/usr/local/smarthome/logics/alarmanlage.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main WZ_Licht_bei_TV: Could no t access logic file (/usr/local/smarthome/logics/tv_licht-rollo.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main EZ_Tuer_Sperre: Could not access logic file (/usr/local/smarthome/logics/ez-tuer.py) => ignoring. -- logi c.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main Terrasse_Licht_BWM_AlarmO ffOn: Could not access logic file (/usr/local/smarthome/logics/bwm-terrasse_terr assenlicht.py) => ignoring. -- logic.py:generate_bytecode:114 2017-04-05 13:48:30 WARNING logic Main TagNacht_WCOG: Could not access logic file (/usr/local/smarthome/logics/dimmen_TagNacht_WC_OG.py) => igno ring. -- logic.py:generate_bytecode:114 [05/Apr/2017:13:48:30] ENGINE Bus STARTING 2017-04-05 13:48:30 INFO _cplogging BackendServer [05/Apr/2017:13:48:30] E NGINE Bus STARTING -- _cplogging.py:error:219 CherryPy Checker: dir is an absolute path, even though a root is provided. section: [/static] root: '/usr/local/smarthome/plugins/backend' dir: '/usr/local/smarthome/plugins/backend/static'
2017-04-05 18:37:20 DEBUG item Main Item EG.deckenlicht_buero = False via Visu 10.0.0.10:56757 None -- item.py:__update:374
10.0.0.10 - - [05/Apr/2017:18:38:07] "GET /item_change_value.html?item_path=EG.deckenlicht_buero&value=false HTTP/1.1" 200 - "http://10.0.0.6:8383/items.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0" 2017-04-05 18:38:07 INFO _cplogging CP Server Thread-8 10.0.0.10 - - [05/Apr/2017:18:38:07] "GET /item_change_value.html?item_path=EG.deckenlicht_buero&value=false HTTP/1.1" 200 - "http://10.0.0.6:8383/items.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0" -- _cplogging.py:access:285 10.0.0.10 - - [05/Apr/2017:18:38:07] "GET /item_detail_json.html?item_path=EG.deckenlicht_buero HTTP/1.1" 200 776 "http://10.0.0.6:8383/items.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0" 2017-04-05 18:38:07 INFO _cplogging CP Server Thread-8 10.0.0.10 - - [05/Apr/2017:18:38:07] "GET /item_detail_json.html?item_path=EG.deckenlicht_buero HTTP/1.1" 200 776 "http://10.0.0.6:8383/items.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0" -- _cplogging.py:access:285
Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.
Kommentar