Limit a signal or payload?

Hello,

Does anyone know a solution for my problem:

An "mqtt-in" sends a String: "ON" every 8 seconds. This activates an "openHAB_Switch_Item". If the transmission is interrupted by "mqtt-in" for more than 20 seconds, a "trigger node" sends a String: "OFF" and the "openHAB_Switch_Item" is switched off.

That works and it's all OK!

Which node do I have to put between "mqtt-in" and "openHAB_Switch_Item" so that an "ON" is only sent once and not every 8 seconds? And how do I have to configure this node?
So sends "mqtt-in", then once "ON" until the "trigger node" "OFF" switch. Sends "mqtt-in" again, then again "ON" etc.

Do you understand what I mean?

[{"id":"66b37773.104628","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"6d48a4d2.67b09c","type":"inject","z":"66b37773.104628","name":"MQTT Broker","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":570,"y":420,"wires":[["8afbb924.857ce8","d1901a6c.7558a8"]]},{"id":"8afbb924.857ce8","type":"openhab2-out","z":"66b37773.104628","name":"openHAB Switch Item","controller":"","itemname":"GTag_NR_gruen","topic":"ItemCommand","payload":"","x":1110,"y":420,"wires":[[]]},{"id":"d1901a6c.7558a8","type":"trigger","z":"66b37773.104628","name":"","op1":"","op2":"OFF","op1type":"nul","op2type":"str","duration":"20","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":840,"y":360,"wires":[["8afbb924.857ce8"]]}]

Thank you and have a healthy Christmas

An RBE node should do the job.

PS, did you make that graphic (or find it)?

The "rbe-node" is great! :slight_smile:
Thanks, it works great. That's exactly what I wanted.

I made the graphics myself, I think a picture explains it better.

2 Likes

It does. How did you make it (if you dont mind)?

That with the picture is quickly explained:

  • a screenshot of the Node-Red Flow ->
  • in GIMP a "*.png" with transparent background was created from it ->
  • rendered an "arrow sign animation" with BLENDER https://www.youtube.com/watch?v=C9ZVSxzh6JA ->
  • ".png" and animation with text added in a video editor and a ".mp4" video created ->
  • the video converted into an animated GIF with Instagiffer https://instagiffer.com/ ->
  • uploaded the "*.gif" to Imgur https://imgur.com/ ->
  • added the Imgur "BBCode" to the forum post

If you have any further questions, feel free to ask ...

a good evening

Thats quite some task - i thought there was some nice and easy web site or application :wink:

PS, there is no need for last 2 steps (you can drag and drop the gif straight into the reply)


Thanks for the reply.

Oh I did not know that!
I will try it...

In fact if the image data is in your clipboard, you can paste that straight into a reply too. (i.e. i often use greenshot or ImageX to do an screenshot image snippet, annotate it, then copy+paste it straight into a reply

e.g.. no files were hurt in the making of this clipboard screenshot ...

image

Moin,

It's a very cool method!
I will use them in the future ...
Thank you and I wish you a happy and healthy Christmas...

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.