South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
Yes using your home automation framework. I use appdaemon dashboards with home assistantIs it possible to remotely control sonoff switches that have tasmota firmware. I can switch my normal firmware switches using ewelink app on and off remotely but not the tasmota ones using yeti app
Should work out the box with Yeti, as well. Were they not discoverable? Are you able to turn on/off via the web interface?Is it possible to remotely control sonoff switches that have tasmota firmware. I can switch my normal firmware switches using ewelink app on and off remotely but not the tasmota ones using yeti app
Config checks that fail are almost ALWAYS Yaml formatting and indentation issues. What is the error?
This:Code:command_topic: "cmnd/sonoffsv01/POWER" code] means the name of the MQTT topic that you gave it in the Tasmota config. In other words, here: [ATTACH=full]594670[/ATTACH] I can share mine, but be aware I'm using one Sonoff SV purely for opening / closing of the gate and then another Sonoff Basic connected to a light but also with an additional reed switch for detecting whether the gate is open or not. And I don't have it set up as a cover.[/QUOTE] Could you please share your config. I’ve started from scratch and it’s still not working. I am missing out on some understanding of how the configuration, group and other files relate to each other. I am using the MQTT broker from the store and not the embedded one and not even sure it work. It should have discovered my gate motor but it doesn’t appear to . Also unsure if I am making a mistake setting up a Mqtt username / password. The so off sv using the same Mqtt username/password. Getting so frustrated that it’s not working . Thanks In advance.
They work and are discoverable on my local network and also via the web interface I want to be able to use them when I am away from home say for instance giving access to the yard to the alarm company when not at homeShould work out the box with Yeti, as well. Were they not discoverable? Are you able to turn on/off via the web interface?
Thanks does home assistant require codingYes using your home automation framework. I use appdaemon dashboards with home assistant
Yes, that will require a bit more than Yeti, I'm afraid.They work and are discoverable on my local network and also via the web interface I want to be able to use them when I am away from home say for instance giving access to the yard to the alarm company when not at home
You need to access them via HA or a MQTT server with the relevant port opened up in your modem/router.They work and are discoverable on my local network and also via the web interface I want to be able to use them when I am away from home say for instance giving access to the yard to the alarm company when not at home
You need to access them via HA or a MQTT server with the relevant port opened up in your modem/router.
Direct access would mean having to opening a port for each device, not recommended and clumsy.
You would also need a dynamic dns like Duck DNS.
Not necessarily depending on how the App interfaces with it could only require one port.
But I know nothing of this Yeti thing and use HomeKit for all this.
Each Sonoff device has its own IP address.
You would need to do port forwarding along the lines of: ( assuming myhouse.duckdns.org is the external address of your router)
- myhouse.duckdns.org port 4001 - > 192.168.1.11 port 80 ( Light 1) ( if the app uses http to communicate with it)
- myhouse.duckdns.org port 4002 - > 192.168.1.12 port 80 ( Light 2)
- myhouse.duckdns.org port 4003 - > 192.168.1.13 port 80 ( Light 3)
and then still to tell your app to use a different port for each device, very messy if workable at all.
That's the thing. I don't know what the bare minimum is. I am just following the instructions as I find thinking all of it is the bare minimum .. found another link - so will give that a go tonight.Forget groups and other nonsense.
Get the switch working first.
Make the code EXACTLY the same with the spacing and everything.
Then post the output of the error here.
Internal MQTT broker works fine, assuming you configured it correctly. Is this your first MQTT device? Post the lines for that config as well.
If you are configuring it manually then discovery is kind of irrelevant anyway.
***
Maybe also leave the sensor part out of it and try getting the switch relay working first. Also remember you need to restart HA after you added something to config (if config works).
That's the thing. I don't know what the bare minimum is. I am just following the instructions as I find thinking all of it is the bare minimum .. found another link - so will give that a go tonight.
- platform: mqtt
name: "Bedroom"
icon: mdi:radiator
state_topic: "stat/sonoff_bedroom/POWER"
command_topic: "cmnd/sonoff_bedroom/POWER"
availability_topic: "tele/sonoff_bedroom/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"

mosquitto_sub -h 127.0.0.1 -v -t "#"
Thank you. Will give it a go tonight . CheersOkay here you go.
Note that I split my switches out into a separate file so it looks like this...and I recommend you do the same now before it starts growing.
configuration.yaml (can put it anywhere but right at the bottom is fine, you can call the file anything.yaml)
switch: !include switches.yaml
switches.yaml (Note there are two spaces in front of - platform, and 4 spaces before every other line so they are justified)
Code:- platform: mqtt name: "Bedroom" icon: mdi:radiator state_topic: "stat/sonoff_bedroom/POWER" command_topic: "cmnd/sonoff_bedroom/POWER" availability_topic: "tele/sonoff_bedroom/LWT" qos: 1 payload_on: "ON" payload_off: "OFF" payload_available: "Online" payload_not_available: "Offline"
These should show up anywhere on the Dashboard after a reboot and you'll have a simple switch to trigger on and off. Then you can go about doing the other stuff to bring the reed switch into the mix.
Failing that if you wait I plan to do my Garage/Gate/Alarm tomorrow with three SV's so will probably have a full configuration after wards.
Thank you. Will give it a go tonight . Cheers
Okay here you go.
Note that I split my switches out into a separate file so it looks like this...and I recommend you do the same now before it starts growing.
configuration.yaml (can put it anywhere but right at the bottom is fine, you can call the file anything.yaml)
switch: !include switches.yaml
switches.yaml (Note there are two spaces in front of - platform, and 4 spaces before every other line so they are justified)
Code:- platform: mqtt name: "Bedroom" icon: mdi:radiator state_topic: "stat/sonoff_bedroom/POWER" command_topic: "cmnd/sonoff_bedroom/POWER" availability_topic: "tele/sonoff_bedroom/LWT" qos: 1 payload_on: "ON" payload_off: "OFF" payload_available: "Online" payload_not_available: "Offline"
These should show up anywhere on the Dashboard after a reboot and you'll have a simple switch to trigger on and off. Then you can go about doing the other stuff to bring the reed switch into the mix.
Failing that if you wait I plan to do my Garage/Gate/Alarm tomorrow with three SV's so will probably have a full configuration after wards.
*****
The icon you can obviously change later to whatever you fancy. All you should need to change here is the name you "sonoff_bedroom" with whatever you configured here...
Re-read our earlier post and see I read it wrong that you are NOT using the embedded MQTT server. Might be worth trying that if you want as it's pretty simple and works for this stuff happily. But if you got the Mosquitto one setup and known to be working should be fine.
Then you can just login there and follow all MQTT messages to troubleshoot with this...
Code:mosquitto_sub -h 127.0.0.1 -v -t "#"
[configuration.yaml]
mqtt:
broker: 192.168.2.2
switch: !include switches.yaml
[Switches.yaml]
- platform: mqtt
name: "FrontGate"
icon: mdi:radiator
state_topic: "stat/SNOFF_FrontGate/POWER"
command_topic: "cmnd/SNOFF_FrontGate/POWER"
availability_topic: "tele/SNOFF_FrontGate/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
[B][FROM SONOFF GATE MOTOR CONSOLE][/B]
20:59:30 MQT: stat/SNOFF_FrontGate/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.2.2","MqttPort":1883,"MqttClientMask":"SNOFF_FrontGate","MqttClient":"SNOFF_FrontGate","MqttUser":"mosquitobroker","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
20:59:30 MQT: stat/SNOFF_FrontGate/STATUS7 = {"StatusTIM":{"UTC":"Thu Dec 20 19:59:30 2018","Local":"Thu Dec 20 20:59:30 2018","StartDST":"Sun Mar 25 02:00:00 2018","EndDST":"Sun Oct 28 03:00:00 2018","Timezone":1,"Sunrise":"08:40","Sunset":"16:55"}}
20:59:30 MQT: stat/SNOFF_FrontGate/STATUS10 = {"StatusSNS":{"Time":"2018-12-20T20:59:30","Switch2":"OFF"}}
20:59:30 MQT: stat/SNOFF_FrontGate/STATUS11 = {"StatusSTS":{"Time":"2018-12-20T20:59:30","Uptime":"0T00:14:35","Vcc":3.190,"POWER":"OFF","Wifi":{"AP":1,"SSId":"iOT","BSSId":"CC:33:BB:DA:91:42","Channel":6,"RSSI":68}}}
21:00:20 MQT: tele/SNOFF_FrontGate/STATE = {"Time":"2018-12-20T21:00:20","Uptime":"0T00:15:25","Vcc":3.190,"POWER":"OFF","Wifi":{"AP":1,"SSId":"iOT","BSSId":"CC:33:BB:DA:91:42","Channel":6,"RSSI":62}}
21:00:20 MQT: tele/SNOFF_FrontGate/SENSOR = {"Time":"2018-12-20T21:00:20","Switch2":"OFF"}
21:02:00 MQT: tele/SNOFF_FrontGate/UPTIME = {"Time":"2018-12-20T21:02:00","Uptime":"0T00:17:05"}
[B][FROM Mosquito Broker Addin][/B]
[B][CONFIGURATION OF MQTT Broker][/B]
{
"logins": [
{
"username": "mosquitobroker",
"password": "xxxxx"
}
],
"anonymous": true,
"customize": {
"active": false,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}
[B][LOGFILE OF MOSQUITO BROKER ADDIN][/B]
[INFO] Setup mosquitto configuration
[INFO] Found local users inside config
[INFO] Initialize Hass.io Add-on services
[INFO] Initialize Home Assistant discovery
[INFO] Start Mosquitto daemon
1545334298: mosquitto version 1.4.15 (build date 2018-03-04 15:35:59+0000) starting
1545334298: Config loaded from /etc/mosquitto.conf.
1545334298: *** auth-plug: startup
1545334298: ** Configured order: http
1545334298: Opening ipv4 listen socket on port 1883.
1545334298: Opening ipv6 listen socket on port 1883.
1545334298: Opening websockets listen socket on port 1884.
1545334298: Opening ipv4 listen socket on port 8883.
1545334298: Opening ipv6 listen socket on port 8883.
1545334298: Opening websockets listen socket on port 8884.
1545334298: Warning: Mosquitto should not be run as root/administrator.
1545334305: New connection from 192.168.2.51 on port 1883.
[INFO] found mosquitobroker on local database
1545334305: New client connected from 192.168.2.51 as SNOFF_FrontGate (c1, k10, u'mosquitobroker').
1545335108: Client SNOFF_FrontGate has exceeded timeout, disconnecting.
1545335108: Socket error on client SNOFF_FrontGate, disconnecting.
1545335112: New connection from 192.168.2.51 on port 1883.
[INFO] found mosquitobroker on local database
1545335112: New client connected from 192.168.2.51 as SNOFF_FrontGate (c1, k10, u'mosquitobroker').
1545335976: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1545335976: New client connected from 172.30.32.1 as 5b16f736-3ee3-4123-bf3e-10d427cc8559 (c1, k60, u'homeassistant').
1545336098: Saving in-memory database to /data/mosquitto.db.

I am giving up for this week. I will wait for your sonoff SV config.
Here is what the pertinent stuff looks like. It just doesn't appear on the homepage of HASS.IO even after reboots. Also note, I installed TasAdmin today and it discovered the gatemotor and with that I can control the gate. So I think it could be hass.io config issue and not a mqtt issue?
YAML:[configuration.yaml] mqtt: broker: 192.168.2.2 switch: !include switches.yaml [Switches.yaml] - platform: mqtt name: "FrontGate" icon: mdi:radiator state_topic: "stat/SNOFF_FrontGate/POWER" command_topic: "cmnd/SNOFF_FrontGate/POWER" availability_topic: "tele/SNOFF_FrontGate/LWT" qos: 1 payload_on: "ON" payload_off: "OFF" payload_available: "Online" payload_not_available: "Offline" [B][FROM SONOFF GATE MOTOR CONSOLE][/B] 20:59:30 MQT: stat/SNOFF_FrontGate/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.2.2","MqttPort":1883,"MqttClientMask":"SNOFF_FrontGate","MqttClient":"SNOFF_FrontGate","MqttUser":"mosquitobroker","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}} 20:59:30 MQT: stat/SNOFF_FrontGate/STATUS7 = {"StatusTIM":{"UTC":"Thu Dec 20 19:59:30 2018","Local":"Thu Dec 20 20:59:30 2018","StartDST":"Sun Mar 25 02:00:00 2018","EndDST":"Sun Oct 28 03:00:00 2018","Timezone":1,"Sunrise":"08:40","Sunset":"16:55"}} 20:59:30 MQT: stat/SNOFF_FrontGate/STATUS10 = {"StatusSNS":{"Time":"2018-12-20T20:59:30","Switch2":"OFF"}} 20:59:30 MQT: stat/SNOFF_FrontGate/STATUS11 = {"StatusSTS":{"Time":"2018-12-20T20:59:30","Uptime":"0T00:14:35","Vcc":3.190,"POWER":"OFF","Wifi":{"AP":1,"SSId":"iOT","BSSId":"CC:33:BB:DA:91:42","Channel":6,"RSSI":68}}} 21:00:20 MQT: tele/SNOFF_FrontGate/STATE = {"Time":"2018-12-20T21:00:20","Uptime":"0T00:15:25","Vcc":3.190,"POWER":"OFF","Wifi":{"AP":1,"SSId":"iOT","BSSId":"CC:33:BB:DA:91:42","Channel":6,"RSSI":62}} 21:00:20 MQT: tele/SNOFF_FrontGate/SENSOR = {"Time":"2018-12-20T21:00:20","Switch2":"OFF"} 21:02:00 MQT: tele/SNOFF_FrontGate/UPTIME = {"Time":"2018-12-20T21:02:00","Uptime":"0T00:17:05"} [B][FROM Mosquito Broker Addin][/B] [B][CONFIGURATION OF MQTT Broker][/B] { "logins": [ { "username": "mosquitobroker", "password": "xxxxx" } ], "anonymous": true, "customize": { "active": false, "folder": "mosquitto" }, "certfile": "fullchain.pem", "keyfile": "privkey.pem" } [B][LOGFILE OF MOSQUITO BROKER ADDIN][/B] [INFO] Setup mosquitto configuration [INFO] Found local users inside config [INFO] Initialize Hass.io Add-on services [INFO] Initialize Home Assistant discovery [INFO] Start Mosquitto daemon 1545334298: mosquitto version 1.4.15 (build date 2018-03-04 15:35:59+0000) starting 1545334298: Config loaded from /etc/mosquitto.conf. 1545334298: *** auth-plug: startup 1545334298: ** Configured order: http 1545334298: Opening ipv4 listen socket on port 1883. 1545334298: Opening ipv6 listen socket on port 1883. 1545334298: Opening websockets listen socket on port 1884. 1545334298: Opening ipv4 listen socket on port 8883. 1545334298: Opening ipv6 listen socket on port 8883. 1545334298: Opening websockets listen socket on port 8884. 1545334298: Warning: Mosquitto should not be run as root/administrator. 1545334305: New connection from 192.168.2.51 on port 1883. [INFO] found mosquitobroker on local database 1545334305: New client connected from 192.168.2.51 as SNOFF_FrontGate (c1, k10, u'mosquitobroker'). 1545335108: Client SNOFF_FrontGate has exceeded timeout, disconnecting. 1545335108: Socket error on client SNOFF_FrontGate, disconnecting. 1545335112: New connection from 192.168.2.51 on port 1883. [INFO] found mosquitobroker on local database 1545335112: New client connected from 192.168.2.51 as SNOFF_FrontGate (c1, k10, u'mosquitobroker'). 1545335976: New connection from 172.30.32.1 on port 1883. [INFO] found homeassistant on local database 1545335976: New client connected from 172.30.32.1 as 5b16f736-3ee3-4123-bf3e-10d427cc8559 (c1, k60, u'homeassistant'). 1545336098: Saving in-memory database to /data/mosquitto.db.
One interesting point:-
The device connecting with IP 172.30.32.1 - appears to be Hass.io connecting to the broker. It only appeared after I added the mqtt broker IP in the configuration.yaml file (as per the website) ... the IP doesn't make sense to me though. I have not used that network anywhere - don't know how hass.io is using that IP?