It was two hours after the Mijia device went offline that I found out that I was notified that the work could not be postponed any longer.
What happened was what my mother said: "Why is the house so boring today?" I opened the Mijia App to check the temperature and humidity meter's data. When I clicked on it, I found that the icon of the temperature and humidity meter was gray, and the disconnection duration column said more than two hours. It disconnected more than two hours ago and I haven't received any movement at all. The dehumidifier in the house was linked to the thermometer and hygrometer. Once the sensor went offline, the linkage was immediately disabled - the humidity was too high and it would not start when it should be started. My mother was bored all afternoon. That's why it's strange: I understand that there are signs that the device is broken, but the fact that it went offline, Mijia App is clearly capable of telling me, but no one turned on that switch.
That night, I mapped out the notification path from beginning to end, and stepped on two pitfalls in the middle. I also tested the tempers of the twenty or so devices at home. I wrote it down for reference for people who have also installed a room full of Mijia equipment.
Make it clear first: If the device goes offline, who knows when?
You need to understand the mechanism first, otherwise you won’t know what you are configuring when you assemble the switch later. Mijia’s equipment is divided into two categories:: One category is Power outages and network outages will be reported proactively. , mainly electrical equipment, such as smart sockets, air purifiers, cameras, etc., which have the opportunity to shout to the cloud before disconnecting from the Internet. ; Another category is Disconnected and silent Most of the sensors are battery-powered, such as temperature and humidity meters, human body sensors, door sensors, etc., which rely on batteries. If the battery voltage is low or the connection with the gateway is lost, it will not send out an obituary.
The second type of device is found offline by "roll call" in the cloud.: The Mijia server checks the device heartbeats every once in a while and finds that a certain device has been silent for a while, so it marks it as offline. This "long time" is not on the order of seconds. I actually measured it. It took more than ten minutes from the time the battery was pulled out for the temperature and humidity meter at my mother's house to the time the App list turned gray. ; And I deliberately turned off the power to a smart socket, and within two minutes there was activity on the app. The discovery delays of the two types of devices differ by an order of magnitude. This psychological expectation must be established first, otherwise you will feel that after the notification is completed, it "works sometimes but not sometimes".
There is another underlying fact: When the broadband is cut off at home, no offline notifications can be sent to anyone. . The notification is pushed to your mobile phone from the cloud. The router is down and all devices are offline. The cloud knows that "this house is completely gray" and the notification is sent as usual. However, if you are at home and your phone is connected to the disconnected WiFi at home, whether the message can arrive depends on whether the phone will cut off the traffic on its own. I went through this trap in the article "A person remotely rescued a Xiaomi router that was disconnected from the Internet at the company". Complete number of remote rescue routes Not repeated here.
Where is the configuration entry?: The deeply hidden path in Mijia App
The main switch for notifications is on the "My" page of the Mijia App. The path is: My → Settings → Notifications , there is a row of switches after entering, which controls whether the app as a whole can receive messages. This is the main switch. If the main switch is not open, the sub-switches of each subsequent device will be useless. I fell down here the first time I did the matching.: I just went to the device details page to enable push notifications for a single device, but the main gate of the App was not opened. I waited for two days and did not receive a message, so I thought the device was broken.
There is another layer below the main gate that is prone to leakage.: Device updates in the message center . Click on the "Messages" tab at the bottom of the Mijia App. There is a setting (gear icon) in the upper right corner, which controls which types of messages should pop up in the notification bar. The dynamics of device offline/online are classified here. The main gate is open but the first layer is not. As a result, the message is sent to the message center in the app and the notification bar does not pop up - you cannot see it unless you open the app, which is equivalent to a waste of money. I call this "dumb notification", the most deceptive form, because it makes you think you are worthy.
After configuring these two layers, I received the first actual test message the next day. To verify, I opened the back cover of the thermometer and hygrometer, pulled out the battery, and pinched the watch. The notification bar pops up after eighteen minutes: 「Device is offline". It was connected, but I made a note of the eighteen-minute delay, which will come in handy later when I choose the sentry device.
Don’t miss the switch of a single device: Not every station reports it by default
After the two layers of switches on the App side are configured, it does not mean that every device will report it to you. Some devices have their own notification switch in the details page. The location is usually in the three dots in the upper right corner of the device page, or in the settings page of the device. The name is "Device Message" or "Offline Reminder". The names of each device are not consistent. Alarm messages such as cameras must have independent switches ; Some models have sensor-type offline reminders turned on by default, and some don't have independent switches at all. It all depends on the App layer.
I have tested more than 20 devices in my home, and the conclusions are recorded in the table below. If there are many devices, you can directly compare them.:
| Device type | How long did it take to be discovered after being offline? | Notification reliability |
|---|---|---|
| Camera, sweeper (WiFi always connected) | within minutes | The most reliable, independent message switch |
| Smart sockets, purifiers (electricity drain) | A few minutes to ten minutes | Reliable, you can shout before the power goes out |
| Thermohygrometer, door sensor (battery + Bluetooth gateway) | Start in ten minutes | If there is a delay, don’t be too slow if you can collect it. |
| Zigbee sensor (via gateway) | Check the gateway. Report only if the gateway is alive. | Once the gateway is connected, the entire batch will be mute. |
The most important thing in this table is the last row. The offline discovery of Zigbee devices is reported by the gateway. , the gateway itself went offline, and all the sensors hanging under it became "unclaimed". The cloud couldn't tell whether the device was down or the network was turned off. The thermometer and hygrometer in my house is Bluetooth, and the Xiaoai speaker in the living room is used as the Bluetooth gateway. At that time, my mother unplugged the speaker and moved it, and the thermometer and hygrometer became completely gray. Therefore, before configuring the notification, stabilize the location and power supply of the gateway device. This is more important than any switch. The low-level things about the gateway hub are written in more detail in the article "Xiaomi Hub Gateway". Lessons learned that night when the Internet was disconnected Can be referenced directly.
My combination: Pick a sentinel device, don’t expect to alert the whole house
If you are like me, when you see this, you want to turn on offline notifications on all twenty devices - stop for a moment. The result of turning it all on is a notification explosion: Once the broadband is cut off at home, twenty devices will be "offline" one by one, and then "online" one by one when the broadband is restored. Forty notifications will be poured into the mobile phone in an hour. In less than three days, you will turn off the main gate, and then return to the origin of "not noticing the disconnection for two hours." I did this stupid thing myself, and all the work I did on the day I closed the main gate was in vain.
Later I changed it to Sentinel system : Only turn on offline notifications for two or three "devices with the highest message quality" and turn off the rest. There are three criteria for selecting sentinels: If the battery is leaking (quick to detect), if the location is fixed and will not move (no false alarms due to movement), if the network is disconnected, there will be consequential consequences. I chose two cameras and a dehumidifier. If the camera goes offline, it means there is something wrong with your home network. When you receive the notification, check the router first. ; When the dehumidifier goes offline, the temperature and humidity linkage fails. When a notification is received, it means that the sensor link is broken. Two sentries, in two directions, cover 80% of the abnormal scenes in the home.
What should I do if the remaining dozen sensors go offline? Rely on inspection to get the bottom of things. I now open the Mijia App every Sunday night and scan the device list, and deal with it easily - this habit was developed during the grouping period. After the devices are divided into groups according to rooms, the status of the gateway routers in the "System" room can be seen at a glance. There are so many devices in the house that it becomes a mess, so do it first. Device grouping , the inspection efficiency will be much higher. Notifications manage emergencies, patrols manage inventory, and walking on two legs is much smarter than fully turning on notifications.
After receiving the notification: Triage first, don’t rush to do it
The notification is sent, and the test comes when you receive "device offline". Don’t click on the device page and restart immediately. Spend thirty seconds to perform triage first.: Is it lost individually or in batches? A batch of devices are grayed out at the same time. Don’t check each one one by one. It is basically a matter of the gateway or router layer. Press The article about equipment batch offline There are several ways to go, check from the gateway and WiFi, and you can locate it in ten minutes. If a single unit fails, it is most likely its own problem.: The battery voltage is low, it is too far away from the gateway, or the 2.4G channel is interfered by neighbors that day. The most unfair type of batch offline is that all the devices in the house are actually alive, but the cloud is just convulsing. Refresh the app twice before drawing a conclusion. Don't reset good devices.
There is also a type of "fake offline notification" that you need to be mentally prepared for.: The device came back after being offline for more than ten minutes. It played "offline" and then "online", but you did nothing in between. This is probably a fight between the battery sensor's power saving cycle and the roll call mechanism, so don't worry about it. But if the same device bounces offline and online several times a day, it's a signal boundary problem - the device is swinging on the edge of the gateway's coverage. Move the equipment or move the gateway, choose one of the two, don't drag it, it will be completely dropped sooner or later. How to determine the signal boundary at home, and how to read the signal strength numbers? RSSI actual measurement article There is a comparison table inside, so you can use it immediately.
The "Downline Duration" column in the notification content is also worth taking a look at. I later reviewed what happened to my mother that afternoon and found that the app actually recorded the time when the temperature and humidity meter went offline that day.: 2:11 p.m. It's exactly the same as the time when the speakers were moved. When something really goes wrong and needs to be investigated, this timestamp is more valuable than anything else. I used the same idea when I was searching online. Damn it. New device access notification The timestamp is for the entry and exit records of unfamiliar mobile phones. No one usually looks at the timestamp, and it is evidence when something goes wrong.
After a week of distribution, I will look back and decide whether the account is worth it.
I was told that this job took me two nights.: The wrong direction was assigned on the first night (only the switch on the equipment layer was turned on, but the main switch was not turned on). On the second night, it was completely overturned and the two devices were added for actual testing. The reward is that I received three really useful notifications in the next month.: Once the camera went offline (the router crashed, restarting solved it), once the dehumidifier went offline (my mother unplugged the socket to charge the mosquito swatter and forgot to plug it back in), and once the Sentinel device reported "online" (the broadband recovered from the disconnection). Two out of the three are real family troubles. I think this hit rate is worth the price of admission.
Finally, give me the order of work, just copy it.:
- Stabilize the gateway first: The location and power supply of the Bluetooth gateway and Zigbee gateway are fixed. If the gateway is unstable, everything will be in vain. ;
- Open main gate: Mijia App "My → Settings → Message Notification" is fully enabled ;
- Open the second floor: In the settings in the upper right corner of the message center, open the pop-up window for device updates. ;
- Pick a sentry: For two or three devices with leakage, fixed location, and collateral consequences, turn on the offline notification alone, and turn off the rest. ;
- Actual measurement: Deliberately cut off a sentry, wait for notifications by checking the meter, and record the delay. ;
- Inspect the equipment list once a week, notify management of emergencies, and inspect management inventory.
I only have three or five Mijia devices at home. This set can be simplified into one sentence.: The main gate is open. It's enough to send a notification to the camera. There are 20 or 30 devices with linkage, and the Sentinel system should be carefully implemented - you don't want to experience the chain of "the sensor is offline for two hours, the dehumidifier is lying down all afternoon, and my mother is bored all afternoon." I have experienced it, and I have tried this pain for you.
