TemperatureSensorSimulator¶
SIL implementation of a temperature sensor. Readings and publish interval can be changed at runtime via MQTT (see module log on startup for topic names).
Handwritten Documentation¶
External MQTT Control¶
The TemperatureSensorSimulator publishes temperature_sensor readings on a configurable
interval. Values can be changed at runtime via MQTT. Topic names are logged when the module
starts (module_id is the instance id from the Everest config).
everest_api/<module_id>/cmd/set_temperature_C
everest_api/<module_id>/cmd/set_identification
everest_api/<module_id>/cmd/set_location
everest_api/<module_id>/cmd/set_publish_interval_ms
everest_api/<module_id>/cmd/stop_publishing
everest_api/<module_id>/cmd/start_publishing
Example (SIL config config/config-sil-ac-temp-derating.yaml, module id temp_sensor_sim):
mosquitto_pub -t everest_api/temp_sensor_sim/cmd/set_temperature_C -m 55
mosquitto_pub -t everest_api/temp_sensor_sim/cmd/stop_publishing -m ""
mosquitto_pub -t everest_api/temp_sensor_sim/cmd/start_publishing -m ""
See also AcTemperatureDerating and
config/config-sil-ac-temp-derating.yaml.
Auto-Generated Reference¶
Provides¶
temperature_sensor: temperature_sensor
Simulated temperature readings for SIL and integration tests
config:
temperature_C: number <optional>
default: 25.0
Initial temperature reading in degree Celsius
identification: string <optional>
default: “internal”
Temperature.identification published with each reading. Used as part of the derating curve key module_id.identification.
location: string <optional>
default: “”
Optional Temperature.location metadata
publish_interval_ms: integer <optional>
default: 1000
Interval between temperature publications in milliseconds