Skip to content

SinricProBlinds - Alexa: Missing callback function: adjustRangeValue #85

@joseportillodev

Description

@joseportillodev

Hi developers,
I'm trying to develop a virtual SinricProBlinds device and I'm struggling with some Alexa voice commands to operate it.
(virtual because it runs on a server which in turn communicates with the physical blinds)

Sample code

Essentially, it is the Blinds example with this initialization:

sinric_pro = SinricPro.get_instance()
device = SinricProBlinds(BLIND_ID)
device.on_open_close(on_open_close)
device.on_power_state(on_power_state)
device.on_setting(on_setting)
sinric_pro.add(device)
config = SinricProConfig(app_key=APP_KEY, app_secret=APP_SECRET)
await sinric_pro.begin(config)
while True:
    await asyncio.sleep(1)

...and callbacks like this for interacting with the actual physical blinds:

async def on_power_state(state: bool) -> bool:
	log = logging.getLogger()
	log.info('device_id: {} on set power state: {}'.format(BLIND_ID, state))
	p = subprocess.run(["/opt/custom/sbin/blind", "go", "3" if state else "0"])
	return p.returncode == 0

async def on_open_close(position: int) -> bool:
	log = logging.getLogger()
	log.info('device_id: {} on set open/close: {}'.format(BLIND_ID, position))
	p = subprocess.run(["/opt/custom/sbin/blind", "go", "3" if position > 50 else "0"])
	return p.returncode == 0

Nothing out of the ordinary.

From the SinricPro iOS App, I can adjust the blind position from 0 to 100% and turn it on/off.
(for mocking purposes, I've mapped on/off to fully open/closed and position>50%/position<50% to fully open/closed too)

From the Alexa iOS App, tapping the buttons on screen, I can operate the device the same way.

From an Alexa Echo Show device, using voice commands, the thing changes: It says "the device BlindsName does not respond"

Steps to reproduce

  • Create a device of type Blinds on the portal, e.g. "BlindsName"
  • In the code, use the SinricProBlinds class for the device
  • implement on_power_state, on_open_close, on_setting
  • Say "Alexa, close the BlindsName"

What happens

When interacting with the device via Alexa voice commands (e.g. "Alexa, close the BlindsName"), it says "the device BlindsName does not respond" and inspecting the logs on the Portal, I see this:

2026-05-18 15:25:55 alexa.amazon.com - [BlindsName] adjust to -10
2026-05-18 15:25:55 REDACTED.IP REDACTED.GEOLOCATION Device returned an error.. adjustRangeValue : Missing callback function: adjustRangeValue

on the device logs, I see this:

may 18 15:25:54 hostname pysinricpro[3708466]: websockets.client - DEBUG - < TEXT '{"header":{"payloadVersion":2,"signatureVersion...aCRppXRieBsMJcWe9VE="}}' [364 bytes]
may 18 15:25:54 hostname pysinricpro[3708466]: websockets.client - DEBUG - > TEXT '{"header":{"payloadVersion":2,"signatureVersion...TFp44WY6wOwoNQ35MKk="}}' [416 bytes]
may 18 15:25:55 hostname pysinricpro[3708466]: websockets.client - DEBUG - < PING '' [0 bytes]
may 18 15:25:55 hostname pysinricpro[3708466]: websockets.client - DEBUG - > PONG '' [0 bytes]

What was expected to happen

The 'on_open_close' event being triggered on the device with position = 0%, so the blinds fully close.

Conclusion

I can imagine that the "close the blinds" command was, somewhere:

  • translated to "adjust blinds position to 10% lower" (passing a delta value).
  • sent to the device via a method for which the device code cannot declare a callback (on_adjust_range_value)
Image

Being SinricProBlinds a subclass inheriting from [SinricProDevice, PowerStateController, OpenCloseController, SettingController, PushNotification], I can only declare these callbacks:

  • on_power_state
  • on_open_close
  • on_setting

It seems the Alexa-SinricPro integration should use the 'on_open_close' event for blinds open/close utterances. And, in case fine adjustments are planned to be supported (Alexa, raise the bedroom blinds by a 10%), then the on_adjust_range_value callback should be possible to be declared on the device.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions