About this action
Triggers, queries, and actions are the building blocks of Applets. Triggers tell an Applet to start, queries ask a question, and actions are its end result.
Developer info
- Description
- This Action will write a new datapoint to a specific device.
- API endpoint slug
- attm2x.write_datapoint
- Filter code method
- Attm2x.writeDatapoint.skip(string?: reason)
- Runtime method
- runAction("attm2x.write_datapoint", {})
Action fields
Device ID Text input > Other
- Label
- Which device?
- Helper text
- The device ID can be found on the Device Details page of your M2X account.
- Slug
- device_id
- Required
- true
- Can have default value
- true
- Filter code method
- Attm2x.writeDatapoint.setDeviceId(string: deviceId)
Stream name Text input > Other
- Label
- Which stream?
- Helper text
- The name of the stream to which the new datapoint will be written. The stream name can be found on the Device Details page for the device entered above.
- Slug
- stream_name
- Required
- true
- Can have default value
- true
- Filter code method
- Attm2x.writeDatapoint.setStreamName(string: streamName)
Value Text input > Other
- Label
- Which value?
- Helper text
- The value of the new datapoint.
- Slug
- value
- Required
- true
- Can have default value
- true
- Filter code method
- Attm2x.writeDatapoint.setValue(string: value)
Timestamp Text input > Other
- Label
- When was this value registered?
- Helper text
- Date and time when the new value has been registered.
- Slug
- timestamp
- Required
- false
- Can have default value
- true
- Filter code method
- Attm2x.writeDatapoint.setTimestamp(string: timestamp)