Unable to control actuators

Hello there.
I have a lora esp32 LILYGO® TTGO V2.1-1.6 pair which i have successfully using them to have a reed switch’s state reported to me.
The issue is that i have is that i am unable to control a relay switch by using the actuator commands as written here : Actuators | OpenMQTTGateway v1.6.0
I have the relay at gpio 13 (obviously also vcc and ground at the correct pins) and i am using the command:
lora/OpenMQTTGateway/commands/MQTTtoONOFF and as payload the {"gpio":13,"cmd":"high_pulse"}
I also tried the {"gpio":13,"cmd":1} payload but with no success.
When i try the lora/OpenMQTTGateway/commands/MQTTtoSYS/config and {"cmd":"restart"}, the esp is indeed restarting, as such i know that my communication is correct.
Any ideas?
Thanks

I’ve just realized that the actuator code is running at the esp32 that runs the OMG, while i was wrongly expecting to have run on the sender esp32…Is what i am asking possible?

Yes this is possible, you would need to do some coding on the node receiver side to process the json message coming from the gateway and actuate the pin.
If you feel the competency doing it this could be a nice example to add in the repository:

Thanks for the reply. I am afraid that i am not good enough at coding. Could you point to me the way of how to send the message from homeassistant → gateway → sender node (which will be the receiver for the relay control, normally sends a reed switch state) .
Thanks

To have the gateway send a message this is mainly described here:

And a receiver example is here, that needs to be adapted:

1 Like

So in order to control the receiver, i have to send this message? →
home/OpenMQTTGateway/commands/MQTTtoLORA with payload
{"gpio":15,"cmd":"high_pulse"}
Correct?

Not really, this enable to control the actuator connected to the gateway.

You need to proceed the message you want at the receiver level, you could send {“cmd”:1} for example to the gateway, and modify the code of the receiver to process this json message

Ok , let me understand something. If i send a message to the gateway from homeassistant, the gateway node is programmed to broadcast the same message through lora chip? If yes, i only need to program the receiver node, to receive this message and do the corresponding action?

Yes indeed the gateway acts as a forwarder.

1 Like

If that is the case, then the answer to my question at 1st post is that the command i wrote is correct, the gateway is indeed forwarding the command to the lora that is listening but i need to adjust the code at the receiver so that it will execute the command. Right?

It is correct as long as you stick to this convention on the receiver node, this is a truth that you define, but it could be other messages.

Indeed, and you can take the example from ZactuatorONOFF.ino for this and adapt it for a receiver LORA node