Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Fixes and Improvements ("Named MQTT Topics") #12

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

realdognose
Copy link

@realdognose realdognose commented Jan 14, 2025

Hey,

I've made some changes and improvements:

  • Fixed the already discussed issue with DPTArray (that's conflicting now)
  • Updated the example configuration file.
  • Introduced a "named override" for values on mqtt.
  • Introduced a (global) mqtt-retain and mqtt-resend-retain flag.
  • Added a builtin log-rotation
  • Modified the run file to use all absolute paths.

Biggest change to allow for "regular mqtt names" is quite handy i'd say, as this matches more the character of mqtt over using 1/3/5. The named override can be defined for any config item individually, not mandatory.

image

Example config of the expanded topics:

{"override_topic": "Og/SleepingRoom/Light/DimValue",        "address": "1/2/12",    "type": "DPTScaling",    "mqtt_subscribe": true	   },
{"override_topic": "Og/SleepingRoom/Light/Cmd",             "address": "1/2/11",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/SleepingRoom/LightWall/State",       "address": "10/2/5",   "type": "DPTBinary"  							   },
{"override_topic": "Og/SleepingRoom/LightWall/Cmd",         "address": "1/2/5",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/SleepingRoom/Blinds/Position",       "address": "2/2/6",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/SleepingRoom/Blinds/Angle",          "address": "2/2/7",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/SleepingRoom/Heating/State",         "address": "4/2/70",    "type": "DPTScaling" 							   },
{"override_topic": "Og/SleepingRoom/Heating/Current",       "address": "4/2/54",    "type": "DPTTemperature" 						   },
{"override_topic": "Og/SleepingRoom/Heating/Target",        "address": "4/2/101",    "type": "DPTTemperature" , "mqtt_subscribe": true   },

{"override_topic": "Og/Wardrobe/Light/State",       		"address": "10/2/6",    "type": "DPTBinary"  							   },
{"override_topic": "Og/Wardrobe/Light/Cmd",         		"address": "1/2/6",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/Wardrobe/Blinds/Position",       "address": "2/2/10",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Wardrobe/Blinds/Angle",          "address": "2/2/11",     "type": "DPTScaling",  "mqtt_subscribe": true       },

{"override_topic": "Og/Bathroom/BlindsVertical/Position",       "address": "2/2/18",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Bathroom/BlindsVertical/Angle",          "address": "2/2/19",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Bathroom/BlindsHorizontal/Position",       "address": "2/2/22",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Bathroom/BlindsHorizontal/Angle",          "address": "2/2/23",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Bathroom/Light/State",       			"address": "10/2/7",    "type": "DPTBinary"  							   },
{"override_topic": "Og/Bathroom/Light/Cmd",         			"address": "1/2/7",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/Bathroom/LightTub/DimValue",    			"address": "1/2/15",    "type": "DPTScaling",  	"mqtt_subscribe": true	   },
{"override_topic": "Og/Bathroom/LightTub/Cmd",         	   		"address": "1/2/14",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/Bathroom/Heating/State",         "address": "4/2/73",    "type": "DPTScaling" 							   },
{"override_topic": "Og/Bathroom/Heating/Current",       "address": "4/2/53",    "type": "DPTTemperature" 						   },
{"override_topic": "Og/Bathroom/Heating/Target",        "address": "4/2/103",    "type": "DPTTemperature" , "mqtt_subscribe": true   },

{"override_topic": "Og/Loo/Light/State",       			"address": "10/2/10",    "type": "DPTBinary"  							   },
{"override_topic": "Og/Loo/Light/Cmd",         			"address": "1/2/10",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/Loo/Blinds/Position",       "address": "2/2/14",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Loo/Blinds/Angle",          "address": "2/2/15",     "type": "DPTScaling",  "mqtt_subscribe": true       },

{"override_topic": "Og/Stairway/LightCeiling/State",       			"address": "10/2/3",    "type": "DPTBinary"  							   },
{"override_topic": "Og/Stairway/LightCeiling/Cmd",         			"address": "1/2/3",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/Stairway/LightSpots/State",       			"address": "10/2/4",    "type": "DPTBinary"  							   },
{"override_topic": "Og/Stairway/LightSpots/Cmd",         			"address": "1/2/4",    "type": "DPTBinary", 	"mqtt_subscribe": true     },
{"override_topic": "Og/Stairway/BlindsBig/Position",       "address": "2/2/2",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Stairway/BlindsBig/Angle",          "address": "2/2/3",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Stairway/BlindsRooftop/Position",       "address": "2/2/26",     "type": "DPTScaling",  "mqtt_subscribe": true       },
{"override_topic": "Og/Stairway/BlindsRooftop/Angle",          "address": "2/2/27",     "type": "DPTScaling",  "mqtt_subscribe": true       }

@realdognose realdognose changed the title Some Fixes and Improvements Some Fixes and Improvements ("Named MQTT Keys") Jan 14, 2025
@realdognose realdognose changed the title Some Fixes and Improvements ("Named MQTT Keys") Some Fixes and Improvements ("Named MQTT Topics") Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant