mqttGateway sent "a MQTT Test" message
mqttGateway a MQTT Test received mqtt message from garageDoor
Started plugin "mqttGateway 1.0.5"
mqttGateway Debug startup called
mqttGateway Debug resetting device states to OFF
Error device "Garage Door" state key onOffState not defined (ignoring update request)
Error device "Garage Door" state key onOffState not defined (ignoring update request)
brew install mosquito
brew install mosquitto
mosquitto_pub -t topic/state -m “Hello World”
mosquitto_pub -t topic/state -m "Hello World"
poolMax = indigo.variables[1141597781] # "pool_temp_max"
poolTemp = indigo.devices[102542860] # "Pool Temperature"
if poolMax.value < poolTemp.topicMessage:
indigo.variable.updateValue(poolMax, poolTemp)
poolMax = indigo.variables[1141597781] # "pool_temp_max"
poolTemp = indigo.devices[102542860] # "Pool Temperature" # This is my MQTT Gateway device that is receiving from a temperature sensor
#indigo.server.log(poolTemp.name + ": \n" + str(poolTemp))
poolStr = str(poolTemp) # Fetch entire text dump of mqtt device
# Find lines containing "topicMessage"
matched_lines = [line for line in poolStr.split('\n') if "topicMessage : " in line]
#indigo.server.log(str(matched_lines))
# Split the first matched line into separate items
splitStr = matched_lines[0].split()
#indigo.server.log(str(splitStr))
# The message payload is the third item in the splitStr
message = splitStr[2]
#indigo.server.log(str(message))
# If the daily maximum temperature is less than our new temperature, update the daily max to the new value
if float(poolMax.value) < float(message):
indigo.variable.updateValue(poolMax, message)
Users browsing this forum: No registered users and 11 guests