How can manage the device 's on-off from web api ?

37 views
Skip to first unread message

Dario Ferrillo

unread,
Aug 3, 2015, 11:02:52 AM8/3/15
to zVirtualScenes Forums
Hi,
i develop patch method for Devices Entity and it work good.
But i would like to send this change at controller and see the effective change at the device.

I explain better:
I would like to start my smart plug from remote. 
I call Patch method with modified field (CurrentLevelInt=255) and i would like that my smart plug start instantly (so in zvs.wpf just work).
How can i send my changes at controller ? how can i sync all instantly so i update my db ? 

Thanks.
 

Aaron Drabeck

unread,
Aug 3, 2015, 11:50:28 PM8/3/15
to zVirtualScenes Forums
Hi, 

Take a look here for more info on how to execute a command.  


You will need to do a POST like so:

Execute Command - POST
/odata4/Commands(2)/Actions.Execute

Request Body

{
    Argument: "50",
    Argument2: ""
}


--
You received this message because you are subscribed to the Google Groups "zVirtualScenes Forums" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zvirtualscenes-f...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Regards, 

Aaron D

Dario Ferrillo

unread,
Aug 4, 2015, 4:56:33 AM8/4/15
to zVirtualScenes Forums
Oh....it's so easly. I did not understand this in documentation. Excuse me.

Thanks.
DF
To unsubscribe from this group and stop receiving emails from it, send an email to zvirtualscenes-forums+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Regards, 

Aaron D
Reply all
Reply to author
Forward
0 new messages