Delay with RFXTRX

@ xl15

Did you get the delay in triggering solved?
I experience the same problem using RFXTRX devices to trigger HA. Automatons triggered manually in the UI are working instantly, but triggering the automation with a RFXTRX device take about 3-10 seconds

Regards
OWK

Worth checking your logs to see if it takes 3 to 10 seconds for HA to receive the event from RFXTRX.

@Hi Tinkerer: I enabled the HA logger with no options; that should show everything.

My setup is to have 3 ceiling lights switched on when the front door opens. Normally when dark only, but for now the condition is not used.

It took actually 23 seconds to see action after the trigger. In debug that is at the following times:

  • RFXTRX signal is received at 15:58:42
  • confirmation form HA is seen at 15:59:05
  • Script starts at 15:59:05

What’s your opinion?

Best regards,
OWK

Marmitec DS-90 sensor configured:

  - platform: rfxtrx
    automatic_add: False
    devices:
      08200065cbc4040059:
        name: **Voordeur**
        fire_event: True
      082000672b24840259:
        name: Voordeur ext.
        fire_event: True

Automation used:

- alias: 'Hallway spots on when dark and frontdoor opens'
  initial_state: 'on'
  hide_entity: false
  trigger:
    - platform: state
      entity_id: sensor.voordeur_sensor_status
      to: 'Alarm'
#  condition:
#      - condition: state
#        entity_id: sun.sun
#        state: 'below_horizon'
  action:
    - service: light.turn_on
      entity_id:
        - light.gang_plafond_1
        - light.gang_plafond_2
        - light.gang_plafond_6
      data:
        brightness: 25
    - service: notify.pushover_owk6s
      data_template:
        message: "Voordeur open"
        title: "Home-assistant VS21"
    - delay: '00:02:00'
    - service: light.turn_off
      entity_id:
        - light.gang_plafond_1
        - light.gang_plafond_2
        - light.gang_plafond_6

Debug result for opening the front door:
15:58:42 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: cbc40432 Class: RFXtrxDevice Sub: 0, Pkt_id: 08200005cbc4040259)

15:58:42 INFO (MainThread) [homeassistant.core] Bus:Handling <Event signal_received[L]: entity_id=sensor.voordeur_sensor_status>

15:59:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.voordeur_sensor_status, old_state=<state sensor.voordeur_sensor_status=unknown; unit_of_measurement=, friendly_name=Voordeur Sensor Status @ 2017-09-30T15:56:29.985920+02:00>, new_state=<state sensor.voordeur_sensor_status=Alarm; Sensor Status=Alarm, Battery numeric=9, Rssi numeric=5, unit_of_measurement=, friendly_name=Voordeur Sensor Status @ 2017-09-30T15:59:05.608981+02:00>>

15:59:05 INFO (MainThread) [homeassistant.components.automation] Executing Hallway spots on when dark and frontdoor opens

15:59:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event logbook_entry[L]: name=Hallway spots on when dark and frontdoor opens, message=has been triggered, domain=automation, entity_id=automation.hallway_spots_on_when_dark_and_frontdoor_opens>

15:59:05 INFO (MainThread) [homeassistant.helpers.script] Script Hallway spots on when dark and frontdoor opens: Running script

15:59:05 INFO (MainThread) [homeassistant.helpers.script] Script Hallway spots on when dark and frontdoor opens: Executing step call service

15:59:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=brightness=25, entity_id=[‘light.gang_plafond_1’, ‘light.gang_plafond_2’, ‘light.gang_plafond_6’], service_call_id=3040848880-6>

15:59:05 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 2926113552: Sending {‘id’: 2, ‘type’: ‘event’, ‘event’: {‘event_type’: ‘state_changed’, ‘data’: {‘entity_id’: ‘sensor.voordeur_sensor_status’, ‘old_state’: <state sensor.voordeur_sensor_status=unknown; unit_of_measurement=, friendly_name=Voordeur Sensor Status @ 2017-09-30T15:56:29.985920+02:00>, ‘new_state’: <state sensor.voordeur_sensor_status=Alarm; Sensor Status=Alarm, Battery numeric=9, Rssi numeric=5, unit_of_measurement=, friendly_name=Voordeur Sensor Status @ 2017-09-30T15:59:05.608981+02:00>}, ‘origin’: ‘LOCAL’, ‘time_fired’: datetime.datetime(2017, 9, 30, 13, 59, 5, 609171, tzinfo=)}}

15:59:05 DEBUG (SyncWorker_9) [phue] {‘on’: True, ‘bri’: 25, ‘alert’: ‘none’}

15:59:06 DEBUG (SyncWorker_9) [phue] PUT /api/HueAPIKey/lights/10/state {‘on’: True, ‘bri’: 25, ‘alert’: ‘none’}

15:59:06 DEBUG (SyncWorker_9) [phue] [[{‘success’: {’/lights/10/state/on’: True}}, {‘success’: {’/lights/10/state/bri’: 25}}, {‘success’: {’/lights/10/state/alert’: ‘none’}}]]

15:59:06 DEBUG (SyncWorker_6) [phue] {‘on’: True, ‘bri’: 25, ‘alert’: ‘none’}

15:59:06 DEBUG (SyncWorker_6) [phue] PUT /api/HueAPIKey/lights/12/state {‘on’: True, ‘bri’: 25, ‘alert’: ‘none’}

15:59:06 DEBUG (SyncWorker_6) [phue] [[{‘success’: {’/lights/12/state/on’: True}}, {‘success’: {’/lights/12/state/bri’: 25}}, {‘success’: {’/lights/12/state/alert’: ‘none’}}]]

15:59:06 DEBUG (SyncWorker_2) [phue] {‘on’: True, ‘bri’: 25, ‘alert’: ‘none’}

15:59:06 DEBUG (SyncWorker_2) [phue] PUT /api/HueAPIKey/lights/16/state {‘on’: True, ‘bri’: 25, ‘alert’: ‘none’}

15:59:06 DEBUG (SyncWorker_2) [phue] [[{‘success’: {’/lights/16/state/on’: True}}, {‘success’: {’/lights/16/state/bri’: 25}}, {‘success’: {’/lights/16/state/alert’: ‘none’}}]]

15:59:06 DEBUG (SyncWorker_8) [phue] GET /api/HueAPIKey None

15:59:06 DEBUG (SyncWorker_8) [homeassistant.components.light.hue] Getting group 0 from bridge

15:59:06 DEBUG (SyncWorker_8) [phue] GET /api/HueAPIKey/groups/0 None

15:59:06 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.gang_plafond_1, old_state=<state light.gang_plafond_1=off; friendly_name=Gang plafond 1, supported_features=41 @ 2017-09-30T15:56:36.096144+02:00>, new_state=<state light.gang_plafond_1=on; brightness=25, min_mireds=154, max_mireds=500, effect_list=[‘colorloop’, ‘random’], friendly_name=Gang plafond 1, supported_features=41 @ 2017-09-30T15:59:06.447149+02:00>>

15:59:06 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.gang_plafond_2, old_state=<state light.gang_plafond_2=off; friendly_name=Gang plafond 2, supported_features=41 @ 2017-09-30T15:56:36.045163+02:00>, new_state=<state light.gang_plafond_2=on; brightness=25, min_mireds=154, max_mireds=500, effect_list=[‘colorloop’, ‘random’], friendly_name=Gang plafond 2, supported_features=41 @ 2017-09-30T15:59:06.509860+02:00>>

15:59:06 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.gang_plafond_6, old_state=<state light.gang_plafond_6=off; friendly_name=Gang plafond 6, supported_features=41 @ 2017-09-30T15:56:35.867249+02:00>, new_state=<state light.gang_plafond_6=on; brightness=25, min_mireds=154, max_mireds=500, effect_list=[‘colorloop’, ‘random’], friendly_name=Gang plafond 6, supported_features=41 @ 2017-09-30T15:59:06.574477+02:00>>

Helps if you mark the log entries as preformatted (</>) or put them on hastebin/pastebin.

That said, what hardware and OS are you running on? It looks like it takes a little over a minute for the signal from your RFXCOM device to trigger the sensor. Is sensor.voordeur_sensor the one you shared above?

(PS: Given that this has nothing to do with Z-Wave and the original poster’s problem, I’m going to ask the mods to split this out)

I have the same problem.

It take 25 seconds to get a status change from my 433Mhz door sensor.
I have just tried the same RFXCom and Door sensor on RPI3 Domoticz and it take 8 seconds to see a change.

If you can gather log (and configuration) data that shows there’s a delay (as @OWK did above) then I’d suggest one of you opens an issue, that the other adds to. That will help the devs identify what’s happening and seek solutions.

1 Like

@Tinkerer
I’m on a Cubie Truck sbc with Ubuntu 16.04 running Home Assistant rls 0.54.0

And yes, ‘sensor.voordeur_sensor’ is the one I’m having an issue with and is shared in this topic. But the same problem also happens on other 433 sensors or switches. Like the one I use to trigger the door bell and the remote control.

Best regards,
OWK

Logged a problem report ‘Slow response on triggers via RFXTRX’: Github: 9728

Best regards
OWK

1 Like

Just found Node Red and its just the job

I had trouble with a 433Mhz door sensor which took 25 sec to respond.

I found a RFXCom node and it works so much faster than the RFXcom that HA use .

So its seems i will be using Node Red.

Hi Cameron

I’m now using MQTT and Node-Red as well. The door sensor status is now instantly showing in Home Assistant.

Do you happen to have a 433 MHz temperature/humidity sensor like Oregon in use? I have to create a flow for that but can’t find any documentation what the data should look like to pass to HA.

Thanks!

Best regards
OWK