Dummy Device MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
poudenes
Normal user
Posts: 16
Joined: 12 Jan 2018, 11:04

Dummy Device MQTT

#1 Post by poudenes » 10 Nov 2019, 12:46

Hi All,

I have couple of MEEK switches. Switch work perfect. Also the touch task is working (switch input - switch gpio-12)
I have add this one in Home Asssistant:

Code: Select all

switch:
- platform: mqtt
  command_topic: "homeassistant/MeekBathroom/Touch/Button/cmd"
  state_topic: "homeassistant/MeekBathroom/Touch/Button"
  payload_on: "1"
  payload_off: "0"
  state_on: "1"
  state_off: "0"
  name: "Bathroom Touch"
Also a other line in ESP is add:

Generic - Dummy Device with a value: Touch:
This will be turned on and off by a TaskValue in Rule.

What can I do to create a device that is able to be turned on and off by TaskValue in a Rule. but Also can be add to a "Sensor to Controller" and send directly his state change like the Touch button above? I only see all time interval with 60 sec, but and when I change this to 1, every second there will be a state send.

TD-er
Core team member
Posts: 1818
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Dummy Device MQTT

#2 Post by TD-er » 10 Nov 2019, 13:45

You should set the interval to either a large value, or zero and then run taskrun from the rules on your event.
See the command reference: https://espeasy.readthedocs.io/en/lates ... mmand.html

poudenes
Normal user
Posts: 16
Joined: 12 Jan 2018, 11:04

Re: Dummy Device MQTT

#3 Post by poudenes » 10 Nov 2019, 14:31

Thanks. I read but im new with this command. Do I add this in rules as well. Sorry for asking.

Set interval to 0 is not possible, then it goes back to 60

TD-er
Core team member
Posts: 1818
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Dummy Device MQTT

#4 Post by TD-er » 10 Nov 2019, 15:18

Then you should set it to something you don't need as interval (e.g. 900 for quarter of an hour) :)
In the rules you can set a timer and in the timer section of the rules you will call the taskrun command to "execute" the dummy plugin.


See the discussions here:
https://github.com/letscontrolit/ESPEasy/issues/1202
https://github.com/letscontrolit/ESPEasy/issues/2713

Or do I misinterpret your question and is it just that you like to temporary disable a task?

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests