Anyone used an Arduino and Xbee Pro board to extended Zigbee Mesh Range?

@JohnR thought id post back in here in case its useful to others as well.

So the flex aerial pro came today, I thought SMA might be overkill considering it says even with a standard aerial it can do 1.5 mile. Well. I added it to the ST hub, checked in XCRU as per your mapping post to see it connecting to other devices and it does.

Putting inside and pointing it towards the gate garnered no extra distance to the end node. So I figured it might be batter to put it in an out building near the end node to see if it’ll reach inside the hub. But that doesn’t work either.

The thing is a very cheap ($15) door bell reaches from the point where I want to put a ST sensor much further, through multiple brick walls to the other end of the house. My wifi reaches out here quite well too. But I can’t get this to increase the distance at all - do you think its working properly in the network? Id expect it to connect to the hub quite easily through a wooden shed, about 50 foot and a brick wall or two of the home to the ST hub.

1 Like

The best way to extend the range is to have two xBee’s act as a backbone. For example, I have a long driveway 1,200 feet and every Christmas I put direct attached hue bulbs at the end of it and shine them on a Merry Christmas sign. To extend the ZigBee network that far I use two xBee’s configured as outlined above. One xBee is close to the house but outside and it connects to the SmartThings hub inside in our basement. The other xBee is in a weather tight enclosure out at the end of the driveway. The two xBees (that are in line of sight) automatically connect to each other and extend the ZigBee network out to my Hue bulbs. Works like a champ very reliable. I would give that a try out to your shed. What type of device is in your shed that your trying to reach? Is it one of SmartThings presence sensors? If it is, they work best connected directly to the SmartThings hub.

You asked in an eMail if you can ping the xBee from SmartThings to see if it will respond. The technical answer is yes but you would have to write a custom device type and Smart App to do it. Digi’s xBees have proprietary cluster commands on end point 0x11 (if I recall correctly) and one of them loops back packets it receives. But instead of doing that use the XCTU program to map out your ZigBee network. It will show signal strength between all nodes and who is connected to who.

If this still doesn’t work I would entertain the possibility of radio interference either from your WiFi network or another close by ZigBee network. A quick test would be to see if things improve after you turn off all your WiFi hubs and routers. If it does you may want to change the channel of your WiFi network. Its pretty rare to have interference with your WiFi network but it is possible.

3 Likes

Thanks John, that makes sense about using two - and was actually what I was thinking in my head. I do find the SmartThings hub very poor in terms of distance, just one interior brick wall can be enough to trip it up, I guess its only running on very low power in the UK too.

I need another couple of USB boards to arrive to both blue the Xbee’s in and test the mesh network in XCRU. Would you recommend putting the Xbee with the antenna in the house closer to the hub, or in the distance, with the non antenna version in the house?

To start with I want a SmartThings motion sensor and probably the open/close sensor to connect to them. I’ll probably also want to put the SmartThings shield in the shed where its near the gate so the RF can trigger its dodgy receiver reliably, so that’d be another zigbee device in that area.

Interestingly when I did try XCRU with the PCB mounted antenna Xbee it just gave me a ? for the quality of connection between everything - I tried it with the Antenna version and everything still had a ? except for the antenna xbee which was connecting to the hub at full quality (from the room next door to the hub)

1 Like

I would start by putting your xBee with the antenna in your shed.

It concerns me that you can’t see the signal strength of the other devices. When you have two xBees running I think you should test them with the XCTU. There is a range test under the utilities tab that will allow you to see the quality of the connection between two xBees. Start with them close to each other and make sure they have good signal strength and a high quality connection (no errors or dropped packets). Then move them further apart and experiment with what locations work best. If you cant get them to work with the XCTU when they are close to each other I wonder if the models you have are not compatible with all the utilities in the XCTU. Digi has been making ZigBee ZB modules for years and if they are not the new SMT versions I suggested above I’m not sure if they will work.

I haven’t been told this “officially” but the older through hole xBees don’t have as rich of a feature set as the newer xBee ZB SMT. All my experience and work over the last year and half has been on the SMT version of the S2C. So I’m not sure what response your going to get with the units you have.

I was hoping to have a play this weekend buy the supplier is late dispatching my second USB explorer so i’ve no way to power two Xbees at one :rage:

I did ask Digi if there’s any difference with the SMT and the Through Hole versions and they said none what so ever, which is why they share the same data sheet. The SMT’s came out a bit later but share identical chips and just allow you to solder your own connection. Same price too, one is S2C and one is S2B. I was told that from Benoist Morel. Perhaps they were on about the difference between the S1 and the S2 modules? The S1 are older and as you describe, don’t have full Zigbee standards, I think they can only be configured to be end nodes to be honest (they’re the ones listed as 802.15.4 in the catalogue rather than Zigbee Pro of the latest S2’s) - I don’t think they even have the option to put router API firmware on them - all the S2’s either SMT or Throughhole run the exact same firmware.

I probably pull the antenna version in and try a signal strength at least. I could try and power one of the non antennas from an Arduino board with the 3.3v and ground pins - shames there no lights on the actual Xbee to see if its powered up, but we’ll see if I can see it on the network with XCTU I guess!

Ok, we’re winning here! The second Xbee did indeed power from Arduino ok. So I have the antenna version connected to XCRU here as 169D. E8AC is the other Xbee at the other end of the house, as far away as possible really, so thats through probably 4-5 solid brick walls from where I am with the first Xbee and it appears they might be connected to each other.

The signal strength is showing as well now in this diagram. So I guess the next stage would be to put the aerial one outside and see if it still connects via the other xbee, which connects to the SmartThings router.

https://www.dropbox.com/s/mav5z8oz7wsx5k5/Screenshot%202016-01-30%2014.02.35.jpg?dl=0

Now the bit that worries me here is the end nodes. We can see the router, two SmartThings sockets and the two Xbees here as the co-ordinator and the 4 routers respectively. But there are numerous end nodes on the network not showing up and the one that is, is connected directly to the SmartThings hub (and thats a SmartThings multi-purposes sensor, which is a room quite far away from the hub and right next to the 2nd Xbee…)

Is this a case of needing to wake up all the end nodes with the cordinator off and hope they’ll latch onto the Xbee instead, and then power the router back up again? Missing on this graph is a motion sensor and a presence sensor which is the car outside.

@JohnR Just noticed on your post as well FAQ: Mapping your ZigBee network with Digi's XCTU that in the mapping you only have one end node and that too is only connecting directly to the SmartThings hub. So does it appear end nodes wont go via routers? Because its even ignoring its own native routers in the SmartThings sockets here - or is map just displaying things incorrectly for the network? All the routers connect to each other happily, but if I can put the end nodes further away it seems a bit pointless… surely its XCRU thats wrong as SmartThings themselves suggest one of the sockets to extend the range (and surely they mean for battery powered end nodes as well?!)

I suppose my next test is to put the Arduino powered Xbee in the shed and see if I can connect to it via routers…and if I can…then why the hell wont the end nodes route via it.

Edit 3: Ok, so here is the antenna less Xbee in the shed (E8AC), and its being seen on the network, its connecting directly to the hub as well (albeit with a red signal bar) so this seems to confirm my fears. Its connecting from the garage just fine, but the ST end nodes are ignoring it, can’t see the ST hub and are just going offline when put in the shed with it :frowning:

Edit 4: FINALLY! The end node has latched on the Xbee in the shed and it appears to be updating in ST (though i’m not sure who its getting 24.2 degrees as the temperature in the shed!!) I suppose I now need to test how quick the motion detector works. I think you’re right in that the two Xbee’s are required as you can see the one in the shed has about 50% signal with the other xbee and whilst it can see a SmartThings socket and the hub, it is very low signal. Though id expected it to be better if I put the aerial one out there, in which case I wonder why it didn’t connect to the hub last night. So much for a full power Xbee Pro with antenna managing to do a couple of miles, it can just about do 40 yards through a brick wall for me! I do think though that perhaps it is a better idea to go for 3 xbees, two in the house and one outside to mesh together, rather than having opted for one more expensive SMA xbee that would be throwing itself directly to the router. Thats more “wifi” than “zigbee” really isn’t it. Also it gives more of a mesh network for other nodes to latch onto outside or in out buildings, especially if I decide to put some zigbee motion sensors in some of the outbuildings for security.

2 Likes

Did you power down the SmartThings hub for at least 15 minutes (including removing the batteries) in order to force a network heal (rebuild of all address tables) after you added the new devices?

Battery powered devices do sleep a lot, but if you take the Coordinator off-line for at least 15 minutes then you should catch all of them and they’ll go into panic mode because the coordinator is offline. This will cause everyone to rebuild their address tables once the Coordinator comes back. And that’s what causes them to then consider the possibility of new neighbors, like the new xbee devices that have been added.

Otherwise, they’ll ignore the new devices and just use their old routes Until a network heal is done.

This is true regardless of the repeater that you’re using. It won’t be used for routing until you’ve done the network heal.

1 Like

I didn’t need to in the end (see 4th edit of the post) finally got sensor to connect via the Xbee.

Only problem is now i’ve moved it into the metal letterbox where i wanted it and despite there being a full power Xbee Pro with antenna a matter of 10-12 feet away it will not connect to it. I’m basically no further than i was with all the Xbee Pro’s dotted around.

Might consider removing as many battery powered devices from ST as poss and going for wired always on devices for immediate feedback and perhaps go for Zwave instead of zigbee too. When i’ve got 3 Xbee Pros running at 63mw each in a triangle around my estate that are supposed to have up to 1.5 mile radius each and its still not enough to get a ST sensor to connect in a box (metal or otherwise) i think im fighting a losing battle. Of course the ST sensors themselves might well just be awful, but i think powering them all the time will not only solve range issues but also give more accurate live feedback.

Zigbee is usually used for outdoor sensor-nets because it’s somewhat better than Z wave at traveling through water. Rainy days can kill Z wave connections outdoors.

Regarding your mailbox, anything RF inside a metal box has trouble, wired or not. Often the best way to handle this is to create some kind of “window” that the signal can travel more easily through. Sometimes it’s just a matter of drilling a hole and then sealing it with something that is waterproof but allows the signal to pass. Some people just replace the mailbox door with a slightly smaller one and use weatherstrip around the edge and that’s enough to let the signal through.

You might also try healing the network. It’s one of those “can’t hurt, might help” things, and is considered a best practice for any time you move a mesh network device from one physical location to another.

Zigbee devices don’t simply orient to the strongest signal unless they are in table building mode. Each device is only aware of part of the total network, its “neighbors,” and it will continue to try to use its original neighbors even if moved miles away from them until you force a rebuild of the address tables.

However, if you want constant feedback, mesh is likely not the best solution. You might consider instead Wi-Fi sensors. They have much better range, constant feedback, and there’s no issues with address tables if you physically move the device . They just cost more in both money and Energy use.

I don’t know what’s available in the UK, but many people in the US use Kumostat wireless tags for long-range outdoor use cases. They can be quite nicely integrated with SmartThings as well Thanks to some work by a community member. I would imagine even if they are not available for the UK that there are other similar devices. Just another possibility to consider.

I see, well z-wave is out then as you’re right, rain will kill it.

I realise that a metal box is the worst place to put anything, though I was sort of hoping that with a very powerful xbee repeater next to it, that would penetrate enough to get through considering we’re talking literally tiny bytes of data here. The only thing of course is it might be too cold for the sensor to work there. I think its only rated to 0 degrees (which it isn’t less than today I might add)

I’ll try disconnecting the SmartThings hub for a bit - i’ve noticed when the ST battery sensors lose connection they tend to go sleep and the only way I can wake it up again is by pulling the battery out and putting it back in.

I might try putting a hole in the box, I might not be able to get to the side though - also its nothing like a US style letterbox on a pole, its connected to a solid sandstone brick pillar which is probably nearly 1m x 1m square, and its a large metal box with a locked door. Its quite hard up on the left hand side which is the side pointing towards the shed with the xbee on so would be the best side to put a hole in it.

I’ve gone and pulled the battery on the ST sensor but still wont connect - I might try turning the ST hub off for a bit, but keep in mind the last thing the sensor connected to was the Xbee router its next to, so it should still be trying to connect to that. I can with a longer USB wire move the Xbee Pro a couple of more meters towards the box. I think a better test then would to put the sensor outside the box on the far side, so if you like there’s two pieces of metal its go to travel through for the line of sight, but of course it’s outside the box. If it connects to the Xbee in that situation then i’ll know its worth attempting to hack up my letterbox! haha

BTW Wifi devices are much cheaper over here than Zigbee. All the SmartThings sensors and the socket are very expensive. Wemo is much cheaper and then no brand wifi sensors on eBay are about half the price of any zigbee or zwave device you can buy here. Those a dlink wifi motion sensor is £31 and the SmartThings one i’m trying to get to work here is £30 - the thing is my wifi signal almost already goes that far (and will be useful for me working outside to make it go that far) where as i’ve now spent £80 on Xbee’s to try and extend the network…and its still not worked yet.

The sandstone itself will also kill signal, so if the letterbox is embedded in the sandstone that’s another whole issue.

In the US, in certain parts of the country it’s quite common to have a letterbox embedded in brick, particularly the end of the drive where people might tend to run into it If it’s just a small box on a wooden post because they don’t see it there. Getting signal out of one of these almost Always requires drilling.

Ah not embedded into the stone thankfully! Its attached to it. I’ll add an image if I can find something to this post…

1 Like

Also note that Removing the batteries from the sensor and then replacing them will usually wake up the sensor, but it will not rebuild the address tables. That’s sort of the point. You want to be able to change batteries without interfering with the network.

The only thing that will force a network heal is taking the Coordinator itself off power for an extended time. That’s the SmartThings hub in this case.

Yeah understood. I avoided turning it off again just as it mucked up a few of my SmartApps when I did it yesterday. Plus with it having already connected to the Xbee last as pictured above i’m almost certain it wont help.

1 Like

Its rough from Google maps but it gives you an idea of the layout. The larger thin yellow line is the plot of land in general, I expect to get our external wifi working here, especially as without wifi there is no data connection and if I want things to happen when I arrive down the drive shown on the left my phone is going to need a way to talk to the ST hub.

The thinner yellow line is the house, there’s an extension on the left now which doesn’t exist on Google images as its about 5 years out of date.

The blue cross is where the motion sensor is. The orange crosses are where the powered Xbee Pros reside. The red cross is where the ST hub is - and then the green line on the side is for scale.

Just for clarity…you probably already know this, but the phone apps don’t talk directly to the hub. They have to use the Internet to talk to the SmartThings cloud, which then uses the Internet to talk to the hub. So you can use Wi-Fi or you can use cellular Internet from your phone. So if your phone has service, it doesn’t need to be in range of your own Wi-Fi, it can work exactly the same way it would work if you were miles away and you opened the SmartThings Mobile app.

If you’re running Wi-Fi out that far anyway, I would seriously consider using the Wi-Fi sensor in the mailbox.

The main advantage to Zigbee over Wi-Fi in the US is lower cost for both devices and energy use. If you’re not concerned about energy use, then Wi-Fi options are always worth considering. :sunglasses: Because there’s another issue which comes up, and that’s that boosted Wi-Fi almost always interferes with nearby Zigbee. And the more you boost the Wi-Fi, the worse the interference. So it’s often quite difficult to get both working in the same exact area. And it’s the Wi-Fi that almost always wins.

Yeah, the problem is there no mobile data signal here at all, for quite way - we’re down in a valley by the river. Zero 1g, 2g, 3g, or 4g signal (literally no bars), and at the moment the wired internet is a lousey 3.5mb.

Having mentioned that Dlink device, I had a look and its got a plug on the back…getting a socket into the letter box would be possible, but also a bit overkill. You’re faced then of course with getting the Dlink to work with SmartThings too as I still want everything integrated with SmartThings, which is the easy benefit of the its own sensors. There is certainly a pro/con with everything!

There is a chance I might go for a very powerful 5ghz outdoor wifi antenna, that way I wouldn’t be interfering with the zigbee network either. But it remains to be seen if even the most powerful 5ghz outdoor access point will do the 130m id quite like it to do so I can get a signal from the road as i’m about to turn into the drive. Of course the problem with that in reality is how quickly my phone logs onto the wifi network whilst i’m driving down the drive in my car to have the signal to trigger any arrive at home settings!

Still slightly annoyed though that a £10 wireless doorbell works from the exact location I have the SmartThings sensor in. The SmartThings costing £200 to try and get the sensor to work from that location and it still isn’t without some work.

If I can get reliable service around there, id plan to replace the door bell with a zigbee so that I can get push notifications and place different buzzers around the home more reliably. There also needs to be an open/close sensor on the gate for when we finally get to building that app - and longer term I was thinking of putting a couple of motion sensors in the hedge on the drive down towards the house to monitor if people arrive in a car - I was going to have one before our gate, and one just after our gate. If both are triggered is a car going to the house at the bottom, but if only one is triggered, something has stopped at our house.

Of course getting a zigbee motion sensor to work here in a waterproof box is going to be a big challenge! Maybe it is time to pick up that SMA antenna Xbee Pro after all!

Just to confirm, as suspected, unplugging the router for 15 mins hasn’t any difference.

What with so much on the market being zwave based, I am wondering if it makes financial sense to be trying to build so much of this zigbee network up, which is essentially just to get the native ST sensors working.

We’re talking about unplugging the SmartThings hub, right? And taking its batteries out? That’s the only thing that will force the network heal. And you won’t necessarily see the results immediately, it takes a while for all of the tables to update. Usually we’d look again the next day to see if there had been improvement.

That’s a very good question. The biggest advantage to zwave is that it doesn’t run into Wi-Fi interference. That makes deployment in most residential homes much easier. Particularly for fixed location devices like light switches, door locks, and window covering controls, which is why Z wave dominates the low-end home automation market for those device classes. Those are all devices where you can’t just move the device 12 inches to the left to try to find a better signal.

A lot of people have Z wave only deployments, a lot have zigbee only deployments, a lot have a mix. It just depends on your particular set up.

It certainly doesn’t seem to make sense to build up a whole network with a lot of financial investment just to get one device to work. So if the only thing you’re dealing with is the mailbox sensor, I might look for other ways to solve that particular issue.

Yes, hub off, batteries out for 20 mins - and judging by exploring in XCRU where you can see the Xbee networking fully mapped out as seen above, it really doesn’t take very long for it to self heal at all. But I knew it wouldn’t help as i’ve already shown above the motion sensor had already connected to the Xbee anyway - it just wont connect to it now 3 meters away.

It wont just be for one sensor as I plan to use an open/close sensor on the gate too, and eventually two more motion sensors in the vicinity, and perhaps pop some more motion sensors in the outbuildings for security and the RF controller on the gate (running from the SmartThings Arduino Shield) will probably be placed in the shed ultimately, and finally id like some kind of button to replace the wireless door bell…though having a look and there doesn’t really appear to be either Zigbee or ZWave direct replacements for this, although if there is, its Zwave like the Philio smart button, but at an eye watering £52 ($75) just for the button, id be tempted to stick with my $15 doorbell that works fine until it eventually breaks.