homebridge-tuya icon indicating copy to clipboard operation
homebridge-tuya copied to clipboard

Adding SimpleBlinds3Accessory for control of roller motor shades

Open samsawyer opened this issue 3 years ago • 9 comments

@iRayanKhan — here's a PR for control of a variety of roller shade motors that report position to Tuya. I set up this branch from the current 2.0.1 release because I didn't have time to figure out what all had changed in the current beta work, though I did see that someone had done work to merge SimpleBlinds and SimpleBlinds2 — so if you'd like me to rename this some other way than SimpleBlinds3, please let me know.

samsawyer avatar May 15 '21 18:05 samsawyer

Thank you @samsawyer,

If you can rebase off main, that would be great.

Also, to merge the blind/shutter types, the GarageDoorAccessory file shows we distinguish in the config manufacturer characteristic what device type you want the plugin to use. So 'simpleBlinds3' in the manufacturer option would use that logic.

iRayanKhan avatar May 15 '21 18:05 iRayanKhan

Ok, I will look at that over the next few days — you want me to rebase and submit an entirely new PR, or is there some way to update this one?

And does that mean you want the actual new logic integrated into SimpleBlindsAccessory directly rather than as a freestanding new file?

samsawyer avatar May 15 '21 18:05 samsawyer

I think there's a way to do rebase it without needing to make a new PR. I will look into it.

iRayanKhan avatar May 15 '21 18:05 iRayanKhan

Thanks — and regarding the manufacturer option logic, I generally see how to do that, but this type of device reports position smoothly, so it's considerably different than current SimpleBlinds doing estimates based on time-to-close etc, and those various parameters are useless for its logic. So I can integrate it into SimpleBlinds based on manufacturer logic, or I could call it something different (RollerShade ?), or I could scaffold out a BlindsWithPosition … or really however you want an WindowCovering accessory that does report position to Tuya and doesn't need it synthesized represented among the accessories.

Thanks again for all the work to maintain this plugin.

samsawyer avatar May 15 '21 19:05 samsawyer

You could separate the logic in the same file, like if they select x it used x logic. You can choose the naming scheme for the blinds type.

Thanks again for all the work to maintain this plugin.

It's a community effort

iRayanKhan avatar May 15 '21 19:05 iRayanKhan

Just to confirm @samsawyer are you going to adding 'type3' and creating if else statements to ensure roller shutter only functions are run correctly? Let me know if you need a hand.

Getting close to the big update! :)

ElphaX avatar May 20 '21 02:05 ElphaX

@ElphaX — yep, that's my plan.

Two questions:

  1. Is there any quick advice for how to get the homebridge-tuya plugin switched over to a feature branch? My earlier development was simple enough that I just did it via SFTP and then updated the Git repo on my own machine, but if I'm going to be branching off from the tip of current main, I'd appreciate pointers on the right way to get that environment set up? (I run homebridge on a Raspberry Pi.)
  2. I'll add a type3 to SimpleBlinds, but this type3 doesn't need any of the duration logic to calculate position — should I just ignore those settings in the schema, or is there a way to make their visibility dependent on what type is set when the accessory is configured?

Thanks for helping a novice contribute here.

samsawyer avatar May 20 '21 14:05 samsawyer

Hi! How can I install the version with this PR?

blastoma avatar Jul 03 '21 07:07 blastoma

Hi @iRayanKhan , any news regarding this merge?

tavicu avatar Oct 04 '21 07:10 tavicu