LogoLogo
  • Welcome to the MOOST platform user manual
  • Platform Manual
    • Login
      • Forgot Password
    • Notifications
    • Rules
      • Rule Configurator
        • Data graph
        • Datasets
        • Condition
        • Streak
        • Message
        • Settings
        • Rule Simulator
        • Early Adopter
        • Command
      • Rule Language
        • Syntax
        • Data Types
        • Data Structures
        • Functions
          • AVG
          • COUNT
          • DISTINCT
          • EVAL
          • FILTER
          • GROUP_BY_DEVICE
          • GROUP_BY_TIME
          • MAX
          • MIN
          • POSITION
          • REVERSE
          • SORT
          • SUBSET
          • SUM
        • Operations
          • Plus
          • Minus
          • Multiply
          • Divide
          • Negate
          • Less Than
          • Less or Equal
          • Equal
          • Not Equal
          • Greater or Equal
          • Greater
          • AND
          • OR
          • NOT
          • Format
          • Attribute Accessor
        • Examples
    • Events
    • Buildings
      • Household Profile
    • User Profile
    • Billing Portal
      • Payment Method
      • Update Payment Address
      • Invoices
      • Terminate Subscription
    • Context Services
      • Weather Forecast
      • Solar Production Forecast
      • Power Consumption Forecast
      • Power Generation Forecast
    • Support Center
  • Technical Integration
    • Cloud-to-Cloud Integration
      • Platform On-boarding
      • Configure Notification Settings
        • Receive Notifications
          • iOS Notification Handling
      • MOOST API Integration
        • Request Access Token
        • Synchronize Buildings and Devices
          • Device Types
        • Forward Events
          • Event Types
            • Device Status
            • Charging Modes
            • Switch State
        • Notifications and Interactions
          • Return Notification Interaction
  • Best Practices
    • FAQ
    • User Acceptance Testing
  • Policies
    • Security Policy
    • Privacy Policy
Powered by GitBook

© 2025 MOOST AG

On this page
  • Description
  • Accessor on Scalar<Event>
  • Accessor on Vector<any>
  • Accessor on Vector<Event>
  • Accessor on GroupedScalar<any, Event>
  • Accessor on GroupedScalar<Device, any>
  • Accessor on GroupedScalar<any, any>
  • Accessor on GroupedVector<any, any>
  • Accessor on GroupedVector<any, Event>
  • Accessor on GroupedVector<Device, any>
  • Accessor on Scalar<Building>
  • Property Accessor on Scalar<Building>
Export as PDF
  1. Platform Manual
  2. Rules
  3. Rule Language
  4. Operations

Attribute Accessor

Description

Access sub-data of the argument.

Accessor on Scalar<Event>

Scalar<Event>::Value             : Scalar<Number>
Scalar<Event>::DeviceId          : Scalar<Text>
Scalar<Event>::DeviceName        : Scalar<Text>
Scalar<Event>::Timestamp         : Scalar<Time>
Scalar<Event>::ForecastTimestamp : Scalar<Time>

Returns

Returns the event value, device id, device name, timestamp or forecast timestamp.

Remark: if there is no forecast timestamp, "0" is returned

Examples

Get the value of the event stored in the PowerConsumption Variable.

$PowerConsumption::Value
$PowerConsumption::Timestamp

Accessor on Vector<any>

Vector<any>::First : Scalar<any>
Vector<any>::Last  : Scalar<any>

Returns

Returns the first or last element of the Vector as Scalar<any>

Examples

Get the first Event from the $PowerGeneration vector.

$PowerConsumption::First

Accessor on Vector<Event>

Vector<Event>::Value             : Vector<Number>
Vector<Event>::DeviceId          : Vector<Text>
Vector<Event>::DeviceName        : Vector<Text>
Vector<Event>::Timestamp         : Vector<Time>
Vector<Event>::ForecastTimestamp : Vector<Time>

Returns

Returns the set of event values, device ids, device names, timestamps or forecast timestamps.

Remark: if there is no forecast timestamp, "0" is returned

Examples

Get the values of all events in the vector $PowerConsumption as new Vector<Number>

$PowerConsumption::Value

Accessor on GroupedScalar<any, Event>

GroupedScalar<any, Event>::Value             : Vector<Number>
GroupedScalar<any, Event>::DeviceId          : Vector<Text>
GroupedScalar<any, Event>::DeviceName        : Vector<Text>
GroupedScalar<any, Event>::Timestamp         : Vector<Time>
GroupedScalar<any, Event>::ForecastTimestamp : Vector<Time>

Returns

Returns the set of event values, device ids, device names, timestamps or forecast timestamps, grouped by device or time spans.

Examples

Get the values of all events in the group $PowerConsumption as new Vector<Number>

GROUP_BY_DEVICE($PowerConsumption)::Value

Accessor on GroupedScalar<Device, any>

GroupedScalar<Device, any>::GroupKeyDeviceId   : Vector<Text>
GroupedScalar<Device, any>::GroupKeyDeviceName : Vector<Text>

Returns

Returns the device id or name of the device which is part of the GroupedScalar key.

Examples

Get all device names from all the devices in the $PowerConsumption group.

GROUP_BY_DEVICE($PowerConsumption)::GroupKeyDeviceName

Accessor on GroupedScalar<any, any>

GroupedScalar<any, any>::GroupKeyValue : Vector<any>

Returns

Returns the value of the group as new Vector<any>.

Examples

Get all Values from the $PowerConsumption group.

GROUP_BY_DEVICE($PowerConsumption)::GroupValue

Accessor on GroupedVector<any, any>

GroupedVector<any, any>::First : GroupedScalar<any, any>
GroupedVector<any, any>::Last  : GroupedScalar<any, any>

Returns

Returns a GroupedScalar, which holds the first or last value of each group.

Examples

Get all Values from the $PowerConsumption group.

GROUP_BY_DEVICE($PowerConsumption)::First

Accessor on GroupedVector<any, Event>

GroupedVector<any, Event>::Value             : GroupedVector<Number>
GroupedVector<any, Event>::DeviceId          : GroupedVector<Text>
GroupedVector<any, Event>::DeviceName        : GroupedVector<Text>
GroupedVector<any, Event>::Timestamp         : GroupedVector<Time>
GroupedVector<any, Event>::ForecastTimestamp : GroupedVector<Time>

Returns

Returns the values, device ids, device names, timestamps or forecast timestamps of all events in the group and return as new GroupedVector<Number>.

Examples

Get the values of all events in the group $PowerConsumption as new Vector<Number>

GROUP_BY_DEVICE($PowerConsumption)::Value

Accessor on GroupedVector<Device, any>

GroupedVector<Device, any>::GroupKeyDeviceId   : Vector<Text>
GroupedVector<Device, any>::GroupKeyDeviceName : Vector<Text>

Returns

Returns the device ids or device names of all devices which are the groups key, and return as new Vector<Text>.

Examples

Get all device names from all the devices in the $PowerConsumption group.

GROUP_BY_DEVICE($PowerConsumption)::GroupKeyDeviceName

Accessor on Scalar<Building>

Building::Id
Building::RegistrationTimestamp
Building::ActivationTimestamp
Building::DeviceTypes
Building::EconomicalMotivationScore
Building::EcologicalMotivationScore
Building::SelfSufficiencyMotivationScore
Building::MultiPersonScore
Building::CommercialBuildingScore
Building::IsSelfSufficiencyMotivated
Building::IsEcologicalMotivated
Building::IsSelfSufficiencyMotivated
Building::IsMultiPerson
Building::IsSinglePerson
Building::IsResidential
Building::IsCommercial
Building::IsInSameCountry
Building::IsInSameConsumptionCategory
Building::All

Returns

Selects the event related building, and returns the specified building data, such as the building id, the registration date when the building was registered, the activation date when the building was activated on MOOST side, or the types of all devices.

Examples

Get all device types from the event related device.

Building::DeviceTypes

Property Accessor on Scalar<Building>

A special case is the Property Accessor on the ScalayBuilding>. It allows to select the value that is defined in a customer property on a building and use it in the rule language.

Building::Property[energyThreshold]

Returns

Returns the value that is defined in the according properties entry on the building. When used in a rule condition the rule can only be trigger for buildings that have the according property set.

Examples

Use the value of the Property "energyThreshold" defined on the buildings to compare it against a dataset of type EnergyConsumption.

$EnergyConsumption > Building::Property[energyThreshold]
PreviousFormatNextExamples

Last updated 1 month ago

See

Building