Closed daknightuk closed 2 years ago
rflink documentation rflink source (message by IssueLinks)
Hey there @javicalle, mind taking a look at this issue as it has been labeled with an integration (rflink
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Home Assistant 2022.2.0
Frontend version: 20220202.0 - latest Installation Type | Home Assistant OS Development | false Supervisor | true Docker | true User | root Virtual Environment | false Python Version | 3.9.7 Operating System Family | Linux Operating System Version | 5.10.63-v8 CPU Architecture | aarch64 Timezone | Europe/London Version core-2022.2.0 Installation Type Home Assistant OS Development false Supervisor true Docker true User root Virtual Environment false Python Version 3.9.7 Operating System Family Linux Operating System Version 5.10.63-v8 CPU Architecture aarch64 Timezone Europe/London Home Assistant Community Store GitHub API ok Github API Calls Remaining 4947 Installed Version 1.21.0 Stage running Available Repositories 965 Downloaded Repositories 5 Home Assistant Cloud Logged In false Reach Certificate Server ok Reach Authentication Server ok Reach Home Assistant Cloud ok Home Assistant Supervisor Host Operating System Home Assistant OS 7.2 Update Channel stable Supervisor Version supervisor-2022.01.1 Docker Version 20.10.9 Disk Total 111.1 GB Disk Used 17.5 GB Healthy true Supported true Board rpi4-64 Supervisor API ok Version API ok Installed Add-ons SSH & Web Terminal (10.0.2), Samba share (9.5.1), Studio Code Server (4.1.0), eWeLink Smart Home (1.2.3), ESPHome (2022.1.3), Z-Wave JS (0.1.52), InfluxDB (4.3.0), Grafana (7.4.1), Node-RED (10.4.0) Lovelace Dashboards 6 Resources 0 Views 5 Mode storage
I think it might be a change to https://www.home-assistant.io/integrations/binary_sensor/ possibly? RF link was working perfect before I updated HA
I believe you are correct. Binary Sensors now have an unknown
state. Therefore until it receives data to set its state, either on
or off
, it's unknown
.
It explains why you observed a restart will set it to unknown
and the first report of motion sets it to on
followed by off
. The next restart resets the binary_sensor to unknown
again.
I updated today to core-2022.2.1 and the issue persists too Anything which has seen a motion is now Clear but anything which I haven't opened i.e windows and panic buttons still showing unknown. I wonder whether its worth writing an automation which looks out for the unknown status and sets all the sensors to Off
On some sensors i.e PIR's the Unknown status would be useful as you can then see whats not communicating with your RFlink device due to flat batteries but then again do you Really want to be running round your whole house every time HA starts up opening all the windows and doors which have contact sensors in the winter!
Seems to be 3 statuses now... Unknown, Off and On As an interim measure I will write an automation to set the status to clear will share it in the forum link https://community.home-assistant.io/t/rflink-sensors-went-from-clear-to-unknown-after-updating-ha-to-version-2022-2-0/387736
I have now updated all automations just to look for the "on" status rather than the change from off to on.
The behavior change is due to the change in the binary_sensor
component as already reported.
It is included in the change notes as a "breaking change":
I think that rather than automation, a better approach would be for the binary sensors to restore their state after reboot.
This is something that should be implemented in the RFLink integration but is not certain to be supported.
the Unknown status would be useful as you can then see whats not communicating with your RFlink device due to flat batteries
RFLink doesn't work that way. The integration has no way of knowing if a device becomes unavailable. Also, in that case the status should be unavailable
(and not unknown
).
Since normally RFLink cannot query the status of the devices, actually the status of the devices after a reboot is unknown
.
Just because RFLink has an optimistic behavior, the last known state is considered to be the correct one and thus it is restored to its previous state after a reboot.
rflink has options for entities that only send "on" state. force_update and auto_off. Force_update is part not working
@spattinson I can find very little information about this which you mention. I already have an auto off after 5 seconds, but my issue is since the HA was updated now my sensors just go to uknown until they get the 1st ON. I was hoping an automation to turn them on might help but the status then sticks and RFLink isn't pushing any more changes post this unfortunately I am ready to give up on this.
@daknightuk I think some issues have been created with binary sensors due to a change in the core part and introduction of a third state for binary senors of unknown. MQTT binary sensors seem to be having issues too. rflink binary_sensor typically only send "on" state, they do not send an "off" state the force_update option as documented here https://www.home-assistant.io/integrations/binary_sensor.rflink/ is meant to fix this issue. off_delay deals with resetting the state after a fixed period and force_update is supposed to periodically send the off state, eg at startup, or restore the previous state not sure which.
THere was discussion around these types of sensors a few years back when I first install HA. Prior to that there were some ugly hacks to reset triggered sensors
Sorry guys, Am I missing something? I am on core-2022.2.9 but still getting unknown for sensors that are not triggered
The problem
So after updating to HA to Version 2022.2.0 My RFLink Sensors namely 433.92 mhz yale alarm sensors all show as Unknown until a motion is detected. Once 1 motion is detected they change to Detected (On) then Clear (Off). This only occurs on startup of HA and a restart will put the sensors back into unknown status.
Issue recorded in your forum seems also to affect MQTT sensors: https://community.home-assistant.io/t/rflink-sensors-went-from-clear-to-unknown-after-updating-ha-to-version-2022-2-0/387736
Regressing to the backup (previous version 1 version older that 2022.2.0 puts it back to normal again. Upgraded a 2nd time to prove the issue still occurs.
What version of Home Assistant Core has the issue?
2022.2.0 AND core-2022.2.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
RFLink and Binary_Sensor integreations
Link to integration documentation on our website
https://www.home-assistant.io/integrations/rflink/
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response