@@ -783,6 +783,62 @@ public Task<CMDResult> WaitForWakeup()
783783 return Result . Task ;
784784 }
785785
786+
787+ public Task < CMDResult > ManuallyIdleNotificationValue ( ValueID VID )
788+ {
789+ Guid ID = Guid . NewGuid ( ) ;
790+
791+ TaskCompletionSource < CMDResult > Result = new TaskCompletionSource < CMDResult > ( ) ;
792+
793+ _driver . Callbacks . Add ( ID , ( JO ) =>
794+ {
795+ CMDResult Res = new CMDResult ( JO ) ;
796+ Result . SetResult ( Res ) ;
797+
798+ } ) ;
799+
800+ Dictionary < string , object > Request = new Dictionary < string , object > ( ) ;
801+ Request . Add ( "messageId" , ID ) ;
802+ Request . Add ( "command" , Enums . Commands . ManuallyIdleNotificationValue ) ;
803+ Request . Add ( "nodeId" , this . id ) ;
804+ Request . Add ( "valueId" , VID ) ;
805+
806+ string RequestPL = JsonConvert . SerializeObject ( Request ) ;
807+ _driver . ClientWebSocket . SendInstant ( RequestPL ) ;
808+
809+ return Result . Task ;
810+ }
811+
812+ public Task < CMDResult > ManuallyIdleNotificationValue ( int notificationType , int prevValue , int ? endpointIndex = null )
813+ {
814+ Guid ID = Guid . NewGuid ( ) ;
815+
816+ TaskCompletionSource < CMDResult > Result = new TaskCompletionSource < CMDResult > ( ) ;
817+
818+ _driver . Callbacks . Add ( ID , ( JO ) =>
819+ {
820+ CMDResult Res = new CMDResult ( JO ) ;
821+ Result . SetResult ( Res ) ;
822+
823+ } ) ;
824+
825+ Dictionary < string , object > Request = new Dictionary < string , object > ( ) ;
826+ Request . Add ( "messageId" , ID ) ;
827+ Request . Add ( "command" , Enums . Commands . ManuallyIdleNotificationValue ) ;
828+ Request . Add ( "nodeId" , this . id ) ;
829+ Request . Add ( "notificationType" , notificationType ) ;
830+ Request . Add ( "prevValue" , prevValue ) ;
831+ if ( endpointIndex . HasValue )
832+ {
833+ Request . Add ( "endpointIndex" , endpointIndex . Value ) ;
834+ }
835+
836+ string RequestPL = JsonConvert . SerializeObject ( Request ) ;
837+ _driver . ClientWebSocket . SendInstant ( RequestPL ) ;
838+
839+ return Result . Task ;
840+ }
841+
786842 [ Newtonsoft . Json . JsonProperty ]
787843 public Endpoint [ ] endpoints { get ; internal set ; }
788844 [ Newtonsoft . Json . JsonProperty ]
0 commit comments