Ich habe Homegear version 0.7.15-1580 im Einsatz auf einem OrangePi Zero (Armbian) der sich laut htop langweilt.
Dort laeuft auch der Mosquitto MQTT Broker: mosquitto version 1.3.4 (build date 2017-05-29 05:49:56+0000)
Jetzt habe ich in meinem pimatic eine Regel welche 3 SET_TEMPERATURE abschickt.
17:30:21.176 [pimatic-homegear-mqtt] Request homegear/1234-5678-9abc/set/5/4/SET_TEMPERATURE sent
17:30:21.178 [pimatic-homegear-mqtt] Request homegear/1234-5678-9abc/set/7/4/SET_TEMPERATURE sent
17:30:23.177 [pimatic-homegear-mqtt] Request homegear/1234-5678-9abc/set/6/4/SET_TEMPERATURE sent
17:30:30.322 [pimatic-homegear-mqtt] 7 0 { STICKY_UNREACH: true, UNREACH: true }
17:30:30.677 [pimatic-homegear-mqtt] 7 0 { UNREACH: false }
17:30:31.176 [pimatic-homegear-mqtt] Error for homegear/1234-5678-9abc/jsonobj/5/4: Timeout has occurred
17:30:31.178 [pimatic-homegear-mqtt] Error for homegear/1234-5678-9abc/jsonobj/7/4: Timeout has occurred
17:30:31.180 [pimatic] rule thermostat-temperatur error executing an action: homegear/1234-5678-9abc/jsonobj/5/4
17:30:31.180 [pimatic]>Timeout has occurred
17:30:31.181 [pimatic] Error on evaluation of rule condition of rule thermostat-temperatur: undefined
17:30:31.181 [pimatic] homegear/1234-5678-9abc/jsonobj/5/4
17:30:31.181 [pimatic]>Timeout has occurred
17:30:31.182 [pimatic] rule thermostat-temperatur error executing an action: homegear/1234-5678-9abc/jsonobj/7/4
17:30:31.182 [pimatic]>Timeout has occurred
17:30:32.237 [pimatic-homegear-mqtt] 6 0 { STICKY_UNREACH: true, UNREACH: true }
17:30:32.747 [pimatic-homegear-mqtt] 5 0 { RSSI_DEVICE: -60 }
17:30:32.769 [pimatic-homegear-mqtt] 5 0 { LOWBAT: false }
17:30:32.789 [pimatic-homegear-mqtt] 5 4 { BOOST_STATE: 0,
17:30:32.789 [pimatic-homegear-mqtt]> CONTROL_MODE: 1,
17:30:32.789 [pimatic-homegear-mqtt]> FAULT_REPORTING: 0,
17:30:32.789 [pimatic-homegear-mqtt]> PARTY_START_TIME: 0,
17:30:32.789 [pimatic-homegear-mqtt]> SET_TEMPERATURE: 15 }
17:30:33.177 [pimatic-homegear-mqtt] Error for homegear/1234-5678-9abc/jsonobj/6/4: Timeout has occurred
17:30:33.179 [pimatic] rule thermostat-temperatur error executing an action: homegear/1234-5678-9abc/jsonobj/6/4
17:30:33.179 [pimatic]>Timeout has occurred
Da pimatic mit coffeescript geschrieben ist hier die publish function, das @receiver subject (rxjs) auf eine response topic filtert bis der timeout (hier 10 sec) abgelaufen ist
publish: (id, group, property, value) =>
reqTopic = "homegear/#{@mqttId}/set/#{id}/#{group}/#{property}"
resTopic = "homegear/#{@mqttId}/jsonobj/#{id}/#{group}"
return new Promise((resolve, reject) =>
@receiver.filter((event) =>
return event.topic == resTopic
).timeout(@timeout * 1000).first().subscribe((event) =>
env.logger.debug("Response for #{resTopic} received")
resolve(event.message[property])
, (error) =>
env.logger.error("Error for #{resTopic}: #{error.message}")
reject("#{resTopic}\n#{error.message}")
, () =>
env.logger.debug("Request for #{reqTopic} completed")
)
@mqttClient.publish(reqTopic, value.toString(), null, (error) =>
if error
reject(error.message)
env.logger.error("MQTT error for #{reqTopic}")
else
env.logger.debug("Request #{reqTopic} sent")
)
)
Ich weis nicht ob ich irgendwo falsche Annahmen mache bzw. MQTT falsch verstehe. Einfache Schalter publish topics funktioniert wie erwartet. Auch einzelne SET_TEMPERATURE publishes funktionieren.