There has been a lot of discussion lately about the changes to the behavior of blinds in the latest beta version. Inverted blinds don't exist anymore, they have now been replaced by options where you can choose to invert the state (Open/Close) or position (slider). Also the command to open and close blinds are now Open and Close instead of On and Off (even though On and Off still works, but the other way around).
As some of you might have noticed, I posted a quick fix on
https://github.com/domoticz/domoticz/issues/5371 for blinds which works as long as you don't invert the state or position. I've been looking at the code today to see if a solution can be found (as I don't see a lot of activity on the hombebridge-edomoticz github page).
I was able to get all blind types working for the new blind behavior, as well as the old ones. I didn't change anything for venetian blinds, as I don't have any to test (but I suppose it should work). There is also a new type of blinds in domoticz (Blinds + Stop) that was previously not supported. They are also blinds with position, but just have a stop button. Those blind types are automatically created when using MQTT Autodiscovery, so I added support for them too (just not the stop button, as that's not supported by homebridge as far as I know).
When using the new type of blinds, the Open or Close command will be sent. For older ones, it's still On or Off. The State and Position will be automatically recalculated to be reflected correctly in the home app.
I had to add an option the homebridge-edomoticz settings where you have to set if you use legacy blinds or not (this was the easiest way without having to create a new function). It should be left to 0 when using a recent beta, or set to 1 if using an older version.

- homebridge-settings.JPG (43.14 KiB) Viewed 7280 times
If some of you could test if everything works as expected, that would be nice. In attachment to this post you can find the 3 modified files.
config.schema.json - Should be placed in /homebridge/node_modules/homebridge-edomoticz/
constants.js and domoticz_accessory.js - Should be placed in /homebridge/node_modules/homebridge-edomoticz/lib
Don't forget to make a backup of your old files first!!!
PS: Feel free to make adjustments or propose improvements if you have any knowledge of javascript. Also report any bugs with as much details as you can. If it works as expected, we can always create a pull request, in the hope it will be accepted (but I honestly don't know how that all works).
Edit: Deleted files as this pull request has been merged. Update hombridge edomoticz to use these new features.