logging adjusted
This commit is contained in:
@ -25,7 +25,7 @@ data:
|
||||
MAINTENANCE_TEMPERATURE: "30.0"
|
||||
BOXES: |
|
||||
{
|
||||
"box1": {
|
||||
"patty": {
|
||||
"label": "patty",
|
||||
"windows": [
|
||||
{ "topic": "homegear/instance1/plain/18/1/STATE", "label": "Garten rechts" },
|
||||
@ -33,7 +33,7 @@ data:
|
||||
],
|
||||
"output_topic": "heating/homegear/instance1/set/39/1/SET_TEMPERATURE"
|
||||
},
|
||||
"box2": {
|
||||
"kueche": {
|
||||
"label": "kueche",
|
||||
"windows": [
|
||||
{ "topic": "homegear/instance1/plain/37/1/STATE", "label": "Garten Fenster" },
|
||||
@ -43,27 +43,27 @@ data:
|
||||
],
|
||||
"output_topic": "heating/homegear/instance1/set/40/1/SET_TEMPERATURE"
|
||||
},
|
||||
"box3": {
|
||||
"bad_oben": {
|
||||
"label": "bad_oben",
|
||||
"windows": [
|
||||
],
|
||||
"output_topic": "heating/homegear/instance1/set/41/1/SET_TEMPERATURE"
|
||||
},
|
||||
"box4": {
|
||||
"schlafzimmer": {
|
||||
"label": "schlafzimmer",
|
||||
"windows": [
|
||||
{ "topic": "homegear/instance1/plain/52/1/STATE", "label": "Strasse" }
|
||||
],
|
||||
"output_topic": "heating/homegear/instance1/set/42/1/SET_TEMPERATURE"
|
||||
},
|
||||
"box5": {
|
||||
"wolfgang": {
|
||||
"label": "wolfgang",
|
||||
"windows": [
|
||||
{ "topic": "homegear/instance1/plain/24/1/STATE", "label": "Garten" }
|
||||
],
|
||||
"output_topic": "heating/homegear/instance1/set/43/1/SET_TEMPERATURE"
|
||||
},
|
||||
"box6": {
|
||||
"esszimmer": {
|
||||
"label": "esszimmer",
|
||||
"windows": [
|
||||
{ "topic": "homegear/instance1/plain/26/1/STATE", "label": "Strasse rechts" },
|
||||
@ -71,7 +71,7 @@ data:
|
||||
],
|
||||
"output_topic": "heating/homegear/instance1/set/45/1/SET_TEMPERATURE"
|
||||
},
|
||||
"box7": {
|
||||
"wohnzimmer": {
|
||||
"label": "wohnzimmer",
|
||||
"windows": [
|
||||
{ "topic": "homegear/instance1/plain/28/1/STATE", "label": "Garten rechts" },
|
||||
@ -79,7 +79,7 @@ data:
|
||||
],
|
||||
"output_topic": "heating/homegear/instance1/set/46/1/SET_TEMPERATURE"
|
||||
},
|
||||
"box8": {
|
||||
"bad_unten": {
|
||||
"label": "bad_unten",
|
||||
"windows": [
|
||||
{ "topic": "homegear/instance1/plain/44/1/STATE", "label": "Strasse" }
|
||||
|
@ -35,8 +35,8 @@ def process_message(box_name, topic_key, payload, context):
|
||||
try:
|
||||
box = context['boxes'][box_name]
|
||||
local_context = box['context']
|
||||
logger.info(f"Local context before: {local_context}")
|
||||
logger.info(f"[{box_name}, {box['label']}] Processing message for '{topic_key}': {payload}")
|
||||
logger.info(f"[{box_name}] Local context before: {local_context}")
|
||||
logger.info(f"[{box_name}] Processing message for '{topic_key}': {payload}")
|
||||
|
||||
match topic_key.split('/'):
|
||||
case [ primary_key, sub_key ] if primary_key == 'window':
|
||||
@ -60,7 +60,7 @@ def process_message(box_name, topic_key, payload, context):
|
||||
context['client'].publish(publish_topic, result_message)
|
||||
logger.info(f"[{box_name}] Result published on '{publish_topic}': {status} {result_message}")
|
||||
|
||||
logger.info(f"Local context after: {local_context}")
|
||||
logger.info(f"[{box_name}] Local context after: {local_context}")
|
||||
except Exception as e:
|
||||
logger.error(f"[{box_name}] Error processing '{topic_key}': {e}")
|
||||
|
||||
|
Reference in New Issue
Block a user