Yeni: Yapay zekâ güvenlik duvarı her modülü izliyor ve her olayı sade bir dille açıklıyor. Nasıl çalıştığını görün

Adapting a solution to your devices

Make a ready solution work with your own devices – map their keys, clean up values in the root flow, set limits, relations and positions, and copy boards.

Готовое решение ожидает определенные ключи телеметрии, атрибуты и связи. Ваши устройства, вероятно, называют вещи иначе: temp вместо air_temp, door как текст вместо door_open как true/false, давление в паскалях вместо бар. Эта страница показывает, как согласовать их без переписывания решения и что еще решению нужно от вас.

Choose an approach

ApproachBest whenEffort
1. Clean up in the root flowMany devices of one kind send the same namesOne flow, then every board and rule works unchanged
2. Change the cardsOnly a few cards are involved, or you use a template board anywayEdit each card’s keys
3. Change the codec (LoRaWAN)The sensor is LoRaWAN and its codec names keys your waySave a copy of the codec with other output names
4. Put your devices in the solution’s profilesYour devices can send the solution’s keys directly (you control the firmware)None on the Hermetry side

Approach 1 is the usual choice: the stored data then matches the solution’s profiles, so alarm rules, boards and charts all work, and you can mix device makers.

1. Clean up in the root flow

Every device message passes through one root flow before it is stored: the profile’s own root if there is one, otherwise the organisation’s root flow. Put the clean-up steps before Save telemetry.

  1. Give the devices of one kind their own device profile, or use the solution’s profile.
  2. In Automation, create a flow on the IoT host from the Default root flow template and bind it as that profile’s root. See Hosts, the root flow and profile root flows.
  3. Between Device messages and Alarm rules, add the steps below.
  4. Test with a recorded message, then deploy.

Put the steps before Alarm rules, so the rules see the cleaned keys too.

Rename a key

A Change block with two steps, for example to turn temp into air_temp:

StepPathValue
setmsg.payload.air_tempmsg.payload.temp
deletemsg.payload.temp

Convert a value

A Calculate block, one target per value:

NeedExpressionTarget
°F to °C (air_temp)round((msg.payload.temp_f - 32) * 5 / 9, 1)msg.payload.air_temp
Text door state to true/falsemsg.payload.door == "open"msg.payload.door_open
A tracker’s event code to the solution’s wordmsg.payload.ev == 3 ? "fall" : (msg.payload.ev == 7 ? "sos" : "normal")msg.payload.event
Numeric text to a numbernumber(msg.payload.level)msg.payload.level_cm

Arithmetic on text fails, even on numeric text such as "21.5": convert with number(...) first. See Data transform blocks and Cleaning up decoded values.

Drop keys you do not need

A Change block with delete steps, or limit Save telemetry to the keys you list. Fewer keys keep you further from your plan’s key cap; see Telemetry keys.

Note

Cleaning up changes what is stored, not what is counted: the message counts toward your monthly allowance when it arrives. See Message quota and usage.

2. Change the cards

To read your keys directly, open the board in Customise mode, open a card’s settings and pick your key in its data field. Charts, tables and maps each have their own key lists. A board parameter such as Tanks or Site controllers selects devices by profile: open Manage parameters… and add your profile to it, so your devices appear on the board.

Change a copy rather than the installed board: Duplicate it first. When Hermetry updates a solution, the installed board’s cards are written again (see Install a solution).

3. Use the solution’s limits

The alarm rules compare readings with server attributes of each device. Your devices need them too:

SolutionAttributes on each device
Water siteTank: lowLevelThreshold, highLevelThreshold. Pump station: minPressure
Remote sitesSite controller: highTempThreshold, lowTempThreshold, highHumThreshold, lowHumThreshold
Sensor regionsmaxTempThreshold, minTempThreshold, warnTempThreshold, maxHumThreshold, minHumThreshold, warnHumThreshold
Personnel trackingforbiddenZone
Weather stationsNone

A device without an attribute is not checked by the rule that reads it. Set the attributes:

4. Places and relations

Some pages find devices through the site model. Recreate it for your own devices:

SolutionWhat the board needsHow
Water siteTanks and stations placed in a zone under the site; each tank CONTROLS its pump stationPlace the devices; add the relation from the tank to the station
Remote sitesController and UPS gateway placed in the site; the UPS gateway FEEDS the controller; cameras placed in the sitePlace the devices; add the relation from the UPS to the controller
Sensor regionsSensors placed in a region; the region’s floorPlan attribute; the station labelled Weather stationPlace the devices; set the attribute and the label
Personnel trackingZone assets named exactly as the trackers report themCreate assets of kind Zone with those names

See Placing devices and Relations.

5. Name devices well

The boards show device names in titles, tables, maps and alarm texts (“Alarm opened on name: …”). Name each device after what it is and where it is (Hilltop shelter, Tank 3 North), not after its serial number. The sensor regions board also uses the device label on the map.

Checklist

  1. Your devices send the solution’s keys, directly or after the root flow’s clean-up. Check a device’s Telemetry tab.
  2. Each device has its limit attributes.
  3. The devices are placed, and the relations exist.
  4. The board’s profile parameters include your profiles.
  5. The notification flow’s profiles list names your profiles, its recipients are right, and it is switched on.
  6. Sample devices you no longer need are deleted.

Troubleshooting

SymptomCheck
A card stays emptyThe key name on the device’s Telemetry tab, exactly, including case. See A dashboard shows no data.
A chart is empty but the value card shows a valueThe key is text or true/false: store a numeric copy
No alarm opensThe limit attribute is missing, or the clean-up runs after Alarm rules
Data stopped after you bound a profile rootThe new root lacks Save telemetry. See Data does not arrive.