Device Management
This section of the Device API describes the actions that can be performed on devices.
Update Device CloudGateway
PATCH /v3/devices/{device_id}
Updates device information. This operation requires at least the OWNER access level.
Request
$ curl -X PATCH \
http://api.enapter.com/v3/devices/93fb32c7-b7b7-4987-a754-23597d9c02c7 \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-d '{
"name": "Hydrogen detector"
}'
Body Parameters
namestringrequired#A new device name.
slugstringrequired#A new device slug.
Response
Updated device.
{
"device": {
"id": "93fb32c7-b7b7-4987-a754-23597d9c02c7",
"blueprint_id": "88a2035f-170f-402c-8a84-6d4aed5ae353",
"name": "Hydrogen detector",
"site_id": "a2f2c5e7-054a-43db-8402-3fe6006936b2",
"updated_at": "2025-08-04T07:22:07.988115Z",
"slug": "gas-detector-in-living-room",
"type": "LUA",
"authorized_role": "INSTALLER"
}
}
deviceobject#Deviceobject containing device information.Device.idstring#Device ID.
Device.blueprint_idstring#Blueprint ID.
Device.site_idstring#Site ID.
Device.namestring#Device name.
Device.updated_atstring#The latest update time of the device in RFC 3339 format.
Device.authorized_rolestring#The user's authorized role for the device.
Device.slugstring#Device slug.
Device.typestring#One of the following types:
STANDALONE– device that operates independently without needing to be connected to a Gateway or other Enapter hardware.GATEWAY– device that connects Enapter energy systems to the Enapter Cloud for data communication, remote monitoring and control.EMBEDDED_UCM– communication module, which embedded into Enapter devices UCM,HARDWARE_UCM– Enapter Universal Communication Module (UCM),VIRTUAL_UCM– Enapter virtual UCM,LINK_MASTER_UCM, – Enapter LINK master device,LINK_SLAVE_UCM– Enapter UCM, connected to Enapter LINK master device,LUA– a third-party device, which connected to Enapter UCM and controlled by a Lua script,NATIVE– Enapter device like Electrolyser or Dryer.
Device.implemented_profilesarray of strings#A list of profiles implemented by the device. You can also find them in the device's manifest.
Expanded fields
Expanded fields are included in the response only if you specify them in the
expandquery parameter.Device.propertiesobject#Device properties.
Device.communicationobject#DeviceCommunicationobject represents device's communication info.Communication.typestring#A type of communication to the Enapter EMS:
MQTT_V1_PLAINTEXT– unencrypted MQTT connection;MQTT_V1_TLS– encrypted MQTT connection (MQTTS);MQTT_V1_LOCALHOST– connected to a local MQTT server;UCM_LUA– connected to Enapter UCM, hardware or virtual;UCM_EMBEDDED– via embedded UCM;LINK– via Enapter LINK.
Communication.upstream_idstring#Device ID of upstream device. Will be omited for devices connected to MQTT brocker directly
Communication.hardware_idstring#Device communication hardware ID. Will be set for devices connected to MQTT brocker directly.
Communication.channel_idstring#Device communication channel ID. Will be set for devices connected to MQTT brocker directly.
Device.siteobject#siteobject#Siteobject contains site information.Site.idstring#ID of the site.
Site.namestring#Name of the site.
Site.timezonestring#Timezone of the site.
Site.locationobject#The site location information.
location.namestring#Location name of the site.
location.latitudestring#Location latitude of the site.
location.longitudestring#Location longitude of the site.
Site.authorized_rolestring#User authorized role for the site. See authorization system for more details.
Site.versionstring#Version of the site. Should be always
V3at now.
Delete Device CloudGateway
DELETE /v3/devices/{device_id}
Deletes device. This operation requires at least the OWNER access level.
It's not possible to delete an upstream device with running device(s). You need to delete the running device(s) first.
Request
$ curl -X DELETE \
http://api.enapter.com/v3/devices/93fb32c7-b7b7-4987-a754-23597d9c02c7 \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}'
Generate Device Configuration CloudGateway
POST /v3/devices/{device_id}/generate_config
Generates a new configuration for connecting to the Enapter Cloud.
It's not possible to generate a configuration for devices with communication types UCM_LUA or UCM_EMBEDDED.
Request
$ curl -X POST \
http://api.enapter.com/v3/devices/fecbbba0-79f2-4e9e-a6f0-69a310ab110b/generate_config \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-d '{
"protocol": "MQTTS"
}'
Body Parameters
protocolstring#Can be
MQTTorMQTTS.
Response
A new device configuration.
MQTTS
{
"config": {
"mqtt_host": "mqtt.enapter.com",
"mqtt_port": 8883,
"mqtt_credentials": {
"private_key": "...",
"certificate": "...",
"ca_chain": "..."
},
"mqtt_protocol": "MQTTS",
"time_sync_protocol": "HTTP",
"time_sync_host": "127.0.0.1",
"time_sync_port": 80,
"hardware_id": "C8795CBA5375484E829105E959663C8B",
"channel_id": "ucm"
}
}
MQTT
{
"config": {
"mqtt_host": "mqtt.enapter.com",
"mqtt_port": 1883,
"mqtt_credentials": {
"username": "...",
"password": "..."
},
"mqtt_protocol": "MQTT",
"time_sync_protocol": "HTTP",
"time_sync_host": "127.0.0.1",
"time_sync_port": 80,
"hardware_id": "C8795CBA5375484E829105E959663C8B",
"channel_id": "ucm"
}
}
configobject#Object containing a device communication configuration information.
config.mqtt_hoststring#Enapter Cloud MQTT broker host.
config.mqtt_postinteger#Enapter Cloud MQTT broker port.
config.mqtt_protocolstring#MQTTorMQTTS.
config.mqtt_credentialsobject#Contains either MQTT or MQTTS protocol credentials.
MQTT MQTTS mqtt_credentials.usernamestring#- Enapter Cloud MQTT broker username.
mqtt_credentials.private_keystring#- Enapter Cloud MQTT broker private key.
mqtt_credentials.passwordstring#- Enapter Cloud MQTT broker password.
mqtt_credentials.certificatestring#- Enapter Cloud MQTT broker certificate.
mqtt_credentials.ca_chainstring#- Enapter Cloud MQTT broker certificate chain.
config.time_sync_protocolstring#Time synchronization protocol.
config.time_sync_hoststring#Time synchronization host.
config.time_sync_portinteger#Time synchronisation server port.
config.hardware_idstring#Device hardware ID.
config.channel_idstring#Device channel ID.
Change Blueprint CloudGateway
POST /v3/devices/{device_id}/assign_blueprint
Changes blueprint of a specified device.
Request
$ curl -X POST \
http://api.enapter.com/v3/devices/fecbbba0-79f2-4e9e-a6f0-69a310ab110b/assign_blueprint \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-d '{
"blueprint_id": "bluepri2-60n4-4t9d-e6v0-69i310cb110e"
}'
Response
An updated device.
{
"device": {
"id": "93fb32c7-b7b7-4987-a754-23597d9c02c7",
"blueprint_id": "bluepri2-60n4-4t9d-e6v0-69i310cb110e",
"name": "Gas detector in living room",
"site_id": "a2f2c5e7-054a-43db-8402-3fe6006936b2",
"updated_at": "2025-08-04T07:22:07.988115Z",
"slug": "gas-detector-in-living-room",
"type": "LUA",
"authorized_role": "INSTALLER"
}
}
deviceobject#Deviceobject containing device information.Device.idstring#Device ID.
Device.blueprint_idstring#Blueprint ID.
Device.site_idstring#Site ID.
Device.namestring#Device name.
Device.updated_atstring#The latest update time of the device in RFC 3339 format.
Device.authorized_rolestring#The user's authorized role for the device.
Device.slugstring#Device slug.
Device.typestring#One of the following types:
STANDALONE– device that operates independently without needing to be connected to a Gateway or other Enapter hardware.GATEWAY– device that connects Enapter energy systems to the Enapter Cloud for data communication, remote monitoring and control.EMBEDDED_UCM– communication module, which embedded into Enapter devices UCM,HARDWARE_UCM– Enapter Universal Communication Module (UCM),VIRTUAL_UCM– Enapter virtual UCM,LINK_MASTER_UCM, – Enapter LINK master device,LINK_SLAVE_UCM– Enapter UCM, connected to Enapter LINK master device,LUA– a third-party device, which connected to Enapter UCM and controlled by a Lua script,NATIVE– Enapter device like Electrolyser or Dryer.
Device.implemented_profilesarray of strings#A list of profiles implemented by the device. You can also find them in the device's manifest.
Expanded fields
Expanded fields are included in the response only if you specify them in the
expandquery parameter.Device.propertiesobject#Device properties.
Device.communicationobject#DeviceCommunicationobject represents device's communication info.Communication.typestring#A type of communication to the Enapter EMS:
MQTT_V1_PLAINTEXT– unencrypted MQTT connection;MQTT_V1_TLS– encrypted MQTT connection (MQTTS);MQTT_V1_LOCALHOST– connected to a local MQTT server;UCM_LUA– connected to Enapter UCM, hardware or virtual;UCM_EMBEDDED– via embedded UCM;LINK– via Enapter LINK.
Communication.upstream_idstring#Device ID of upstream device. Will be omited for devices connected to MQTT brocker directly
Communication.hardware_idstring#Device communication hardware ID. Will be set for devices connected to MQTT brocker directly.
Communication.channel_idstring#Device communication channel ID. Will be set for devices connected to MQTT brocker directly.
Device.siteobject#siteobject#Siteobject contains site information.Site.idstring#ID of the site.
Site.namestring#Name of the site.
Site.timezonestring#Timezone of the site.
Site.locationobject#The site location information.
location.namestring#Location name of the site.
location.latitudestring#Location latitude of the site.
location.longitudestring#Location longitude of the site.
Site.authorized_rolestring#User authorized role for the site. See authorization system for more details.
Site.versionstring#Version of the site. Should be always
V3at now.