-
Notifications
You must be signed in to change notification settings - Fork 503
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
All devices lost after Raspbee II reboot #2915
Comments
Can you be a bit more precise on the "not reachable" regarding your Xiaomi door sensor? It can take up to 1h for the device to be marked as reachable and for sensors, it typically requires 24h before being marked as unreachable in case they really pass out. |
In addition to @SwoopX , Zigbee works best if theres multiple devices. Having only 1 sensor really limits its capabilities. If you have any way of adding a device that can act as a router, use that to see what happens. Just having one device really makes debugging hard as the sensor itself can be the problem too. |
That's when I rebooted the device the last time. I did not re-learn the sensor this time, because at this point I decided to give up and wait if a further firmware upgrade will fix the problem. The "not reachable" is simply what the web interface says (I'm running the Raspbee headless). |
Ah! But that is phoscon. What happens if you query the RestAPI? |
Here is the REST API query result of this specific sensor:
The sensor is in front of me, about 2 meters away from the Raspbee. There is no status change when I open/close the magnet. |
It is interesting that the "lastseen": "2020-06-10T12:08:37.424", is today. but open close is not transfered. @SwoopX can you elaborate? |
The "lastseen" is updated once every couple minutes. But not the actual status, or the last change of the status. This only happens once I re-learn the device. |
I do not have this knowledge :( I need to wait on Swoop for this. |
Sry guys, work first. However, for the moment, just a quick one: Last seen is a good indication that communication is still up. Might be that there's an issue with the attributes somewhere. Anyway, we need to gain a good understanding what's happening and how any potentially odd thing could happen. I also have one door sensor which drives me crazy, the other one is rock stable. Never checked the last seen for the one passed out however. Also, there's one thing to note: the "older" Xiaomi devices are not exactly compliant to zigbee. EDIT: |
@andreasscherbaum Can you provide me the Product number of the switch? |
Does that help? Otherwise how can I identify the number? @SwoopX How exactly can I debug the communication between switch and Raspbee? |
I actually ment the product number of the Contact sensor :) |
Ok, so let's try to have a look. Run deconz with EDIT |
Ok, attached is the log from a run. What I did: stopped the headless deconz service I'm usually using (the sensor was still working then), and logged in into the Pi with X-forward enabled, then started "deconz" and let X forward the window to my desktop. Rebooted the Pi, and did the same login/forward again. The log is from the 2nd login. Couple points I see there: When deconz starts, it loads the sensor from the internal database:
Same "uniqueid", but two of them seem to be deleted (can be because I have to delete the sensor and re-learn it every time). That matches with what I've seen: even though I delete a sensor, when I learn it the next time, deconz seems to recognize the sensor again, but gives it the original name, and I have to rename it manually. Then this:
And when the GUI starts and connects to the RaspBee, the "Test Sensor" is no longer in the list. Somewhere during the start of deconz the sensor gets lost. @SwoopX Let me know if you need more debugging information, or what exactly I can do to provide more data. |
Just somewhat related: I can't find any documentation about the "--dbg-info" switch. What does this switch, and the other available switches do? Is there a link somewhere? |
@andreasscherbaum It's in the wiki now, https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/deCONZ-debug-switches I'll check out the log in the evening. Just to confirm I got it right: the sensor got lost after restarting deconz (seems so)? If yes, I only saw that once when the database was "corrupted". Some fields in the tables were missing due to whatever reason. You may check it out here #2882 (comment) |
Compared my tables in the SQLite database to the ones listed in #2882, and I don't see any differences. That's not the issue. Can you provide a full list of tables and their schema, so I can compare everything? |
Do a |
I see the following tables in my SQLite:
#2882 only lists the following tables:
I compares these 8, but there are 8 more where the schema is not listed. Dunno if a corrupt database is the cause for the issues, but to rule that out I need the schema for all tables. And it's easier to compare them from one source than to grab the details from a couple different comments. |
Ah, right. However, the others can't have anything to do with stuff disappearing. the functions |
Ok, I went over all the create functions in database.cpp, and my database schema matches what's supposed to be created there. My version is "6" (latest). Any other ideas? |
Not without another debug output. However, took a look at the one you're previously provided. It appears the sensor is happily sending data and also open/close data. I don't see any websocket notifications though... And I see you don't seem to run the latest firmware. |
http://deconz.dresden-elektronik.de/deconz-firmware/deCONZ_RaspBeeII_0x26610700.bin.GCF Debug output as you've already provided here: #2915 (comment) |
Lights/Switches to not connect after update to 26610700. Needed to relearn them once. Connecting again even after reboot. |
Hi @cwildfoerster , Are you able to create a own bug report for this 😃 ? Thanks! Kind regards, Dennis |
@andreasscherbaum For the sensor not showing any events, you could redo the binding once more. How to manually bind and enable attribute reporting on the example of the current position for windows covering devices (use the on/off cluster in your case) Manually bind a cluster
|
Did not forget about this Issue, but have to deal with other issues first. Will come around to debug this soon. |
I cut the long story short here: The entry in the DB was still present, therefore the search for new sensors alone doesn't help here. That entry gets "revived" upon triggering the device. So, as a rule of thumb: When you pair any battery powered devices, it's highly recommendable to also trigger it during sensor search, either by waving your hands, moving the magnet, warming it, etc. or just a short press on the physical button. Learned something new 😉
I definitively cannot confirm that. In fact, that's something that I really enjoy (meaning the ID from deconz does NOT change, with one exception). Whenever a sensor gets screwed due to whatever reason on my end, even with a full reset, it comes back with the ID. I loose one of my door sensors every now and than and this is what I could always count on. An exception, as I recall, was when a new device was paired in between.
That more feels like an issue OpenHab has. So nothing comes in when the device is certainly triggered? Just noticed it's the Mija sensor, so the old one. You know they have a bad reputation? |
Well, that's the first time I have a sensor ID 6 on this, and it's the same sensor which previously was ID 5. And 5 is not used right now. So, yes, I can confirm that this happened, but only after I upgraded the firmware.
It might be the case, I'm just adding everything I observe. |
Regarding that unavailability in openHAB after reboot: Just got some minutes of headache in my dev env. Set up a play instance of FHEM and was wondering that I didn't receive anything as well. A FHEM restart brought it back alive. The point I want to make is: if you reboot and then things don't work out and you then restart openHAB, is it all good? If yes, you should defer the start of openHAB on your OS. |
I have (intentionally) Raspbee/deCONZ and openHAB running on different Raspberry Pi. This way I can reboot one of them without bringing down my entire home automation system. Or I can test something on one system, without disturbing service on the other. All systems are setup using Ansible, so I can easily re-deploy them. When deCONZ starts, that's something openHAB might detect (reconnect of the bridge/thing), but it still needs some action on the openHAB side (touch the files, as example). I don't know why this is required to make the bridge work, and transport data. |
Ok, let's approach that differently. When you rung deconz with |
Ok, I used the Mija sensor and an Aquara Motion Sensor. Setup:
I stopped the headless deCONZ on the .30, and used ssh X forwarding to bring the application to my workstation, in order to see the display. From the log:
Why is this opening a websocket to my workstation, instead of the openHAB system?
No web socket to the .35 though. And then when something changed (motion sensor):
Looks like the reason why openHAB never gets notifications is because deCONZ never opens a websocket into that direction. The question is: why? |
I suppose you had Phoscon open on your workstation at that time?
No, that's not the question. It's exactly the other way around. The client has to initialize the connection, not the server. Btw, Phoscon is just another REST API client for deconz. |
Crap, forgot about this one, but had to monitor the sensors and see if they are recognized. Looks like I need to see why openHAB is not even trying to open a connection. |
I will not have time for the next couple days, but if openHAB does not open a websocket that is not really a problem for this issue anymore. |
When I reboot the Raspberry Pi (B+) which is running the Raspbee II, and everything comes up again, the Raspbee lost all connected devices. I have to re-learn each device manually.
Currently (and because it's work) I'm just trying this with a Xiaomi Door Sensor. After reboot the Status is "Not reachable", and I have to delete and re-add the sensor.
The text was updated successfully, but these errors were encountered: