Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexplained behaviour of Sonoff RF Bridge when using car alarm fob. #561

Open
mr-sneezy opened this issue Feb 13, 2018 · 17 comments
Open

Unexplained behaviour of Sonoff RF Bridge when using car alarm fob. #561

mr-sneezy opened this issue Feb 13, 2018 · 17 comments
Assignees
Milestone

Comments

@mr-sneezy
Copy link

I tried to find a help forum to discuss ESPurna functionality elsewhere, but in the end it seems this is it ?

Question rather than issue...
I use my Espurna flashed Sonoff RF Bridge to lock my car at night by the cars remote alarm & central locking system, in case I forget to do it...
This works fine via a simple time trigger automation from HomeAssistant sent to the bridge. It can unlock it too by a second learned code, but I don't need that right now.

The odd behaviour is that if I lock my car now with my car alarm key fob, the car locks multiple times in a few seconds. I think maybe Espurna detects the RF code from the bridge and then 'repeats' it multiple times...
Is this coming from the firmware, if so how can I stop this repeating of my key fob signal ?
Thanks.

@albacete99
Copy link

I have same issue. I have a alarm with rf codes to lock or unlock.
When I send RF code (previusly learning in ESPurna Web) in HomeAssitant automation or Espurna Web, It repeats multiple times.
I tried to learn different remote but when unlock alarm It repeats 2/3 times Rf code
Thanks

@xoseperez
Copy link
Owner

ESPurna repeats any code received via MQTT 4 times (that's the value of the RF_SEND_TIMES setting in general.h). But I agree it should not do it when the message comes via RF already. Will fix this.

@xoseperez xoseperez added this to the 1.12.4 milestone Feb 13, 2018
@xoseperez xoseperez self-assigned this Feb 13, 2018
@Tardymo
Copy link
Contributor

Tardymo commented Feb 13, 2018

Do you have some custom Rf receiver connected to your car's central locking? Stock remotes have rolling codes so adding fixed code could be a security concern as somebody could sniff that fixed code and unlock your car...

@xoseperez
Copy link
Owner

@albacete99 @mr-sneezy Can you test the latest version from the dev branch?

@mr-sneezy
Copy link
Author

@albacete99 - Yes I will try it out. I used the binary to load the RF Bridge so I may have to set up the compiling environment first.
@Tardymo - Yes, I assumed the same as the aftermarket system is only a couple of years old, but I tried the key fob learning anyway and it was quickly revealed that it's not a rolling code...

@mr-sneezy
Copy link
Author

I had a go at setting up VS Code and PlatformIO to compile the Dev code. I had some problems with Platform IO and updating it, so I've stopped for tonight. I'll try again tomorrow night, but if there is a possibility to build us a Dev bin to test please let us know.
Thanks,
Martin

@albacete99
Copy link

Hi @xoseperez. I tested lastest version from dev (my first compiling with ArduinoIDE) and flash via Web (no serial).
But this version doesn't work for me. When I switch on to send RF command, alarms receives 2 codes (2 beeps).
Thanks

@mr-sneezy
Copy link
Author

@xoseperez
Hi, good news. It took me two nights work to install and tune the IDE, I eventually gave up on VS Code with PlatformIO as it had too many confusing error messages, installed Arduino portable and many libraries and compiled Dev OK.
Bug is fixed. Thanks. Car now locks only once with key fob but still works with my HA automation fine.
Martin

@mr-sneezy
Copy link
Author

Oh oh, I spoke too soon. That repeating bug seems fixed but now I have random unavailability in HomeAssistant and I get a flood of door and door bell events with it when it recovers... Will need to shut the RF bridge down till I can work out why tomorrow night.

@albacete99
Copy link

Hi again. I've just read @mr-sneezy problem with HomaAssistant and Dev version and I had same problems but I thought it was a problem because of HA but the same happened to me, sensors via mqqt that became unstable.
I flashed lastest stable version and it works perfect

@mr-sneezy
Copy link
Author

mr-sneezy commented Feb 16, 2018

OK I did a full erase of the ESP8285 via FlashESP8266.exe and a 1Mb blank file, then retried the DEV build again tonight and reflashed it, and I still have issue with loss of availability in HA and false events as it drops out. I'll go back to master until we hear more.

@mr-sneezy
Copy link
Author

mr-sneezy commented Feb 17, 2018

Tonight I read this issue #572 and it seemed to me the issue was similar, so I tried the same fix with two changes to the Arduino IDE board settings. Changed to Generic ESP8285 Module and changed IwIP Variant to V1.4 Prebuilt.
So far my complied version of Dev with this change is stable and the repeater bug is also gone.
If it goes unstable I'll report here again...
EDIT: Now been running 48 hours with no more problems.

@mr-sneezy
Copy link
Author

mr-sneezy commented Mar 1, 2018

Not sure if this is relevant to this bug or it's new, but my unit is now playing up every few minutes with 'unavailable' reported by Home Assistant GUI. Each time it becomes available again I get a flood of reports from RF switches monitored by the bridge. Very weird after so many days working fine...
Edit: And I've tried a different USB power supply with no change.

@xoseperez
Copy link
Owner

Do you mean MQTT reports of messages from the RF switches? The RFBridge does not enqueue incoming RF packets.

@xoseperez xoseperez modified the milestones: 1.12.4, 1.13.0 Mar 4, 2018
@mr-sneezy
Copy link
Author

Hi xoseperez. I'm not sure I know enough to answer that question with confidence. I think HA tries to set the state of RF switches when the RFBridge becomes available, and that's what is cyclically setting off my door bell and car locks. I have a suspicion that the RFBridge is resetting now every few minutes but I don't know why (I have not powered it on for a few days now since the trouble still occurred during the middle of the night...).
Is there a way for me to tell you better from any logs ?

@albacete99
Copy link

Hi again mr-sneezy.
Try to disconnect nmap Discovery un HA. I had the same problem but It stopped when i did It.

@xoseperez
Copy link
Owner

@mr-sneezy The best way would be to have the logs of the device when that happens. Since the problem seems to be related to connectivity and/or resetting the device you should wire it to your computer using a USB2UART device, temporarily disable the communications with the secondary microcontroller (remove the jumpers) and enable DEBUG_SERIAL_SUPPORT from the hardware.h file.

@xoseperez xoseperez modified the milestones: 1.13.0, 1.14.0 Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants