#EDIT : all right, the problem under is solved, I made some cleaning in the MQTT subscriptions, all is working fine again. Now I have to find how to manage different subscriptions in e.g as they are not nicely formated at first sight :
From domoticz/out :
MQTT.domoticz/out/Temp/34 [255, 12, 'Temp', '82034', 34, 'HTPC CPU', 0, 'LaCrosse TX3', '33.0', 1]
From sonoff/stat :
MQTT.stat/sonoff/POWER.ON u"ON"
I don't see client ID, I can't set prefixes, I think there's something wrong in my setup.
-------------------------------------
Previous message :
I just flashed an sonoff module using Tasmota project. This is very powerful, as it makes any sonoff talking to domoticz using MQTT, and to any other app using some other MQTT topics (for instance publications to stat/sonoff/POWER for status messages).
Since I tried to add new subscriptions to Eg, I get exceptions anytime the sonoff sends domoticz a message. I removed all MQTT subscriptions from eg except domoticz/out, and restarted eg several times : eg now fires exceptions if I trigger the push button on the sonoff. If I trigger the sonoff from domoticz, everything is fine. If I do the same from the push button : exceptions
Code: Select all
17:20:32 Exception in thread co:
17:20:32 Traceback (most recent call last):
17:20:32 File "threading.pyc", line 532, in __bootstrap_inner
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\__init__.py", line 439, in run
17:20:32 lrsp = mqttc.loop(10.0, 1)
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\paho\mqtt\client.py", line 824, in loop
17:20:32 rc = self.loop_read(max_packets)
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\paho\mqtt\client.py", line 1086, in loop_read
17:20:32 rc = self._packet_read()
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\paho\mqtt\client.py", line 1488, in _packet_read
17:20:32 rc = self._packet_handle()
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\paho\mqtt\client.py", line 1956, in _packet_handle
17:20:32 return self._handle_publish()
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\paho\mqtt\client.py", line 2131, in _handle_publish
17:20:32 self._handle_on_message(message)
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\paho\mqtt\client.py", line 2287, in _handle_on_message
17:20:32 self.on_message(self, self._userdata, message)
17:20:32 File "C:\ProgramData\EventGhost\plugins\MQTT Client\__init__.py", line 323, in on_message
17:20:32 res_key = msg.topic + ', ' + str(result[4])
17:20:32 IndexError: list index out of range
Domoticz/out when triggered from the sonoff button :
Code: Select all
{
"Battery": 255,
"RSSI": 12,
"description": "",
"dtype": "Light/Switch",
"id": "00014193",
"idx": 323,
"name": "Relais sonoff2",
"nvalue": 1,
"stype": "Switch",
"switchType": "On/Off",
"unit": 1
}
When triggered from domoticz :
Code: Select all
{
"Battery": 255,
"RSSI": 12,
"description": "",
"dtype": "Light/Switch",
"id": "00014193",
"idx": 323,
"name": "Relais sonoff2",
"nvalue": 1,
"stype": "Switch",
"svalue1": "0",
"switchType": "On/Off",
"unit": 1
}
Before I started adding other subscriptions to mqtt, I had no errors. Now I removed all other subscriptions, restarted eg, I can't get thing work as before.
Is there a rational explanation?
Is there an old a bad remaining susbscription to my mosquito mqtt broker?