createTag
Create a tag with metadata.
See also Update Tag
Signature
Section titled “Signature”createTag(tag, description=None, units=None, stepped=False, update_existing=False)
tag(str)description(str | None)units(str | None)stepped(bool, default: False)update_existing(bool, default: False)
Inputs
Section titled “Inputs”tag: Tag name to create.description: Optional description.units: Optional engineering units.stepped: Set true for discrete values.update_existing: Overwrite metadata if tag exists.
Examples
Section titled “Examples”JSON output (new tag)
Section titled “JSON output (new tag)”result = hm.createTag( "DEMO_02TI999.PV", description="Demo tag", units="C", stepped=False, update_existing=False,)Output:
{ "success": true, "errors": {} }JSON output (historian prefix)
Section titled “JSON output (historian prefix)”result = hm.createTag( "Demo-influxdb/DEMO_02TI998.PV", description="Demo tag with historian prefix", units="C",)Output:
{ "success": true, "errors": {} }