Hubitat with Homemade Temperature, Humidity, Pressure and Light sensor

The looping is a concern.

I have not seen something like this on my end. It is like it loop in the configuration mode. The hub is calling configure multiple times. This happen if it is like the sensor never pair at all. The hub think that there is a new sensor joining but in fact it is already join.

Hmm this is strange.

So a little more on my ZigBee setup:

  1. Channel 20
  2. XBEE router
  3. 5 SmartThings Presence Sensors
  4. 2 SmartThings Flood Sensors
  5. 2 SmartThings MultiSensors
  6. 2 SmartThings Motion Sensors
  7. 1 Xiaomi Aqara Motion Sensor
  8. 2 Xiaomi Aqara Temperature / Humidity Sensors
  9. 1 Xiaomi Aqara Vibration Sensor
  10. 2 NYCE Motion Sensors
  11. 6 Hue Motion Sensors
  12. 1 Xiaomi Aqara Door Sensor
  13. 1 Hue Dimmer Switch
  14. 1 Osram Switch
  15. 1 Xiaomi Aqara Light Switch

The XBEE and Aqara Light Switch have both proven excellent Routers, no issues with any sensors dropping off and everything stable. Layout wise my house is essentially a cube, 5 rooms upstairs, 5 rooms downstairs. HE is in downstairs front right, Aqara light switch is in downstairs rear left (so diagonally from HE) and the XBEE is in the center upstairs (so almost triangle between the HE and Aqara).

I've now tried two of your sensors, with the same results. I also removed them from HE and reset them using the instructions above.

When I pair them there seems to be that initial flurry of activity in the logs but as you mention it's like it's not actually finishing the pairing for some reason?

I've also noticed that they both disappear from the network - by that I mean that when I scan on my XBEE they initially show up during pairing, but then if I stop the scan and start a fresh scan they have disappeared again.

If I put the HE back into Discover mode and leave it there for a while, the sensor does pop up again on the XBEE scan. But again, if I stop the scan and start a new one, the sensor is no longer there.

The original pairing attempts were carried out upstairs (my office) which is closest to the XBEE) the most recent pairing attempts were carried out next to the HE.

(sorry for the brain dump of data above, just trying to give you as much information as possible).

The channel looks fine.

I have tried my sensor along with xbee. It get along fine. I can try it again later on with xbee. It is early morning here for me.

I do not have aqara to test.

I mention the 2 just in case my sensor pair through those 2 and not working as expected.

Based on trying the other sensor and get the same results, we can rule out hardware issue.

I am starting to be suspicious that there may be some incompatible device in the mesh. It cause the sensor never completed pairing. This is my first guess.

It also possible that it is told to leave the mesh. This is my second guess.

I am not sure whether it is practical to try to shut your other zigbee routers to troubleshoot this issue.

The other option is to find a sniffer and try to see in the traffic if there is anything out of ordinary that cause the above.

Do you have the other hub to try to isolate the issue?

I powered down the Aqara light switch and tried again but got similar results.

I'm loathe to power down the XBEE as this has a bunch of endpoint devices routing happily through it. For reference HE has 4 endpoint devices and 2 router devices, the Aqara has 2 endpoint devices and the XBEE has 20 endpoint devices. The endpoint devices do jump around occasionally but are mostly static (mostly the SmartThings Presence Sensors move).

I do still have the SmartThings Hub active so will try pairing there and report back :slight_smile:

Just curious. Are the Hue Motion sensors directly paired? Most of us can’t even get a single one to work, let alone pair. Not saying it’s the issue, but definitely stands out as different if the are indeed paired directly to the hub.

If they are, is it feasible to remove the batteries from all 6 to test?

OK, I tried one of them in SmartThings and it works fine so I guess there must be something off with the HE setup.

Just to make sure HE ZigBee side was still OK and not experiencing any general problems, I paired another Xiaomi Aqara Temperature / Humidity sensor and it paired fine and is happily chatting away, routing via the Aqara light switch.

Out of interest, which XBEE and settings do you use on it? Mines setup as per the thread at Everything Xbee

Before I added the XBEE (a month or so ago) I had 3 Hue direct paired with no issues. After adding the XBEE the Hue moved themselves there automatically. I added the other 3 Hue a couple of weeks or so back and no issues (they seemed to jump on the XBEE straight away).

Sounds like I may have been lucky with the Hue then?

It’s not that I’ve never been able to get it to pair. I can, but I get zero response from the Hue Motion sensors in HE. @mike.maxwell has had similar experiences. It seems they work fine for some, but don’t work at all for most people that try. Definitely something in your favor.

I seem to recall I had to use a community device handler to get them to configure, but once they start reporting I switch to the built in device handler.

Other than that I've not done anything special with them!

1 Like

Mine is XBEE S2C. I may not have 100% exactly the same setting. It is setup as a router. I confirm that on my xtcu. My sensor see packets from Xbee as well as far as I can tell based on the RSSI.

Out of your routers and coordinator(the hub), I think at least Xbee and the hub should be compatible with my sensor. I am not sure about Aqara. However, you shut it down. It does not work as well.

My second guess is that something is telling the sensor to drop out of mesh in your Hubitat Zigbee Mesh. I am hopping that we do not have to go in there. The brute force way to troubleshoot this is to turn off device by device and until one point you should be able to find the problem. Another way which can be difficult is to fire up a sniffer and watch for a suspicious traffic.

Out of your devices, the one that I have heard back and tested with my module in their network are ( I also own some of them and use them along with my homemade sensor)

SmartThings Presence Sensors
SmartThings Flood Sensors
SmartThings MultiSensors
SmartThings Motion Sensors
Xiaomi Aqara Motion Sensor
Xiaomi Aqara Temperature / Humidity Sensors
Xiaomi Aqara Vibration Sensor
Xiaomi Aqara Door Sensor

I do not recall any feedback on below.

NYCE Motion Sensors
Hue Motion Sensors
Hue Dimmer Switch
Osram Switch
Xiaomi Aqara Light Switch

As a candidate, if you want to try powering down method is Osram. Their bulb has a bad reputation. However, this is really more of wild guess. End devices do not typically send packet that tell routers to drop out of Mesh.

The Osram and Hue Dimmer switch typically don't "do" anything until you actually press a button (at least in terms of the ZigBee logs on HE) ...... I've previously had the logs open on screen for many days at a time and never seen any packets from those devices until you push a button. Of course that's not to say that they aren't transmitting something that isn't appearing in the HE ZigBee logs.

I have a ConBee USB knocking around somewhere, I'll see if I can set it up as a sniffer.

I am really interested on learning what knock the sensor out of the network which It seems like doing. On one of your log, It look like it keep configuring the sensor.

Do you see any other error on other logs during pairing?

Every zigbee router/coordinator has limit in term of number of child or neighbor that it can communicate. Based on the number of your devices in the network with one coordinator and two router, it could be that it has gotten in weird state of being rejected due to availability issue on the routers/coordinator on the mesh. This is even more unlikely issue. However, I want to mention it here so that we can have some idea if we need to explore.

As a summary, it seems that the sensor is paired. Model number and manufacture id is captured by the hub. It sees 2 neighbors. The third neighbor is its parent. It is not included in the count. That meant that the sensor at one point in time is in the Mesh. The hub has enough time to query these basic information. I think in short amount of time it is dropped out of Mesh. I am really curious what possibly cause it to drop.

I don't see any other errors in the logs unfortunately :frowning:

Do you happen to know what the limits are on the XBEE for children?

Although it seems strange that a subsequent pairing of another Aqara device occurs without issue? In fact I just paired another Aqara device without issue, this time this one jumped on the XBEE.

Will see if I can order a ZigBee sniffer .... I could have sworn I had a ConBee somewhere but all I can dig out is a Digi XSTICK which I don't think will work as a sniffer. I also have a RaspBee, which I think is the same hardware as a ConBee and can be used as a sniffer, but no spare Raspberry Pi to put it on.

Is there any debug output from the device itself if I plug it into a PC? Or is the USB only for power?

The USB is for power only. these MCU are typically very limited in resources. A debug text is expensive and cost flash spaces. We are also limited in the serial port available.

I am sorry I do not know. They are not huge number. One responsibility of being a router, it must at least be able to temporary store packet for its children while it sleep. This cost RAM space. I doubt that XBee has a lot of them. This is why Zigbee radio has limited support for client and neighbor count.

One idea that I think probably we should try is to have the sensor connect directly to the hub. Unfortunately, to ensure this is to shutdown your Xbee. I understand that this is probably troublesome for you. I did tried each of your module at least with direct hub connection. The module also did connect fine with your ST. I am just wondering if we can force the module to connect directly to the hub. We may just get over the hump.

If I have to rank my suspicion, they will be on the following order.

  1. Aqara Switch (not a problem since this has been shut down),
  2. Xbee.
  3. End devices which I am not aware has been tested with my sensors.
  4. End devices which I have tested
  5. The hub itself.

In term of probability of causing issue, 3 to 5 is very very small. I have test the sensor with my hubitat hub a lot of time, They are working with devices in 4. End devices typically does not involve in packet delivery. They received and send packet only. They do not route packet from other devices.

Based on the issue and what we have tested, #2 seems to the likely hood of where the incompatibility happen. Again, I do not want to force you to try to shutdown your Xbee. I leave it to your judgement if you want to try this.

I'll see what I can do with the XBEE, I just have visions of pulling the plug on it and then having a whole host of issues afterwards trying to get everything to reconnect. Although if I do it quickly enough the end devices probably won't notice.

I should also mention that I do have an identical XBEE on the SmartThings hub, for routing and mapping. I didn't check earlier where the sensor had ended up after I paired it to SmartThings, I'll add a sensor back there tomorrow and check to see where it ends up. It's possible that the sensor jumped on a socket or an Osram as opposed to the XBEE.

For clarity the SmartThings hub has 14 SmartThings socket outlets on it, 2 sets of Osram RGB mini spots and 5 sets of Osram RGBW pole lights. I'm not planning on bringing any of that over to HE as I'm happy with it there (plus I seem to recall that the Aqara stuff doesn't play nice with SmartThings socket outlets).

I could potentially also move the XBEE from SmartThings onto HE and have a second XBEE on HE. Since I "found" a Digi XSTICK that I didn't realise I had, I think I can use that for mapping SmartThings instead (which considering all the devices on the SmartThings hub are all routers anyway, it doesn't really need an XBEE anymore).

I'll report back tomorrow.

Regarding number of end devices per XBEE router, I was looking for this info recently on the Digi website (surprsingly not that easy to find, lots of 'depending on your firmware' caveats). Read through the Q&A's and the '10-12' number popped up a few times as in this instance:
https://www.digi.com/support/forum/54449/maximum-device-xbee-that-join-network-started-coordinator?show=54449#q54449

Also found this which describes what happens in the 'router resources full' scenario:
https://www.digi.com/resources/documentation/digidocs/90001537/references/r_xbee_sleeping_problems.htm?TocPath=Categories|Working%20with%20Zigbee|_____27

That's an interesting read, based on the Everything XBEE thread my XBEEs have SN=130 and SP=AF0.

My XBEEs are XB3-24Z8ST and latest XCTU map seems to suggest the majority of the battery devices are hanging off of it.

There seems to be mixed opinions on what the client limit is, some say 10 or 12 and others say it depends on the firmware / XBEE model, as you mentioned.

Unfortunately I didn't make much progress today :frowning:

I couldn't justify the potential hassle of turning off the XBEE, even if it was just temporarily, but I did do several more experiments:

  1. Moved my other XBEE from the SmartThings network to the HE network (paired easily and within a few minutes some endpoint devices started to move across)
  2. Added another Aqara switch (paired easily)
  3. Added another Aqara sensor (it jumped on the new Aqara switch)
  4. Tried all three of your sensors again with the same results as before

Really can't see anything specifically wrong with the ZigBee network at this stage! I have a couple of Salus SP600 socket plugs on order, should arrive tomorrow so I will pair those and see what happens.

As a further test, I paired another Aqara sensor, but this time I did it about 6" from the HE hub, it paired fine and was directly connected to HE. I then tried the same thing with your sensor, directly next to the HE hub but with the same issue as before.

What I have noticed consistently now though is that by watching the network scan in XCTU, your sensors initially appear on the map, with connections to all other routers and the HE hub. But then within the next scan (which scans every 30 seconds) they disappear straight away.

As you suspected, that does seem to suggest that "something" is telling your sensors to leave the network ..... I'm just not sure what that could be given all other devices, whether routers or endpoints, are connecting fine with no issues at all.

I've ordered a ZigBee sniffer now, but it probably won't be here for a few weeks (from China to UK) so will need to wait until then to investigate any further.

@martyn,

I am really interested on what we can learn from your configuration.

On my end, I will try to see what I can find. I am a bit suspicious with XBee in your case. I do have XBee to test. I will try to see in the meantime if I can find anything about it. I will try to look around as well in regard issue with XBee with the Zigbee stack the I use on my sensor.

Thanks
Iman