Controlling relay on generic node

Hello,

I’m trying to control relay on my (battery powered) node running generic node firmware. By following the documentation (https://github.com/hardwario/bcf-generic-node), I’m able to read various values (temperature, button press), but I’m failing at writing relay commands (failing = node does not respond to any attempt).

I’ve read on How to control remote relay that controlling relay is possible only with generic node with power module, but the bcf-generic-node does not mention any constraints about this. However I’d expect some limitation on receiving commands thanks to battery powered operation, but I’m unable to find any details about this.

Thank you for any advice.

Yes, that’s right, the relay can only be controlled in the generic firmware with the version for the power module. We will fix the readme.

Later I’ve found that radio receiving is really enabled only for builds with power module. I’m writing it here for further reference as I spent some time on finding out this.

Yes,
because consumption at continental reception is 10mA it cannot be operated with a battery.

But for custom firmware exist way how listen on battery.
You can set the timeout for which the node listens after the sent message.
When I wrote this function, I sent the temperature and in response to it in Node-RED I set the relay over radio. I think a timeout of 100ms was enough.

1 Like

Thank you for the information. I’ve tested twr_radio_set_rx_timeout_for_sleeping_node and it works as expected!

1 Like