### Ask for settings and individual credentials ###
## TODO 2: Use your credentials and the correct config for connecting to the MQTT broker at WZL
MQTT_USER=os.environ["MQTT_USER"]# to be changed to your individual credentials or save your credentials in an environment variable called MQTT_USER, too
MQTT_PASSWORD=os.environ["MQTT_PASSWORD"]# to be changed to your individual credentials or save your credentials in an environment variable called MQTT_PASSWORD, too
# MQTT_BROKER = "127.0.0.1"
MQTT_PORT=1883
## TODO 1: Change the topic and observe what happens in the receiver output
## TODO 2: Change the topic to soil-conform format
MQTT_TOPIC="OBJ-Env/VAR-Temperature"
## TODO 3: Add a soil-conform status topic
MQTT_TOPIC_Status="OBJ-Env/VAR-Status"
### to connect to the central MQTT-Broker of MQ-MS use the following settings:
MQTT_BROKER="134.130.175.204"
MQTT_VHOST="metrology"
### Ask for settings and individual credentials ###
# time steps
t=0# s
if__name__=="__main__":
# The publisher and receiver classes may consider a prefix, that is put in front of each topic
## TODO Task 1: Change the message string and observe what happens with the transmitted message
## TODO Task 2: a) Use the soil_msg function defined above to bring your message into the soil-conform format.
## b) Use the exponential decay function from above and and pass a meaningful unit and a dictionary that includes a keyword "name" and as value your name
## TODO Task 3: Create a second soil message that transmits the status of your demonstrator (0 = running, 1 = Off, 2=Maintenance) to the broker and publish it under a dedicated topic