< Back

Set-MJVeraDevice

Sat Jan 11, 2020 4:03 am

NAME Set-MJVeraDevice



SYNOPSIS

Turn or off devices within vera with a singe command





SYNTAX

Set-MJVeraDevice [-VeraIP] <String> -DeviceID <String[]> -Action <String> [-RequireLogin] [-VeraCredential

<PSCredential>] [<CommonParameters>]





DESCRIPTION

This function will set devices mode in Vera, this function will be limited to a few device types until I tested

each class enough

Created by Ispep

Added 2016-06-09

WWW.Automatiserar.se





PARAMETERS

-VeraIP <String>



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-DeviceID <String[]>

Provide the IP or DNS name to your Vera Controller.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Action <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RequireLogin [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-VeraCredential <PSCredential>

If you require your controller to apply login use this switch and provide credential to your vera..



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





This requires a Vera Controller with UI7 to work



-------------------------- EXAMPLE 1 --------------------------



PS C:\\># This command will connect to the controller named ???????Vera??????? and turn off device 80



Set-MJVeraDevice -VeraIP vera -DeviceID 80 -Action OFF

DeviceID : 80

DeviceName : My Device Name

DeviceExist : True

DeviceChangedMode : True

DevicePowerDevice : True

deviceType : urn:schemas-upnp-org:device:BinaryLight:1

CommandSent : True









-------------------------- EXAMPLE 2 --------------------------



PS C:\\># If the device is in the current mode no command is sent to the controller.



Set-MJVeraDevice -VeraIP vera -DeviceID 80 -Action OFF



WARNING: Device 80 / (Lampa Window) - Currently in the same mode as you are trying to set: (OFF).



DeviceID : 80

DeviceName : My Device Name

DeviceExist : True

DeviceChangedMode : False

DevicePowerDevice : True

deviceType : urn:schemas-upnp-org:device:BinaryLight:1

CommandSent : False









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Set-MJVeraDevice -VeraIP vera -DeviceID 10,11,12,33,50 -Action OFF















RELATED LINKS