Finally took the plunge and bought a Roco Z21 for the layout. The current track layout is this:
and it is connected by just two wires because all the points - Rocoline with bedding - are delivered as isolated switched live frogs. Either side of the frogs, the rails carry the polarity you would expect. I did not know this when I chose this track system but I'm really pleased that it has turned out so simply.
The rest of this post is about how I integrated the Z21 with my home WiFi network and succeeded in getting video working from my two video loks. If you have no interest in computer networking then I will not be offended if you stop reading now.
On the control side I started out with the default installation of a standalone WiFi network using the preconfigured hub cabled to the Z21.
I downloaded the Z21 App from the Google Playstore to my Samsung phone; connected the phone to the Z21 network created by the hub and away I went.
The Z21 is hardwired with an IP address of 192.168.0.111. Roco have done this so that they can deliver a system that works out of the box. The hub is preconfigured to work with any address in the range 192.168.0.0 to 192.168.0.255, so it talks quite happily to the Z21 on 192.168.0.111.
If it ain't broke, why fix it?
Well it's not completely working. While my phone is connected to the Z21 hub, it is not connected to the Internet and if you want make use of Roco's sound loco database in the Z21 App for adding locos, you need that Internet connection. Adding locos whose function explanation sheets are buried in their boxes some place deep in the attic is a painful process. But if you have the Roco stock code, any sound loco since 2014 will instantly appear in the search box and Hey presto all your functions are done.
So I really wanted to get the Z21 onto the home network so that I could connect to the Z21 and the Internet at the same time. The problem is that my home network is on 192.168.1.0 to 192.168.1.255, so it won't talk to devices in the 192.168.0.xxx address range. Even though I regularly deal with network addressing and routing in my job, I have no desire to start messing about with the addressing of the home network.
The first step is to change the IP address of the Z21. You can do this with the Roco Z21 Maintenance App. I decided to use the Windows version on my laptop. There is a great big health warning on this from Roco - if you change the IP address, you're on your own. Mess up the IP address and you will not be able to talk to your Z21. There are rescue procedures but you have been warned.
Before changing the IP address of the Z21, I logged into the hub on my home network and checked whether 192.168.1.111 had ever been used. I also noted the gateway address and checked that the mask really was 255.255.255.0 as I thought.
Then I connected my laptop to the Z21 hub and connected the Z21 maintenance App. I entered the new IP address and the gateway address of the home network and completed the reprogramming procedure.
Next I logged in to the Z21 hub and changed it to have an address in the 192.168.1.xxx range. The purpose was to move the Z21 hub and Z21 to a network with addresses 192.168.1.0 to 192.168.1.255 - ie the same range as the home network.
I connected the laptop to the Z21 hub and was able to ping the Z21 on 192.168.1.111. I was also able to connect the Z21 Maintenance App and once I had changed the Z21 IP address in the Z21 Phone app, I was able to connect to the Z21. I confirmed the phone app connection by sounding the whistle on one of the loks.
The TP Link hub which came with my Z21 can operate in 'Extender' mode rather than the 'Host' mode it has when delivered. Following the instructions and connecting it to the SSID of the home hub I set up the Z21 hub to extend the home network. With that done, I was able to connect the laptop and phone back to the home network. The laptop was able to ping the Z21 and the phone was able to connect and I had Internet on both the laptop and Phone.
So now the network connection from Z21 phone app to Z21 is
Phone -> Home Wifi Hub -> Z21 Hub -> Z21.
And now for the video loks.
Roco video loks have two WiFi modes - host and client.
In host mode, the lok operates as a Wifi hotspot with IP address 192.168.15.2. You connect your device to the hotspot and then run an application which expects to get video from 192.168.15.2.
In client mode, the lok connects to a Wifi network just as if it were another device. You enter the SSID, password and it connects.
To integrate with the Z21 app, you want the lok to be in client mode.
So far, so straight forward except I could not get any video in the phone Z21 app in client mode and I had no idea why not.
As I've had the video loks for some time, I know that I have had both modes working previously which puts the suspicion onto the new setup.
One of the benefits of the Z21 App is that is able to program the video lok WiFi mode from the DCC side - ie you do not need to have a WiFi connection to the lok in order to reprogram its WiFi mode. So I set the video lok back into host mode. I downloaded the Roco Video Lok camera app to the laptop. Connected the laptop to the Video Lok Wifi and then started the Video Lok camera App. This found the lok and started streaming.
Next I ran Wireshark to capture network traffic while the video app was running. I knew the lok IP address was 192.168.15.2, so I was able to get the MAC address of the lok knowing that the home hub admin page reports the MAC address of all devices that have ever connected to it. ie when it came to checking whether the lok had connected in client mode, I would be able to identify it by its MAC address.
I used the video camera app to reprogram the lok into client mode and gave it the SSID/password of the home WiFi network. Then I looked for the lok MAC address in the connected device list of the home hub. There was nothing there
. I know that the lok had connected to previous hubs so I switched off the Z21 hub. Then I checked the home hub again and found that the lok had connected. The connected device list also gave me the IP address for the lok. I also found that I could ping the lok from the laptop.
Now the video app was able to find the lok and stream video.
So part one of the video lok solution is to have the Z21 hub switched off while the lok connects. Note that the lok will keep trying to connect until it succeeds. ie if you forget to have the Z21 hub switched off when you start the Z21, the video lok will succeed soon after you switch the Z21 hub off. Switching the Z21 hub back on again does not break the connection between the lok and the home hub.
Part two, getting the video to stream on the Z21 phone app, is more straight forward. The video configuration page for a lok states that in client mode, the app will automatically find the IP address so you don't need to. The default 192.168.15.2 address is entered on the page, but you are led to believe this is not important. Auto finding works in the PC video app so there is a way of doing it but it doesn't work in the Z21 Phone app. I found that by entering the IP address found in the home hub connected devices list manually, the Z21 App started streaming video.
Having found the solution for the first lok, I repeated the process for the second with similar success.
The Z21 app only shows video from one lok but when you can switch from one to the other.
The Z21 phone app does not have the fancy 'cab' graphics that the tablet versions have so it can't place the camera feed in the appropriate location. I am tempted to get an iPad 8..
There is a sad footnote to this tale.
At the start of testing one evening earlier this week I heard a buzzing and smelt something nasty as I switched on. The Z21 went into 'short' mode. I traced the smell to the Roco Bavarian DMU which I was given for Christmas. I think the decoder must have blown. I contacted the retailer and it's now its way back for replacement. As it's a Roco lok, on Roco track being powered by a Roco supply there was no argument. None of the other seven or eight loks were affected and there have been no problems since. I am hoping it is just a one off, as it's the first blown decoder I've had in over ten years with DCC.
David