[APP][Pro] Tasmota MQTT

Ok that makes sense if you look it very purist like this :smiley:
But in my real life logic would make more sense that the buildup of the statement does not change, only the variables in that statement. Reverse of On is Off.
So by that logic “all are on”
Socket 1 == on AND Socket 2 == on AND Socket3 == on
would change to “all are off”
Socket 1 != on AND Socket 2 != on AND Socket3 != on

Same goes for the “some are on”
Socket 1 == on OR Socket 2 == on OR Socket3 == on
to “some are off”
Socket 1 != on OR Socket 2 != on OR Socket3 != on

But nevertheless, thanks for explaining. I at least know that the descriptions match the outcome and will be very much able to work with that :slight_smile:

And also for the shutters, don’t know if you have a shutter device yourself? Maybe this will also help in the setup of the flow logic. Below are also two settings I see in all shutter device templates and what I have also implemented. This ensures that from the device point it can never happen that more that one of the relays (and attached buttons/switches) is active at the same time. This is also important to be sure never to overload your curtain/screen/shutter by providing power on the up & down line at the same time. I don’t the motor will like that :wink:

InterLock 1,2,3 # lock the relays, only one relay can be on

Rule1 on Power1#State=1 do backlog Power3 0; Power2 0 endon
on Power2#State=1 do backlog Power1 0; Power2 0; Power3 0 endon
on Power3#State=1 do backlog Power1 0; Power2 0 endon

Hi,
any idea why this event is triggered twice eg. when linked to notification to mobile ?
obrazek

Yep, that is what I was trying to implement at the beginning but it is not possible. Inversion of condition card done by homey SDK not by application, so inside the app I don’t know if a condition was inverted. The only thing I can do is adjust the card header to display what the card is presenting when it is inverted.
We are playing on Athom’s field should play by their rules.

I don’t have a shutter device but I configured one of my Sonoff SV to behave like one. It works OK. I don’t hear relays clicks but besides that, it works perfectly. Also now when I detect that shutters configured I ignore relays completely and work only with shutters in MQTT. It makes things easier but the side effect will be it is impossible to use shutters and switches on the same device. It will also give all control of curtains to tasmota device. The application will only tell it: “close shutter #1” or “set shutter #2 to position 75%”.

I will take a look. It is possible that I broke some checks in latest version.

I checked and it worked OK. Can you, please, configure your action flow card like this:


So you will get a notification with device name, id, and availability status, like this:

Maybe then we will be able to see where problem is.

1 Like

Pavlo I actually upgraded yesterday to latest Tasmota 9.2.0.6 and so far I’m not getting double notifications. It’s odd that since certain Tasmota version the “ping” command seems to be failing more often compared to previous versions (and I assume also “mqtt” availability as such then).
So maybe it’s not problem of your app after all…

Not sure what is going on if Tasmota is actually very close to router (but I have that problem on all my Tasmotas)
obrazek

It could also be that ping responses just aren’t given a high priority in the network stack.

1 Like

In the application, there is a direct check to trigger events only if availability changed. So if you have a double event it is possible that the device became unavailable and then immediately available again.

2All, is there anybody who using 2 (or more) different shutters control devices on the same tasmota device? Theoretically, tasmota device can control up to 8 relays and each pair of relays can control 1 shutter so it is possible to have 4 shutters. And it is a huge pain to support it, and also potential problems with voice assistants (you would be able to control only the first shutter or all of them together depending on how I will implement it). Everything will be much easier if there will be only one shutter. I have a strong suspicion that nobody needs multiple shutter support. If there will be no request I will implement only one shutter per tasmota device support.

I’ve never seen a device with two shutters on the same device. You probably could build it yourself, but do you want to support all possible home built combinations?

Only devices I know (and own) only support one shutter, so I think you’re good in implementing only one shutter.

In a perfect world, I would like to implement full support for Tasmota devices for Homey. But it is not really reachable (at least within the amount of time that I can spend). So my goal is less ambitious: support the most useful configurations. So I am training to avoid implementation of the configuration that nobody use and spend time on more usedfull options.

It is just a matter of configuration. I configured my test Sonoff SV as multi shutter device for testing purposes.
Thing is that Homey build in a way that one device should support not more than one function of each type. Then everything is easy. Automatic voice assistant, flow cards already there. But if you need to have a couple of functions of dame type in one device it is just pain. It is possible but difficult.

OK. Version 0.8.5 available for testing: Tasmota MQTT | Homey
Added support for shutters with some limitations: 1. only one shutter control; device per tasmota device supported. 2. If there is a shutter configured no switches available (you still can use sensors). Also improved device detection, now it should work faster and more reliable. I fixed (at least I hope I did) the problem with 30 seconds timeout when adding a device from outside of home network.

What device is used for the shutters???

Because I’m already controlling my shutters with the Sonoff Dual and the Tasmota MQTT app.
I also configured the module as described on the Tasmota Wiki to control shutters.

So I don’t understand what is the difference now.

See my post a while back : Tasmota MQTT application - #176 by mvanlijden
This is (mostly) for these type of devices with two or three buttons. In Tasmota you can activate shutter support SetOption80 and you will receive the shutter slide. Also to ensure no overload on the shutter motor these devices typically have an interlock in place to ensure both lines can’t be active at the same time.

I’ve installed the test version and will test tonight. Will let you know if I find anything

Any device with at least two relays can be configured for this. As @mvanlijden correctly said you need to enable SetOptions80. Then Tasmota will start treat relays shutter control device. The advantage of using it as a shutter device in Homey is a more convenient interface and flows and better Alexa/Google voice assistant integration.

Thanks for testing!

I had already configured my devices as described in this article Shutters and Blinds - Tasmota
And they are already working correct with the Tasmota MQTT v0.8.3 app so therefore I’m a bit confused.
But maybe I have to wait for the new version to be released and see it on my system.

Thanks for the support en development on this app.

Seems to be working fine!
I found that my Tasmota setup had some flaws in it, because of the setup of the device template I used. Switch1/Relay1 was up, Switch2/Relay2 was stop and Switch3/Relay3 was down, all fine if you look at the button layout of my device. However Shutters in Tasmota always take relays in couples, so numbers 1 and 2 for up and down. There is no ShutterMode that couples 1 and 3 together. With that setup my buttons and relays worked fine in the physical world, but the shutterposition made no sense and would also go down if i pressed stop (relay2). After changing it so what up is sw1/relay1, down sw2/relay2 and sw3/relay3 is stop, the logic on the shutter worked.
This made sure that your implementation, based on shutter1, also worked great! :slight_smile:

Sending to a position works, and also using the buttons give the correct action on my device. All types of control seem to be working ok. The only thing is that stop command does nothing. But i do not think this is because of you implementation, because when i issue the ShutterStop command in console also nothing happens. I see the correct message being sent in MQTT, but my device just doesn’t do anything with it. I am still digging in the Tasmota documentation why stop does nothing.
On my physical device this is fixed because the switches are interlocked, so activating the stop button deactivates the others. Pressing the button also issues and ShutterStop, causing the software to stop the shutter. But sending the ShutterStop command in console does not deactivate anything… Hope i can find something to fix this.

Ok I fixed my config and now all controls work like a charm! :grin:
The problem was in the fact that I used a PulseTime for my buttons. Which rendered the stop command ineffective. I do wonder now how i’m going to use these on my curtain motors which track a position themselves and can be operated just by pulling on the curtain itself, giving no update on position to the controller. But that’s another problem for another time haha

For reference for other users. This template and setup is the one I am now using. This is the only one direction of setup that allows the Shutter commands to fully work. Take note of the PulseTime and ShutterRelay1 here.

I will look into flow triggers later, maybe this weekend.

Testing with the shutters and having notifications on every status. When activating down through the homey interface, i get one notification. When activating stop i get three notifications, first stop, then down, then stop.
Same goes for up and then stop.

Could this be that the first trigger is from the action in Homey, the second and third triggers are from statusses from the device imported into Homey? That there is a delay between sending the action and the status reporting back being the same?

It could be the result of a delay caused by MQTT and tasmota command processing. When the shutter is active it sends an MQTT message every second. Activating “down” triggers an event and then messages start arriving every second, then you press stop and this action itself triggers an event, but Tasmota didn’t process the command yet and sends a new MQTT message with the old status “down” it triggers another event, and after processing command tasmota sends status “stop” which is triggers third event. I will think about how to fix this.
And thanks for testing, your reports really useful and helps me to figure out where the root cause of the problem.

1 Like

You’re very welcome! :slight_smile:
I’ve just received some new switched for other curtains that are compatible with Tasmota. Unfortunately these don’t work with Tuya-convert, so will have to rig up a hardware flasher.
After that I will replace all the curtain/shutter switches I have with these, so I can migrate everything from Tuya to Tasmota/Homey. If you need any more help or testing, don’t hesitate to contact me.