Wednesday, April 18, 2018

Answer to "I'm new what should I get?"

Wire your cams. You have to run power to them anyway (do not get battery powered ones) so you might as well run cat 6 and power them through that.

Only record to the cloud as a backup. Get a NVR like Blue Iris to record local.

Record 24/7. Recording on motion will get most stuff but usually misses that one thing you REALLY needed to get.

Think about what you want the camera for. 720p is fine if you are mainly looking at stuff up close or letting you know someone it there but if you want to have a pic the police can use you will need something with enough pixels to work with at the max distance you might see them at. This applies to viewing angle as well. The wider the angle the thinner you are spreading those pixels. If you are not rich you will be making compromises. You need to decide what you can live with.

Cams that also record to an internal card is not a bad idea too. Cameras should only talk to the NVR and be blocked from talking to the outside world.

I hace a lot of notes, tips and compare pics of most of the cameras I've tried in my blog Security Cam 101

Automation is VERY subjective. Anything from simple remote control of a bulb to multi room scenes that happen automatically based on conditions. The only real suggestion here is get a hub and look for devices that work with multiple hubs to keep your options open. This blog lists a lot of the stuff I've tried and some of the issues I've dealt with. I also have a matrix of hubs and devices I've tried tracking how well each worked. As a first hub I generally suggest SmartThings or Vera as they are both fairly cheap and simple to set up. When you are ready to go whole hog you can upgrade to Homeseer which costs more and is aimed more at the installer but does almost anything you can think of except talk directly to Zigbee devices.

Gateways / sub hubs like Hue are good too just try and get ones that do not need to link through the cloud.

In a similar vein you can use your automation sensors for an alarm system if you really do not think you need an alarm and just want something simple. But if you think you need an alarm get one that is separate but talks to the hub you decided on above.

Thursday, April 12, 2018

Voice data bandwidth, a quick test, could Alexa listen all the time even if they wanted too?

Seeing a lot of posts about Amazon seeking a patent for voice sniffing which seems to imply they either do have the capacity on the device to recognize a whole list of trigger word or they plan on streaming all your voice to the cloud to be processed for key words. For example "Amazon patent reveals 'voice sniffer algorithm' that could analyze conversations". My response was:

These are the same devices that supposedly do not have the ability to let us select our own trigger word but will be listening for variations of I like or hate that? Does not add up. In theory they could stream all your voice to the cloud servers but that quickly starts taking up some serious bandwidth and server resources. 

Plus for all that, all they are going to find is I love my pets and hate slow computers and the cable company. No news there. Given the false triggers both my Alexas and Homes get they would build more of a profile of the characters I watch on TV than me. They would have to sort the whole speaker recog first. Alexa still is having big issues with that. Being able to read your emotional state is simple be comparison and they are still working on that. Then there is the whole I'm commenting on something I'm looking at instead of what Alexa last heard too.
Most likely here they are looking to cash in if someone attempts such a silly thing.

But as part of that I tried to find just how much data a request takes. I could not find an actual spec online so I asked my Echo Show and one of my Google Minis the time. The Mini used 254.5 KB processing the request and 26.7 KB while I was talking to Alexa. Alexa used 213.6 KB processing the request and 0 KB while I was talking to the Mini. By comparison my Roamio TiVo used 12.9 during both exchanges. That was way more than I expected and puts this even more in doubt. It takes roughly a second to say "what time is it" so those are pretty close to the kbps rates the devices sending your requests at. So say 5 of them streaming continuously would swamp the 1 Mbps upload speed of many US ISPs. Granted a lot of ISPs are advertising "up to" 5 Mbps upload now but that is still a lot especially if you are using the ISPs router provided WiFi. Then there is the other end where a server now needs to handle not only usual requests, say a 30 a day. That server has gone from processing and average of 74 bps total (over a day) to 213.6 times the number of devices I have every second of every day. That is 2886 times the amount of data needing processed now.

The other assumption that they are going to move some of the processing local for this, even though they say the devices to not have the horsepower to handle user defined trigger words. This would seem to be squashed as well given the amount of data sent just to process "what time is it".

Monday, April 2, 2018

Google Home vs Amazon's Alexa for voice control of automation.

I see someone ask this almost every day in one of the automation groups. As hard as these guys are working to out do each other which is better ALL depends on what you want to do AND what day it is. There is no sign they will even play nice with each other so you still probably want both for the near future if not long term. To answer which is better for you, if you have to have just one, you need to fall back to the old list method. What is it you want from voice control? Any deal breakers? Now look at the latest (like within the last week) reviews and announcements and check off your list. Seriously though if you are getting into home automation $50 is not that much to risk on just trying them both out. Each of you sensors and controlled devices is going to run about the same $30-50. Keep an eye out for sales and you could get a Dot for as little as $29. Google express and Wal-mart had a deal going on for months where you could get $25 back on the $50 price.

Talking to home automation is at least 80% what I use these for. The remainder is almost all adding stuff to lists and alarms / reminders. So here is an exchange I have almost every day which drives me nuts and to me sums up the argument as far as which is better for home automation voice control is concerned. It is not always this bad but it has been all too often.

(Note from memory so maybe not exact phrasing and Alexa follow-up on.)

me: Alexa, turn on TiVo
Alexa: I can not find TV
me: Hey Google turn on TiVo
Alexa: I don't answer to that
Home: Sure for that you might to ask Harmony. Would you like to try that?
me: Yes
Home: I was unable to verify your voice. Please try again or adjust setting in app.
me: Alexa, turn on TiVo
Alexa: I can not find TV
me: Hey Google turn on TiVo
Alexa: I don't answer to that
Home: Sure for that you might to ask Harmony. Would you like to try that?
me: Yes
Harmony: Turning on TiVo.

Sometimes either will even work first try. It is interesting to note though Google always knows I want TiVo and only fails allowing me to turn it on while Alexa fails realizing while there is no TV on my list there is a TiVo. It would seem Alex's problem would be easier for developers to fix given it has a list of items to compare to what I asked for. As in if item is not located, do fuzzy search and ask did you mean [closest match]?  Another example is Iris3 (my north security camera server). Alexa has no trouble at all with Iris2 and Iris4 but is almost pathological in not understanding Iris3. While Google gets it right every time.

On the flip side, I like Alexa's integrated list features better (though both are lacking in my book) and when I'm ready to go to bed I say Alexa, wake me up at 7 AM [pause for response] Goodnight and kicks off the event which confirms everything and if is puts house into sleep mode. I think can almost to the same with Google too (you need to use the word and between command phrases) but the Alexa sequence works well and feels more natural to me. It is also kind of cool that with follow-up turned on (the bit that let's you ask more than one thing with out saying her name again, usually) you can say "thank you" to end an exchange and she gives you a random friendly reply like "You bet!" So for today anyway I'm leaning Alexa. But I have the mix. As of this writing I have an Echo, a Home, a Show, 2 Minis, 7 Dots and 2 Wands.

Oh and as far as answering general questions I think Google has been able to answer about 10% of the time and Alexa about 5% but that could well be what I'm asking.

Monday, February 26, 2018

Link aggregation on Windows 10?

Basically this is to increase the throughput to a a higher end NAS like the Synology 12 bay NAS DiskStation DS2415+ (Diskless) I use. By adding a multi port board like Intel's Pro1000 (EXPI9404PTL) and using what Windows calls teaming you are supposed to be able to increase bandwidth between your workstation and NAS up to the number of ports linked on each end. For example with all 4 ports of the Synology linked and the 4 ports of the Intel card linked you should have a theoretical max bandwidth of 400 Gb/s which is almost local SATA speeds. But there are some catches not the least of which seems to be that Microsoft seems to be trying to force you to upgrade to server versions of their OS in order to use teaming. This means you have to hack around them to get it set up and upgrades may undo you workaround and have to be done again. This happened to me just this morning.

Doing some more research however shows that usually even with 4 ports available on both ends the link aggregation algorithm will only use one. A good explanation can be found here. To confirm this I set up my Synology with 2 ports linked on each of 2 networks and the workstation with 1 on one network (mounted as drive T)  and 4 teamed on the other (mounted as drive S).  LAN Speed Test showed no difference between using either network connection.

Though it also returned these results for a local 8 TB drive like is in the NAS (D:) and a Samsung 840 EVO mount locally as E: so I'm not sure that means much.




A better test might be doing a copy to from one folder on the NAS to another via the single workstation port

And via the 4 teamed ports

Note those are Bytes not bits per second. Not that much faster peaks though more consistent.

Just to confirm, after linking all 4 of the Synology ports together we do not see any more improvement in speed either because 4 port link aggregation really only provides 4 times the bandwidth to 4 or more devices.


Note the theoretical max for a  1 Gb/s port is 128 MB/s. 

So this seems to confirm teaming 2 connections might help some but it is unlikely you will get anything near a 2X bump. A third is unlikely to help at all unless you have high volume going to more than 2 places at once. And so on.

Just for fun I ran Crystal Disk Mark to get some comparative read/write times.
A Samsung Electronics 840 EVO-Series 250GB SSD

WD Red 8TB NAS Hard Disk Drive (what is in the NASs)

Synology 12 bay NAS DiskStation DS2415+ in SHR-2 mode

Drobo5n in SHR mode

Instructions for setting up teaming on Windows 10

So if after reading all the above you still want to team your ports here is what you do.

1) Download ProSet (PROwinx64.exe) Intel download site. Lookup “Intel Network Adapter Driver for windows 10” currently ver. 22.10

2) Run and install the exe (keep the file, you might need it again).

3) Find the temp folder the the drivers where put in (install does NOT install the ones we want) by looking for PROUnstl.exe in your users temp folder (C:\Users\{your username}\AppData\Local\Temp)

Use that to local the PRO1000 folder. Copy the PRO1000 folder to some where safe as you will be needing it often.


Adding teaming to Pro1000:

1) For each Ethernet port, go to properties->configure->driver and click “update driver button”
Note yours will not mention teaming if this is your first time through this process.

2) Choose “browse my computer for driver software” then “let me pick from a list…” then “Have desk”

3) Browse to where you copied the PROWin64 files and browse to \PRO1000\Winx64\NDIS65

4) You will see about 5 inf file there. Choose the 1st one (you will need to keep track of which one you used)

5) From the list of adapters scroll down and choose 82579V Gigabit Network Connection.

Note ignore this warning


6) Finally, repeat steps 3-8 for each of the 4 ports.

7) You’ll probably need to reboot at this point, after that you will see new teaming tabs in the Ethernet port properties.

8) For first Ethernet port, go to properties->configure->driver and click “update driver button”
You should now have a teaming tab. Select new Team is one is not already defined from previous run and select all the ports you want in the team.
You now have your ports teamed on your Windows 10 PC but as I said at the start you may need to come back and do this all over again after an update. Also this assumes you have also linked the ports on switch as well. For Unifi this would look like this.

Sunday, February 4, 2018

Homeseer with 2 interfaces yields Z-Tool issue

There seems to be a bug in Homeseer where instead of using the bind address specified on the config page

It uses the first interface it finds as its primary. In this case 192.168.2.45 instead of 10.10.1.45. Normally this is not an issue as setting to (No Binding) lets it work with either address. A problem arises however when using the Z-tool app on the 10.10 network as it will connect to the server on the 10.10 network but it reports back the 192 network which then fails to find any Z-Nets. It seems the only way around this is to disable the 192 network before starting Homeseer.

A similar issue you may encounter is having to log in even though No Password Required for Local/Same Network Login (Web Browser/HSTouch) is checked. Note this must be checked for Z-Tool to work.

You can enable the 192 network once you are done using the Z-Tool app.


Update:

It seems this also causes a problem with the Sonos plugin as well as it only does discovery on the first network it finds. So I went in search of a better solution and found this info on How to change the network connection priority in Windows 7 which seems to be a better solution. For Windows 10 it is just a bit different of course. See this document How to change network connection priority in Windows 10

The summary for both is get to the window showing your adapters and use the ALT key to expose a hidden Advanced menu, select Advanced Settings on that menu, then alter the order of adapters in the list to put the one with you IoT network on top.

Friday, January 19, 2018

Unifi Cloud Key not updating firmware?

Was trying to update from 5.22 to 5.29 and it kept returning without updating or saying what happened anywhere I could find. After Googling for a bit I found a few posts suggesting to move of trim the DB along the lines of this
The problem with disk space is usually because the DB is growing too large for the original install location. Since the Cloud Key unit ships with an 8GB SD card which mounts as /data (as you pointed out) I was able to solve this problem by moving the db folder to the SD card and then setting up a symbolic link to the new location. This provides much more storage space for the DB to grow and should free up space to handle future firmware updates. Here are the steps to do this:

## STOP SERVICES
sudo /etc/init.d/unifi stop
sudo /etc/init.d/cloudkey-webui stop


## MOVE DB AND SETUP SYMBOLIC LINK
sudo mv /srv/unifi/data/db /data
sudo ln -s /data/db/ /srv/unifi/data/db

## START SERVICES
sudo /etc/init.d/unifi start
sudo /etc/init.d/cloudkey-webui start

I then also ran the script located here to clean out older data from the DB:
https://help.ubnt.com/hc/en-us/articles/204911424-UniFi-Remove-prune-older-data-and-adjust-mongo-database-size


I am thinking about setting this script as a cron job to run periodically on its own, but I haven't done that yet. So far everything seems stable but your mileage may vary. Be sure to check the log files for any errors.

This got me thinking so I checked the available space:
ssh ubnt@keyIP (password is your admin user password or default ubnt)
df -h
But the only even close to full filesystem was .rofs
Filesystem                     Size  Used Avail Use% Mounted on
aufs-root                      1.1G  319M  735M  31% /
udev                            10M     0   10M   0% /dev
tmpfs                          201M  372K  201M   1% /run
/dev/disk/by-label/userdata    1.1G  319M  735M  31% /mnt/.rwfs
/dev/disk/by-partlabel/rootfs  291M  291M     0 100% /mnt/.rofs
tmpfs                          503M     0  503M   0% /dev/shm
tmpfs                          5.0M     0  5.0M   0% /run/lock
tmpfs                          503M     0  503M   0% /sys/fs/cgroup
tmpfs                          503M   96K  502M   1% /tmp
/dev/mmcblk0p7                 1.5G  1.2G  321M  78% /srv
/dev/mmcblk1p1                 7.2G  1.6G  5.7G  22% /data

So I tried just compacting the DB instead.



Note much of a change but it did the trick

Filesystem                     Size  Used Avail Use% Mounted on
aufs-root                      1.1G  319M  735M  31% /
udev                            10M     0   10M   0% /dev
tmpfs                          201M  372K  201M   1% /run
/dev/disk/by-label/userdata    1.1G  319M  735M  31% /mnt/.rwfs
/dev/disk/by-partlabel/rootfs  291M  291M     0 100% /mnt/.rofs
tmpfs                          503M     0  503M   0% /dev/shm
tmpfs                          5.0M     0  5.0M   0% /run/lock
tmpfs                          503M     0  503M   0% /sys/fs/cgroup
tmpfs                          503M   96K  502M   1% /tmp
/dev/mmcblk0p7                 1.5G 1000M  449M  70% /srv
/dev/mmcblk1p1                 7.2G  1.6G  5.7G  22% /data