| document type | cmdlet |
|---|---|
| external help file | PSTibber-Help.xml |
| HelpUri | https://developer.tibber.com/docs/reference#livemeasurement |
| Locale | sv-SE |
| Module Name | PSTibber |
| ms.date | 09-19-2025 |
| PlatyPS schema version | 2024-05-01 |
| title | Read-TibberWebSocket |
Read packages on the provided WebSocket connection.
Read-TibberWebSocket [-Connection] <Object> [-Callback] <scriptblock>
[[-CallbackComplete] <scriptblock>] [[-CallbackError] <scriptblock>]
[[-CallbackArgumentList] <Object[]>] [[-DurationInSeconds] <int>] [[-ReadUntil] <datetime>]
[[-PackageCount] <int>] [[-TimeoutInSeconds] <int>] [<CommonParameters>]
This cmdlet has the following aliases, {{Insert list of aliases}}
Calling this function will read packages on the provided WebSocket connection.
Read-TibberWebSocket -Connection $connection -Callback { param(
function Write-PackageToHost {
param (
[Object]
$result = Read-TibberWebSocket -Connection
Read-TibberWebSocket -Connection
function Write-PackageToHost {
param (
[Object] $Json,
[string] $With,
[string] $Additional,
[int]
Specifies the default script block/function called for each response.
Type: System.Management.Automation.ScriptBlock
DefaultValue: ''
SupportsWildcards: false
Aliases:
- OnNext
- CallbackNext
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies the optional arguments passed on to the callback script block, positioned after the response.
Type: System.Object[]
DefaultValue: '@()'
SupportsWildcards: false
Aliases:
- CallbackArguments
- Arguments
- Args
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies the script block/function called after recieving a 'complete' message.
Type: System.Management.Automation.ScriptBlock
DefaultValue: $Callback
SupportsWildcards: false
Aliases:
- OnComplete
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies the script block/function called after recieving a 'error' message.
Type: System.Management.Automation.ScriptBlock
DefaultValue: >-
{
throw "WebSocket error message received: $($response | ConvertTo-Json -Depth 10)"
}
SupportsWildcards: false
Aliases:
- OnError
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies the connection to use for the communication.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies for how long in seconds we should read packages, or -1 to read indefinitely.
Type: System.Int32
DefaultValue: -1
SupportsWildcards: false
Aliases:
- Duration
ParameterSets:
- Name: (All)
Position: 5
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies the number of packages to read, or -1 to read indefinitely.
Type: System.Int32
DefaultValue: -1
SupportsWildcards: false
Aliases:
- Count
ParameterSets:
- Name: (All)
Position: 7
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies a date/time to read data until (a deadline).
Type: System.DateTime
DefaultValue: ([DateTime]::Now).AddSeconds(-1)
SupportsWildcards: false
Aliases:
- Until
- Deadline
ParameterSets:
- Name: (All)
Position: 6
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Specifies the time to wait for WebSocket operations, or -1 to wait indefinitely.
Type: System.Int32
DefaultValue: 30
SupportsWildcards: false
Aliases:
- Timeout
ParameterSets:
- Name: (All)
Position: 8
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
{{ Fill in the Description }}
{{ Fill in the Description }}
{{ Fill in the Description }}
{{ Fill in the Description }}
{{ Fill in the Description }}