-
Notifications
You must be signed in to change notification settings - Fork 52
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
Error: Unknown event type #56
Comments
Hi! Thanks for the detailed report. Very weird stuff. All the advertised data payloads look correct up until the event type, data length and the actual event data: They appear to have completly random values. For example And that this error only appears after running for 12-24h is also weird. If this was not the case it would make be believe that they updated the firmware when you connected it to the MiHome app and changed the byte protocol, but since you also see valid data this is probably not the case. Are you only experiencing this "Unknown event type" error on
This is usually an indicator that the sensor is not within range of the device running homebridge. Could you try and move the sensors closer to the server and see if you still get the timeouts? You could also try and change the battery on the sensors just to rule out that it's low voltage causing the random data. |
Thanks a lot for the help.
What seems to happen is that after getting these errors the sensors are set as unavailable to HomeKit and that’s why you see the timeouts on the logs. I will try getting them closer and changing batteries though. In any case, that firmware issue makes sense. What firmware are your sensors running on? Thank you! |
Just tried to connect one of my sensors to the MiHome App and ran "Check for new firmware". It did say that it was up to date with |
Also, can you see a pattern in the Are these 3 the only values you can see in the logs after the above mentioned message: If you can only find one more value in the logs that would help to identify the four different packages the sensor emit (temperature, humidity, temperature & humidity, and battery). |
There's one more! Here you are:
It's weird it works for the first few hours though… |
Same here. 1037 is a most often event. |
@loktissimo are you seeing the same behavior where it works for a while and then becomes unreachable? |
Absolutely, I get: |
@loktissimo thanks. Could you also provide some logs which could help to track down the cause of this error. By looking at the data that @GorkaMM provided it looks like the bytes that's supposed to describe the event type and event length are corrupted but the actual event data is good: Data returned as event type Both are actually the event returning temperature and humidity. The bytes As reference here is a correct humidity & temperature data: Not really sure why the event type bytes and event length byte suddenly changed for you guys, and to seemingly random values (the usual event types follow a pattern of 4100, 4102, 4109 when parsed to integers). @GorkaMM The reason why the time out error is seen is probably because the plugin don't get any valid packages since these errors occur and thinks that the sensor is not in reachable and thus times out after a while. The default timeout is 15 minutes. @loktissimo did the sensor work as expected before you started seeing this error and did you upgrade or change anything before you started seeing this? Have you tried to change the battery? |
Most recent logs from my system:
Everything worked just fine on my previous setup. I've made quite a lot of changes: |
Hi @hannseman. Any news on this issue? Will you be able to make an update? |
@loktissimo not really. Very hard to find the cause of this since I can't reproduce it. Since you describe that it started behaving like this after an upgrade it feels like it's some dependency misbehaving. I'm also running the latest stretch, NodeJS 10, Deconz and have never seen this error. You could please list the versions of the following packages:
|
Here it is: |
Can the duplicated MACs be an issue? ~# hcitool lescan |
I have it duplicate too. |
Sorry for the late reply. Unfortunately the dupe MACs are expected (happens for me as well). Regarding the system dependencies I have the same versions installed as you @loktissimo. The next time the plugin starts spitting out these errors in the logs could you open up the MiHome app and check if it can read the values correctly. |
I found this issue regarding bluetooth issues that started appearing in the latest kernel: raspberrypi/firmware#1150 If anyone if you have a bluetooth adapter could you try using that instead of the builtin bluetooth? I'm using a RPI2 with the latest kernel and have no issues. Because RPI2 does not have builtin bluetooth I use an adapter, looks like this https://www.amazon.com/Bluetooth-Receiver-Computers-Compatible-Keyboards/dp/B07P5TMLWF. |
I changed batteries to my devices and it still fails so it definitely looks like that kernel issue is causing it. I'll wait a little bit to see how that bug evolves — if it doesn't get fixed soon then I'll buy an adapter and check if that way it works. Thanks for the help @hannseman! |
You could also try and downgrade the firmware version by running: |
@GorkaMM, @loktissimo have you tried to update to the latest firmware with See raspberrypi/firmware#1150 for more information. |
I waited for a stable release and just recently upgraded to 20190718 which corresponds to the kernel version 4.19.58 that supposedly addresses the issue, but I’m still having the same problem... I might just buy a Bluetooth dongle. |
I found this issue because with my MJ_HT_V1 hangs after 24h or 48h. Removing the device battery does restore communication. |
Hi, I have just setup a new raspberry 3 since your module was interfering with mi-flora on the other. On the newly created I also have the "Unknown Event Type 2" error. -- Logs begin at Fri 2019-09-06 22:13:50 CEST, end at Fri 2019-09-06 23:44:37 CEST. -- |
I eventually solved it just by upgrading to Raspberry Pi 4 because I couldn't find any other way around. |
The same issue for me on Homebridge@Docker@LibreELEC. Before it worked fine. |
I have the same error with homebridge on macOS.
Versions
|
Same here, occurs when add the new square T&H from Xiaomi... I deleted it from de config.sys and all runs flawlessly. Thanks |
@marianharbist could you please provide debug logs by running homebridge with its debug-flag: |
@hannseman This showed console |
Any updates here with new v2 sensor? Still doesnt works |
I just released a new version (3.0.1) with updates to the bluetooth library. Please give it a shot. |
Hi all, just want to say I am also having a very similar issue with a RPi3B and old style sensor. It seems to fail between 5 and 12 hours of being restarted but I have had it run for a full day before. V3.0.1 hasn't helped unfortunatly :( . I've just started to use a work around where I use crontab to schedule a homebridge restart every 2 hours. If you need any info just let me know! |
Trying to close this issue as it've been a while since I've seen reports about it. Let me know if we should reopen it. |
I'm getting the same error for event type 4101 on LYWSD03MMC:
|
Hi @hannseman,
After some months with the plugin working really great I started getting
Unknown event type
errors that make the plugin report the sensors as unavailable. I didn't make any change or software updates right before those errors started coming up — I paired the sensors with the Mi Home app though.I have two Temp & humidity sensors set up with the plugin, both with
address
correctly set, plus one Flower Care I already had when there were no errors and which I am not using with Homebridge. All devices work well and hygrothermographs correctly report data to the plugin for the first few hours after starting Homebridge (logs below) — then mentioned errors begin showing up.Expected Behavior
Temperature and humidity of both sensors are registered by Homebridge consistently over time.
Current Behavior
Temperature and humidity of both sensors are registered by Homebridge during the first 12-24h after starting it. Then it gets
Unknown event type
and it stops working.Steps to Reproduce (for bugs)
I don't know.
Versions
0.4.49
2.2.1
v10.6.0
1.0.1_0066
Configuration
Homebridge Log / Command Output
The text was updated successfully, but these errors were encountered: