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

RFbridge doesnt update alarm sensor when disconnected from Internet (local) #1379

Open
zd3sf opened this issue Apr 5, 2024 · 9 comments
Open
Labels
bug Something isn't working

Comments

@zd3sf
Copy link

zd3sf commented Apr 5, 2024

RFbridge 2, firmware 3.5.2. integration (in Local or Auto). with Internet access for the bridge denied from the router, the buttons keep working but the window sensor doesn't update. I found that the bridge bridge connects to this IP (13.56.143.44) even with pihole block, and it stays online in the ewelink app. Interestingly, if I allow internet access then pull the WAN cord out after the bridge initialized, the sensors keep working.

I am thinking that the bridge uses the connection to 13.56.143.44 to pull the clock time because the sensor triggers need "last triggered" which needs the clock on the bridge to be correct. What if we spoof this IP address and redirect it to a local NTP server? It wouldn't be this easy because this IP is not only n NTP but is also the connection to ewelink. But if anyone can figure how supply the time clock to sonoff devices without ewelink, that would be awesome... potentially solve all issues with sensors not working in local mode.

image

@AlexxIT AlexxIT added the question Further information is requested label Apr 8, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 8, 2024

@zd3sf
Copy link
Author

zd3sf commented Apr 12, 2024

There's nothing in the logs that would be helpful. This a problem between the bridge and the server. This is more a development suggestion sorry

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 13, 2024

Without device and any debug info I can't do anything

@AlexxIT AlexxIT closed this as completed Apr 13, 2024
@zd3sf
Copy link
Author

zd3sf commented Apr 13, 2024

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 13, 2024

I can see local updates in your logs. You don't have them when there's no internet?

2024-04-13 10:12:17.263 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] 100205192c <= Local3 | 192.168.2.175:8081 | {'sledOnline': 'on', 'arming': True, 'rfTrig9': '2024-04-13T14:58:59.000Z', 'ssid': 'TP-LINK_E8A8', 'bssid': '8c:3b:ad:0f:8b:99'} | 682
2024-04-13 10:12:18.083 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] 100205192c <= Local3 | 192.168.2.175:8081 | {'sledOnline': 'on', 'arming': True, 'rfTrig9': '2024-04-13T14:58:59.000Z', 'ssid': 'TP-LINK_E8A8', 'bssid': '8c:3b:ad:0f:8b:99'} | 682

@zd3sf
Copy link
Author

zd3sf commented Apr 13, 2024

With no internet, pushing a button works in both homeassistant and ewelink app. But sensor status doesn't update also in both ewelink and homeassistant.
home-assistant_sonoff_2024-04-13T15-54-10.296Z-no internet.log

I can see the orange light on the bridge flash when I trigger the window alarm (open or close) but it doesnt update the 'last triggered' or current status in ewwelink or homeassistant

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 13, 2024

Yes. Same TS will be skipped. I don't know if it safe to remove this check. Then another check would have to be made for local+cloud messages.

# skip same cmd from local and cloud
if ts == self.ts:
return

@AlexxIT AlexxIT reopened this Apr 13, 2024
@AlexxIT AlexxIT added bug Something isn't working and removed question Further information is requested labels Apr 13, 2024
@AlexxIT AlexxIT self-assigned this Apr 13, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 16, 2024

I don't know how to fix this on the component side. Disabling the date check doesn't seem to be safe. You can also see that the message counter on the device side doesn't increase.

@AlexxIT AlexxIT removed their assignment Apr 16, 2024
@zd3sf
Copy link
Author

zd3sf commented May 3, 2024

Pulling the WAN cable out the router while everything else is connected, the RF bridge continue to work normally for 2-3 minutes. Then it misbehaves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants