Here is my simple one I pretty much just copied and pasted, but I have a question. Is it possible to have a repeating button press, with a long hold? I’m using MQTT to send the message from the button pressed on the home assistant screen, and then using node red to converted into the various infrared/network signals, but I wonder if it could be better.
Thanks for that. Above is my amended code with your hold action bit, but it’s trying out configuration errors. I doublechecked the spacing, but they must be something I’m missing. Thanks for any help.
Thank you, the initial dash was the problem, despite it being there when all the cards are combined, so there must’ve been a formatting error somewhere I can’t see.
So progress! However, I’m not getting multiple repeats in node red’s MQTT client. If I fire up MQTT Explorer, then they come through just fine, but I don’t even get one result if I hold down the buttom in node red. I know this is a Home Assistant forum, but if anyone has any ideas why they are being filtered in node red, that would be great to know!
Hmm not sure about nodered mqtt server. You could try setting up mqtt in homeassistant. It sort of sounds abit like a QoS or similar issue if it’s ignoring multiple close messages.
It certainly works over mqtt, it’s how I have it setup. The switch I use is a IR-mqtt switch in HA. Works for my volume control. I think my actual remote is in this thread already.
my MQTT server is set up in home assistant, I’m just using node red to receive the messages. That way I can decide, depending on whether my input source on my receiver is TV/Netflix/pay TV et cetera, to send it to the proper device.
I’ll have a go tomorrow changing the QOS, but it’s weird that home assistant is sending it out properly, even if it’s just QOS=0, and that node red isn’t picking it up.
I tried 1000, and even 5000 but it doesn’t even send it through once, well I should say it isn’t even received once. I I tried setting the qos: 1 with no improvement, and when you set the qos: 2, MQTT explorer shows qos: 0, while node red shows qos:1!
So you are using a “MQTT in” node in nodered correct? the mqtt in node should be qos 0 and the outgoing mqtt message from HA should be 0 or 1 . I think. I’m not aware of any reason otherwise why it would be getting filtered…
alternatively just change it to a switch in HA and pick it up in nodered as a “trigger: state” or “events: state” node.
I haven’t set up long-press, but I did set up an input number to track the volume level of a soundbar that’s controlled by IR only. When the number is adjusted, it loops volume up/down commands every 500ms. There can be a bit of latency but I haven’t seen any commands dropped using it like this.
Also wanted to share my remote config, I really like the way paper-button-row and fold-entity-row look together
If anyone was interested in the buttons, I have them broken down into templates (in the generic sense, not the {{}} sense) that I can quickly copy into a new remote:
Okay, progress. Using the “events: all” node with a filter of “call_service” the repeating MQTT message is displayed. I can then just use a switch filter with a property of: “msg.payload.event.service_data.payload” to find the message/MQTT payload I want.
My only concern is that it will be catching a lot of events, which might overload it somehow. But hopefully this will help someone else, even if it is a pretty dodgy workaround.
It would be nice to know why it isn’t working though. Come to think of it, EventGhost has the same problem with multiple MQTT messages in a row, so there must be something wrong, or an incompatibility somewhere…
The Entity ID is ‘undefined’, so that makes it a bit tricky. I tried using an automation to toggle an input boolean, and then monitor that state change, but it didn’t work with the long press.
Both button rows and the mini media player can be used in an entities: list, either in the vanilla entities card or something like fold row. So it works exactly the same way you would for any other entity in a fold row the button rows can be dropped into the fold row entities: list just like a regular entity, and from there I just have a couple of layers of nesting. I can share the full config if it helps, but it gets a bit convoluted, so I thought this snippet might make it clear: