Node-red and RfxCom

Hi all,

I am trying to add the node-red-contrib-rfxcom to my HA system (rpi4, V 0.114.3)
When I install a node for a switch, the integration in HASS stops working.
Is it possible to make it work in node-red and in HASS (yaml) both?
Anyone having experience with this?

rgds, André

I currently have the RfxCom device working in HA, and use NodeRed to trigger the actions through HA. This works.

Your question is about this, but the other way around.
I have recently learnt stuff is also possible to read and interact directly with the controller(s), but I havent switched to that configuration setup yet. Havent tried yet. interesting to learn this.

I want to move from Rfxcom in HA to Rfxcom in node-red. The problem is that I get it working in node-red, or working in HA. But not both at the same time. I thin k this has something to do with the USB/serial port. Is this a port which is dedicated to only one service at a time?

André

Yes, I agree and believe so.
Sounds logical as well. HA has node red in its own docker, so they are isolated from eachother.

We could do it in NR, and then push things to HA. Either by booleans, or sensor templates. But I think that is too much work without much benefit.

Just to add. IMHO the route HA > NR is perfect currently anyway. Communication is instant. Only during HA restarts things are not connected.

The reason for me to try rfxcom in node-red is that the light-switch response is quite slow on a pir-sensor in rfxcomm-HA.
When I enter a room, the pir is reacting immediately, but the light switches on after appr 2 seconds.
I want to give it a try in node-red.and see if this will react quicker.

André

OK, understood. The reason for wanting NR to be the lead is clear.
Then it might be made possible by pushing info from NR to HA, using sensor_template, or other virtual means. Should be possible. IF you go down this path, please share your experience. Id really like to know if it is any good like that. :slight_smile:

I just thought.
What if you were to use MQTT in between rfxcom and HA. HA can even supply you the mosquitto broker for that.
Personally, I am going to use that in future, as soon as OpenZWave container is out of beta, and I have have more experience in mqtt. Benefit of doing it like this, containers stay running during HA restarts. this includes NodeRed, OpenZWave and Mosquitto broker container. So the automation system will stay running.

In NR, get your rfxcom stuff working.
IN HA, setup mosquitto mqtt broker (addon)
IN HA, setup mqtt (integration)
IN NR, set publish your thing to the MQTT broker. You can program a topic yourself for that.
IN HA ,subscribe to stuff on the MQTT broker. Listen to the topic you created above.
That way you have values, and status updates coming in (and out if required) towards HA complete again. And I suspect that because MQTT is such a light weight protocol, it will be fast as directly in NR.

:slight_smile:
Just a thought.

Hi Nontijt,

That is stuff for a more expierenced user, which I am not! :frowning_face:
Nevertheless I will try your suggestion step by step. mqtt seems interesting also for other stuff.

Thanks for this idea,
André

I have a virtual environment, whith HA
I have copied it, and Im testing it with this idea myself on the copy. Just to be save… gheehhee…

So far I have in NR and reporting and communicating both ways with HA through MQTT:

  • roborock (xiaomi) vacuum cleaner
  • shelly switches
  • ozwave is possible, but a lot of reprogramming from old zwave plugin to mqtt.

I still need to try to get RFXCOM in there as well. Im sure it will work.
I have found that scripts are easier in HA. timers or delays are easier in HA. At least, I found the logic more difficult to grasp in NR.

Your right, it takes quite some effort and trial/error to get to that ultimate point. :slight_smile:

Succes Andre. Het lukt je vast. Als ik het kan…

Same problem here. i have 1 flow in NR, a door switch connected to a wall plug. It takes 4 secons for the wall plug to power on after the door switch is opened. Rfxcom is only configured in node red, not in HA.
When i place a debug node behind the door switch the output appears immediatly after i open this switch. Still it takes 4 seconds for the plug to power on

I also have ikea sensors and lights connected through a conbee stick in NR, they switch with no noticable delay. Sensors and lights are setup in deconz app, no delay there. When i switch these lights in NR i also experience delay

Following this thread to find some answers…hopefully

This means that it has no use to move from HA to NodeRed with the Rfxcom devices to eliminate the delays. I think Rfxcom has a kind of polling system which causes the delay when it gets more commands at the same time.
I changed the switch for a Tuya lightbulb. Now the response is very fast with the same Rfxcomm-Pir sensor I used before.

André