Closed Scream4Life closed 5 years ago
I have this installed and all is working fine
Your url must be as follows
"url": "mqtt://{ip of MQTT server}:1883"
have you installed Mosquitto?
No, MQTT and brokers are completely new to me. Need to find a good description how to install that on the PI as well. I assume it can run side-by-side to homebridge.
This is one of many links, I recommend you check for later ones.
http://www.xappsoftware.com/wordpress/2014/10/27/installing-mosquitto-on-raspberry-pi/
Ok, I managed to install Mosquito now. I would expect that when I run mosquitto_sub -h localhost -v -t sonoff on the PI I would see something when the vent gets activated. But nothing.
In Tasmota I inserted in the MQTT settings the Host (IP of the PI running the broker), 1883 as port and topic son off. Everything else seems to be some default entries here. In the OtherSettings menu of Tasmota I saw another MQTT setting which I activated and put son off and Name (friendly name). Emulation is none.
Anything else I can do?
Saw this in the information tab of Tasmota
MQTT Host: IP of my Pi running the broker MQTT Port: 1883 MQTT-User: DVES_USER MQTT client: DVES_DBA24F MQTT topic: sonoff MQTT group topic: sonoffs MQTT full topic: cmnd/sonoff/ MQTT Fallback-Topic: cmnd/DVES_DBA24F_fb/
Reboot Sonoff, browse to the sonoff device and select Console, does it say "00:00:05 MQT: Connected" a few lines from the top?
Yes
00:00:00 Projekt sonoff sonoff Version 6.4.1.9-mod-1.43.9(sonoff)-2_4_1
00:00:00 WIF: verbinden mit AP1 Infinity in Modus 11N wie sonoff-0591...
00:00:04 WIF: verbunden
00:00:04 HTP: Web-Server aktiv bei sonoff-0591 mit IP-Adresse 192.168.xxx.xxx
00:00:04 RSL: stat/sonoff/RESULT = {"POWER1":"ON"}
00:00:04 RSL: stat/sonoff/POWER1 = ON
11:27:29 MQT: Verbindungsversuch...
11:27:29 MQT: verbunden
11:27:29 MQT: tele/sonoff/LWT = Online (beibehalten)
11:27:29 MQT: cmnd/sonoff/POWER =
11:27:29 MQT: tele/sonoff/INFO1 = {"Module":"Sonoff iFan02","Version":"6.4.1.9-mod-1.43.9(sonoff)","FallbackTopic":"cmnd/DVES_DBA24F_fb/","GroupTopic":"sonoffs"}
11:27:29 MQT: tele/sonoff/INFO2 = {"WebServerMode":"Admin","Hostname":"sonoff-0591","IPAddress":"192.168.xxx.xxx"}
11:27:29 MQT: tele/sonoff/INFO3 = {"RestartReason":"External System"}
11:27:29 MQT: stat/sonoff/RESULT = {"POWER1":"ON"}
11:27:29 MQT: stat/sonoff/POWER1 = ON
11:27:37 MQT: tele/sonoff/STATE = {"Time":"2019-04-10T11:27:37","Uptime":"0T00:00:14","Vcc":3.560,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER1":"ON","FanSpeed":0,"Wifi":{"AP":1,"SSId":"Infinity","BSSId":"44:4E:6D:50:0C:1D","Channel":1,"RSSI":86}}
11:28:37 MQT: tele/sonoff/STATE = {"Time":"2019-04-10T11:28:37","Uptime":"0T00:01:14","Vcc":3.560,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER1":"ON","FanSpeed":0,"Wifi":{"AP":1,"SSId":"Infinity","BSSId":"44:4E:6D:50:0C:1D","Channel":1,"RSSI":82}}
I also installed the following plug in, https://github.com/cflurin/homebridge-mqtt#readme
Remember the plug-in for the fan does not support login and password on mqtt. When you configured mosquito did you set it up with a login name and password..
Todo : Implement username and password MQTT authentication as seen on the plugin page
Because you show connected you should be okay..
Ok, I'm on it. Can you please provide an example config of your mqtt plugin?
{
"platform": "mqtt",
"name": "mqtt",
"url": "mqtt://XX.X.XX.XX:1883",
"topic_prefix": "homebridge",
"username": "",
"password": ""
},
I'm not getting it to work. The homebridge now repeats
[2019-4-10 14:54:46] [mqtt] on.reconnect
The fan console does not connect anymore, unless I entered the username/pw combination I've defined. When I enter Mosquitto -v on the Pi they them to connect and reports updates when I push a button.
But with that in the background and loaded homebridge this homebridge-mqtt-fan-tasmota plugin does not make the fan rotate 😞 Pretty frustrating and time consuming plugin compared to other Tasmota solutions here.
I had that issue with the Tasmota code 6.41, I went back to 6.21
On 10 Apr 2019, at 14:58, Kevin Czaja notifications@github.com wrote:
I'm not getting it to work. The homebridge now repeats [2019-4-10 14:54:46] [mqtt] on.reconnect [2019-4-10 14:54:46] [mqtt] on.close [2019-4-10 14:54:47] [mqtt] on.reconnect [2019-4-10 14:54:47] [mqtt] on.close [2019-4-10 14:54:48] [mqtt] on.reconnect [2019-4-10 14:54:48] [mqtt] on.close [2019-4-10 14:54:49] [mqtt] on.reconnect [2019-4-10 14:54:49] [mqtt] on.close [2019-4-10 14:54:50] [mqtt] on.reconnect since the mqtt plugin is available
The fan console does not connect anymore, unless I entered the username/pw combination I've defined. When I enter Mosquitto -v on the Pi they them to connect and reports updates when I push a button.
But with that in the background and loaded homebridge this homebridge-mqtt-fan-tasmota plugin does not make the fan rotate 😞 Pretty frustrating and time consuming plugin compared to other Tasmota solutions here.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rgavril/homebridge-mqtt-fan-tasmota/issues/4#issuecomment-481679931, or mute the thread https://github.com/notifications/unsubscribe-auth/AX44h6soP6QgFrgG8X4_KoQ_8Q2cx-dFks5vfd_7gaJpZM4bgmAc.
No impact with 6.21 as well
Lets start from the bottom,
So you have installed the following
Nodejs mosquitto homebridge Homebridge-mqtt homebridge-mqtt-fan-tasmota for the Sonoff iFan 02 https://sonoff.itead.cc/en/products/appliances/sonoff-ifan02 Or homebridge-mqtt-switch-tasmota for other Sonoff Devices I also recommend you install Homebridge-config-ui x for a great GUI console
When you browse to the Sonoff device you must select Configure Module > Module Type and select 44 Sonoff iFan02 or what every son off device you have
On 10 Apr 2019, at 15:07, Kevin Czaja notifications@github.com wrote:
No impact with 6.21 as well
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rgavril/homebridge-mqtt-fan-tasmota/issues/4#issuecomment-481682978, or mute the thread https://github.com/notifications/unsubscribe-auth/AX44hxBFYpsVXLAKOD3DaUo7JeIPV56bks5vfeISgaJpZM4bgmAc.
Check...all these things are up and ready. I'm not using homebridge-mqtt-switch-tasmota for other Sonoff Devices but homebridge-sonoff-tasmota-http which unfortunately does not communicate with the fan.
I have 6 Fans, all working well with homebridge-mqtt-fan-tasmota plugin, with the three different speeds
On 10 Apr 2019, at 15:28, Kevin Czaja notifications@github.com wrote:
Check...all these things are up and ready. I'm not using homebridge-mqtt-switch-tasmota for other Sonoff Devices but homebridge-sonoff-tasmota-http which unfortunately does not communicate with the fan.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rgavril/homebridge-mqtt-fan-tasmota/issues/4#issuecomment-481690943, or mute the thread https://github.com/notifications/unsubscribe-auth/AX44h-XIzw3Xkr1iPTnik__wBFbnTSTpks5vfecUgaJpZM4bgmAc.
Lets compare other things.
MQTT
{
"platform": "mqtt",
"name": "mqtt",
"url": "mqtt://192.168.xxx.xxx:1883", (IP of the PI running Mosquitto)
"topic_prefix": "homebridge",
"username": "xxxx",
"password": "xxxx"
},
MQTT Fan Tasmota
{
"accessory": "mqtt-fan-tasmota",
"name": "Büro Ventilator",
"topic": "sonoff",
"url": "mqtt://192.168.xxx.xxx:1883" (IP of the Sonoff Fan Modul)
},
Why does the fan connect to MQTT only when I insert Mosquitto -v? I assume it has something to do with my missing knowledge in MQTT broker configuration.
Hi
My Config is as follows
node.js v10.15.1 The rest is the same
In you config
{
"accessory": "mqtt-fan-tasmota",
"name": "Study Fan",
"topic": "studyfan",
"url": "mqtt:// <mqtt://ip>xx.xx.xx.xx:1883” IP address of the mqtt, Pi running Mosquitt
},
On 10 Apr 2019, at 17:15, Kevin Czaja notifications@github.com wrote:
Lets compare other things.
NodeJS 8.15.1 Mosquitto 1.5.8 Tasmota 6.2.1 on the Fan MQTT
{ "platform": "mqtt", "name": "mqtt", "url": "mqtt://192.168.xxx.xxx:1883", (IP of the PI running Mosquitto) "topic_prefix": "homebridge", "username": "xxxx", "password": "xxxx" }, MQTT Fan Tasmota
{ "accessory": "mqtt-fan-tasmota", "name": "Büro Ventilator", "topic": "sonoff", "url": "mqtt://192.168.xxx.xxx:1883" (IP of the Sonoff Fan Modul) }, Why does the fan connect to MQTT only when I insert Mosquitto -v? I assume it has something to do with my missing knowledge in MQTT broker configuration.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rgavril/homebridge-mqtt-fan-tasmota/issues/4#issuecomment-481733823, or mute the thread https://github.com/notifications/unsubscribe-auth/AX44h_ox90uJNgFxG3rpT4DFmpD9Y2zIks5vfgAKgaJpZM4bgmAc.
Oh, you wrote mqtt://ip and than the IP address. That’s different. And further you don‘t use the IP address of the ifan modul anywhere?! Just the mosquitto IP again. I will try that later when I‘m home.
Sorry that is a typo, yon need to use the IP address MQTT server not of the iFan02. The iFan02 is identified by it hostname i.e in my case studyfan
On 11 Apr 2019, at 09:51, Kevin Czaja notifications@github.com wrote:
Oh, you wrote mqtt://ip and than the IP address. That’s different. And further you don‘t use the IP address of the ifan modul anywhere?! Just the mosquitto IP again. I will try that later when I‘m home.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rgavril/homebridge-mqtt-fan-tasmota/issues/4#issuecomment-482007597, or mute the thread https://github.com/notifications/unsubscribe-auth/AX44h_hv1yWG6hl7YR-QyvWZDt1Fg-Tnks5vfumRgaJpZM4bgmAc.
Ok, so that was it. Actually you don't need the mqtt plugin, any user accounts or version 6.2.1 of tasmota. After I got it working with the correct IP and Mosquitto always connected to the Ifan modul I reduced the setup again. I deleted the account which seem to be setup wrong, since the ifan didn't connect without 'Mosquitto -v' running. I deleted the mqtt plugin and entry in the homebridge config and also tried the latest version of tasmota. I also rebooted everything and it starts up running perfectly smooth.
So thank you for your help. I've learned a lot and maybe the available MQTT setup does help me for future projects as well. Issue closed.
I used the homebridge-mqtt for node-red…. I use 6.21 for two reason, one because I have devices in poor wifi area and the second is that 6.41 for so some reason keeps on login into the MQTT and there is a delay in the home app.
On 11 Apr 2019, at 18:35, Kevin Czaja notifications@github.com wrote:
Ok, so that was it. Actually you don't need the mqtt plugin, any user accounts or version 6.2.1 of tasmota. After I got it working with the correct IP and Mosquitto always connected to the Ifan modul I reduced the setup again. I deleted the account which seem to be setup wrong, since the ifan didn't connect without 'Mosquitto -v' running. I deleted the mqtt plugin and entry in the homebridge config and also tried the latest version of tasmota. I also rebooted everything and it starts up running perfectly smooth.
So thank you for your help. I've learned a lot and maybe the available MQTT setup does help me for future projects as well. Issue closed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rgavril/homebridge-mqtt-fan-tasmota/issues/4#issuecomment-482189621, or mute the thread https://github.com/notifications/unsubscribe-auth/AX44h-8nR3xNrKEMrV96nNFzkEoUdHFIks5vf2RFgaJpZM4bgmAc.
Remember the plug-in for the fan does not support login and password on mqtt. When you configured mosquito did you set it up with a login name and password..
Todo : Implement username and password MQTT authentication as seen on the plugin page
You can authenticate with username and password in URL so no need to codefix:
mqtt://username:password@127.0.0.1:1883
Hi, I installed the modul properly and the fan can be controlled via sonoff webinterface and the remote. Now I installed your plugin for controlling it via homebridge, put this into the config
and see the new accessory in the home app. Unfortunately there is not reaction when a push the fan icon in the home app. Well, it shows activated and the log writes this
but the sonoff modul does not react on this. Since I've no knowledge in mqtt I assume I'm missing an important part here. Can you help me?