Announcement

Collapse
No announcement yet.

SetDeviceValueByRef vs CAPIControlHandler

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • alexbk66
    replied
    Here's what I'm doing now, but it looks unnecessary complicated.
    1. I made it configurable for each device so I can experiment - ctrlType is the swich
    2. If value is chaged from HS via SetIOMulti - I can't use CAPIControlHandler to confirm back to HS - I must use SetDeviceValueByRef , hence the additional forceSetDeviceValueByRef switch.

    Click image for larger version  Name:	Capture.PNG Views:	1 Size:	252.5 KB ID:	1280989

    Leave a comment:


  • alexbk66
    started a topic SetDeviceValueByRef vs CAPIControlHandler

    SetDeviceValueByRef vs CAPIControlHandler

    So, there are two ways to set device value - SetDeviceValueByRef and CAPIControlHandler. First I thought that SetDeviceValueByRef is just a convinience wrapper for CAPIControlHandler. But.

    SetDeviceValueByRef doen't seem to work with physical devices like Raspberry IO outputs. It looks like it changes the value in HS ui, but output doesn't change.
    So. I try CAPIControlHandler - it does work with Raspberry IO outputs - but is not reflected in HS ui.

    So WTH should I be using? I use both and it seems to work - but it's ridiculous.
Working...
X