gslender / com.gslender.bondbridge

Homey App for the Bond Bridge range of fan, fireplace and shade devices
GNU General Public License v3.0
1 stars 1 forks source link

Support for Positioning & Stop #1

Closed skarotech closed 1 month ago

skarotech commented 1 month ago

Hi, great work getting this into Homey, would it be possible to have the following.

  1. Support for the STOP action, does not seem to work - please correct/direct me if I am wrong?
  2. Support for positioning via the Homey App, rather than just Open/Close.

For context, I have Rollease Automate RF blinds, that support positioning...happy to help with any debug/testing as required, based in Melb, AU.

gslender commented 1 month ago

Have pushed a test version 1.2.1 that will include device data in the Settings of the device. If you can post that here so that I can review what action commands the blinds support and ensure that the app is making them available. Currently the STOP action is posted when you select the middle button in the open/close mode. I cannot confirm that this translate to anything useful in the Bond bridge for your specific blind - e.g. it works fine for my blinds :-)

gslender commented 1 month ago

https://homey.app/en-au/app/com.gslender.bondbridge/Bond-Bridge-Integration/test/

skarotech commented 1 month ago

Hi, thanks, will give that a go bit later today, from my development to date, I found that you had to use the 'Hold' action, and not stop.

eg

http://{ip address}/v2/devices/{id}/actions/Hold

and for positioning

http://{ip address}/v2/devices/{id}/actions/SetPosition (PUT) with a dataset of {"argument":#position_value#}

skarotech commented 1 month ago

further update, here is the dump {"status":"VALID_TOKEN","data":{"name":"Bedroom L","type":"MS","location":"Master Bedroom","template":"RMS35","subtype":"ROLLERSHADE","tech":1,"actions":["Close","DecreasePosition","Hold","IncreasePosition","Open","Pair","PairAlt","SetPosition","Stop","ToggleOpen"],"":"fba13206","_":"be3e0745","commands":{"":"c24bf15d"},"state":{"":"9525fa5b"},"properties":{"":"9039d1d9"},"skeds":{"":"00000000"},"vrc":{"":"98ef2f4f"},"id":"94b0327cb35ab76e"}}

gslender commented 1 month ago

Interesting. So stop is ignored even though it is listed as a valid action

skarotech commented 1 month ago

correct, its just ignored, don't know the reason why...also if you are looking to support Lights, their actions are not TurnOn, TurnOff, they are TurnLightOn, TurnLightOff

gslender commented 1 month ago

also if you are looking to support Lights, their actions are not TurnOn, TurnOff, they are TurnLightOn, TurnLightOff

Yes, I'm aware. What makes you think I'm using TurnOn/TurnOff to enable lights?

skarotech commented 1 month ago

was just mentioning it, as it was something that I struck with the API.

gslender commented 1 month ago

v1.2.2 was updated and support for HOLD added. This seems to also work with my blinds, so I'm fine to using that instead.

I have added also a device Properties and device Data json dump in the device settings with this build. Can you send me this so I can see how to detect the SetPosition capabilities and add the Level/Slider UI to the device as needed

skarotech commented 1 month ago

thanks, device data {"status":"VALID_TOKEN","data":{"name":"Bedroom L","type":"MS","location":"Master Bedroom","template":"RMS35","subtype":"ROLLERSHADE","tech":1,"actions":["Close","DecreasePosition","Hold","IncreasePosition","Open","Pair","PairAlt","SetPosition","Stop","ToggleOpen"],"":"784b5708","_":"be3e0745","commands":{"":"c24bf15d"},"state":{"":"6d54d0fc"},"properties":{"":"9039d1d9"},"skeds":{"":"00000000"},"vrc":{"":"98ef2f4f"},"id":"94b0327cb35ab76e"}}

properties {"status":"OKAY","data":{"feature_position":true,"mfg":1,"pairing_assets_key":"arc_shade","addr":60184646,"chan":1,"tdburail":0,"":"9039d1d9","__":"9039d1d9"}}

gslender commented 1 month ago

v1.2.3 was updated and support for SetPosition added. I cannot test this, so you'll need to let me know if it works or not. If it doesn't work, send me a diagnositc report as it may help me uncover why not. You may need to remove and add the device again, but it should work without that (I think so)

skarotech commented 1 month ago

thanks, just installed the updated version, and its rolled back to 1.1.4 ?

gslender commented 1 month ago

You need to be installing the TEST version of the app.

https://homey.app/en-au/app/com.gslender.bondbridge/Bond-Bridge-Integration/test/

skarotech commented 1 month ago

hi, stop works great, positioning gives the error share_7626542065306160825 let me know what debug you need..

gslender commented 1 month ago

A new release pushed that should have this fixed

skarotech commented 1 month ago

perfect, that works great, thanks!!!

on a side note, and only a minor thing, and does not effect functionality, in Flows, the actions are 'Set State Up/Down' whereas other blinds have Open/Close actions......not sure which is the correct 'Homey' method or if my other blinds are non-standard (Eve MotionBlinds)

gslender commented 1 month ago

Capabiliites drive the Flows available unless they are Custom developer Capabiliites.

https://apps-sdk-v3.developer.homey.app/tutorial-device-capabilities.html

I would not know what other developers are doing so maybe if you can point me to the app you're using I could take a look to see why/how they are doing things

skarotech commented 1 month ago

thanks, looking at page, i'd guess you are using windowcoverings_state (which is up/down) and the Eve are using

windowcoverings_closed which is closed t/f and actions open/close

its probably not worth any effort to change, as its not clear which is 'standard' and it works, i'm just picky as i've got multiple brands of devices and my OCD kicks in.

gslender commented 1 month ago

It is because windowcoverings_closed does not have an idle/pause toggle position. It is only Open or Closed e.g. boolean state. Does that explain it ??

skarotech commented 1 month ago

hi, one possible issue with further testing, and i'm not sure what the 'norm is here, but for the bond blinds in Homey, 10% setting is 90% open, whereas other blinds 10% = 10% open (which I feel is logically correct?)

would it be possible to flip the logic to match 10% = 10% open ?

gslender commented 1 month ago

What's the Bond API expect it to be ?? Is it expecting to be closed instead of open etc ???

gslender commented 1 month ago

I might add a setting that allow each device to flip open vs closed to avoid some other Bond issue with a blind that operates the other way

skarotech commented 1 month ago

its more the percentage position, as I do know that in some platforms (eg Switchbot) they treat the percentage as a percentage closed, whereas some others as percentage open, hence the difference I mentioned.

the setting to flip open/close is a great idea, but more so for to flip the percentage to handle both use cases.

gslender commented 1 month ago

Test version has this implemented in v1.2.5

skarotech commented 1 month ago

that is perfect, works well now, with those options, appreciate you spending time on this.