Closed boboxx closed 2 years ago
HI I can't see why you have this problem: could you give the exact part of the config file you have for this accessory?
sure this is what I have, I just used to gui for the config: { "name": "test", "type": "switch", "url": "mqtt://localhost:1883", "topic": "tasmota_%06X", "debug": false, "index": 1, "accessory": "mqtt-tasmota" }
yep the url is not right here, just put "url": "mqtt://10.1.10.2:1883"
instead.
now I get :)
[2022-03-15, 4:48:07 p.m.] [test] Error event on MQTT connect ECONNREFUSED 10.1.10.2:1883 [2022-03-15, 4:48:08 p.m.] [test] Error event on MQTT connect ECONNREFUSED 10.1.10.2:1883 [2022-03-15, 4:48:09 p.m.] [test] Error event on MQTT connect ECONNREFUSED 10.1.10.2:1883 [2022-03-15, 4:48:10 p.m.] [test] Error event on MQTT connect ECONNREFUSED 10.1.10.2:1883 [2022-03-15, 4:48:11 p.m.] [test] Error event on MQTT connect ECONNREFUSED 10.1.10.2:1883 [2022-03-15, 4:48:12 p.m.] [test] Error event on MQTT connect ECONNREFUSED 10.1.10.2:1883
{
"name": "test",
"type": "switch",
"url": "mqtt://10.1.10.2:1883",
"topic": "tasmota_%06X",
"debug": false,
"index": 1,
"accessory": "mqtt-tasmota"
}
Have you setup a MQTT server on this host? You should install something like https://mosquitto.org/
No I have not, installing a MQTT server is not listed as a requirement... "This is an all-in-one homebridge plugin to control various tasmota devices via MQTT."
I didn't know I need to install another service :)
The topic setting is also wrong: you should use the full topic which is generated from the string tasmota_%06X
Got to your tasmota device url and clic on the information button: you should see the actual topic from there
An MQTT broker is required as this plugin is dedicated to MQTT devices (tasmota for instance). Sorry but I didn't put this as a requirement, I though it was obvious given the project name :)
In my setup I use a raspberry pi, and it is really easy to start an mosquito instance like that:
apt install mosquitto
systemctl start mosquitto
systemctl enable mosquitto
thanks I got it working not that I have thew MQTT services installed and configured lol
I just installed MQTT Tasmota 0.4.6 on HB 1.4.0 (running on a Debian VM).
I created a test device called "test", set topic to "tasmota_%06X" as indicated on my switch (Treatlife SS02 running Tasmota 11.0). I lest the rest as default.
on my switch:
MQTT Host : 10.1.10.2 (HB server IP) Port : 1883 User: DVES_USER Client: DVESDCC183 Topic: tasmota%06X Group topic 1: cmnd/tasmotas/ Full Topic: cmnd/tasmota_DCC183/ Fallback Topics: cmnd/DVES_DCC183_fb/ No Retain: Disabled
But it dosnet look like it's able to connect, in my HB logs I see: Error event on MQTT connect ECONNREFUSED 127.0.0.1:1883"
What am I doing wrong?