TheAgentK / tuya-mqtt

Nodejs-Script to combine tuyaapi and openhab via mqtt
MIT License
173 stars 81 forks source link

Script to merge device additions and changes into devices.conf #49

Closed dkrahmer closed 3 years ago

tsightler commented 3 years ago

Thanks for the PR, looks nice and a feature I had been considering, although I had envisioned a little different approach like allowing the user to select the device type for new devices and perhaps even trying to guess the proper device, although that is not that useful right now since it only currently supports a handful of devices without a custom template. Although these could still be added in the future with your approach, so I like it.

Also, thanks a TON for all of the little fixes in the docs. I threw the docs together very quickly to try to get this project out the door before I hit a window where I wouldn't have much time to work on this and I knew they were in rough shape and needed a ton of corrections and improvements. I really appreciate it.

I have a small backlog of minor fixes and improvements which I'm hoping to publish this weekend as a 3.0.1 version so I'll try to merge this with it and get it out. Thanks again!

dkrahmer commented 3 years ago

@tsightler Thanks for the feedback. I have made some other changes including multi-switch support, device type guessing, mdl guessing, and configurable default device properties. The guessing logic and default properties help reduce the size of the devices.config file by eliminating repeated boilerplate settings for each device. I am planning to submit another PR once I test a bit more. This is the multi-switch PR on my fork if you want to take a look: https://github.com/dkrahmer/tuya-mqtt/pull/2/files

tsightler commented 3 years ago

Interesting, while I see what you are doing my plan to support multi-switch devices was to follow the same config method as homebridge-tuya since that was already the inspiration for the config style used here. Admittedly the overall approaches are similar and happy to discuss the pros/cons of the two approached in another issue or PR.