If you run Emby behind NGINX, then you would normally Connect to NGINX with HTTPS then NGINX will forward the request over your LAN using HTTP. This prevents double de-crypt/encrypt which uses more CPU cycles.
However if you use Emby Connect or Alexa for Emby then you will probably have noticed that on the Emby Server Dashboard is displays your external connection as HTTP and using port 80, which means Alexa wont work as it requires HTTPS on port 443.
So rather than create a double de-crypt/encrypt scenario we can edit the Emby system.xml file which fakes emby into advertising its external connections on HTTPS and port 443.
First we do need to create a real .pfx cert with a password.
There are 2 ways to create a SSL cert:-
It's fairly easy to enable syslog in Unifi Controller, however to log blocked or dropped traffic at the firewall needs a few extra steps. By default anything blocked by the firewall isnt logged.
The Unifi USG comes with pre-defined firewall rules. We need to edit these rules which can be done on the USG using command line and then also needs a json file to persist after a reboot or re-provision. We also need to create some new rules and enable syslog server.
First we need to find a syslog server. For this example I will use kiwi syslog which is free.
Install to an easy to find location and run the console, we will come back to configure it later.
Login to your Unifi controller and go to settings and enable remote logging and enter the IP of where the kiwi syslog server is and normally the default port is 514.
Now go to Routing and Firewall and select firewall.
We need to create 2 new rules, both identical, 1 in WAN_LOCAL and the other in WAN_IN
Name - LAST - default drop and log
Enabled - ON
After pre-defined rules
Advanced - Enable Logging
Tick New, Established, Relate, Invalid
Dont match on ipsec
Leave rest default
So we should have something like this
Next we need to change the pre-defined firewall rules on the USG.
SSH onto your USG and login
set firewall name WAN_LOCAL rule 3002 log enable
set firewall name WAN_IN rule 3002 log enable
Next we need to configure Kiwi to capture the logs.
More to come soon
The next part is optional. The syslog logs in kiwi contain alot of information but this doesnt really mean much to us. I recommend using something like sumologic to collect parse and visualize the data.
Below is a screenshot of my dashboard. It displays the number of blocked connections by their geo-location. A list of top 10 blocked IPs, the total number of blocked requests over 24 hours and finally a graph of the number of blocked connections in 30 min increments. These numbers come from the firewall rule [WAN_LOCAL-4000-D].
Head over to the next Guide "Syslog to SumoLogic" to setup the visualization of the logs.
All Sonos players attempt to establish a peer-to-peer wireless mesh network known as SonosNet as soon as they are powered up. While this is convenient, there are several situations in which turning off this WiFi connection makes sense:
You own a single player that you connected directly to your home router with an Ethernet cable. You don't need the built-in SonosNet, so why not deactivate it to reduce power consumption and electromagnetic radiations.
SonosNet relies on the spanning tree protocol (aka STP) to function properly, so if your other network equipment doesn't support this functionality your entire network will be overloaded by broadcast storms and frequently crash.
Instead of upgrading your network it is much easier and cheaper to eliminate the source of the problem.
You're worried about WiFi-Jacking. Why leave a backdoor in your network that can't be strongly secured?
It is possible to switch on or off the wireless adapter of each Sonos player individually. Here's how in 3 simple steps.
Step 1: Finding the IP address of the device
From the Sonos controller, click on the "about my sonos system" menu. You should see something like this:
Serial Number: 00-0E-58-2D-B0-C3:3
Version: 4.2 (build 24071060)
Hardware Version: 184.108.40.206-1
IP Address: 192.168.1.27
In the example above, the address is 192.168.1.27. We'll refer to it as in the rest of this article.
Step 2: Checking the status of the Wifi link
Sonos provides a little known on the port 1400 of their players that you can access from any web browser at the following URL:
You should see something like this:
The entrie labeled 'eth0' and 'eth1' correspond to the 2 wired ports. The 'lo' and 'br0' interfaces are virtual networking devices used internally by the Linux kernel. The entry we're interested in is labeled 'ath0', which stands for Atheros device 0. Atheros is the manufacturer of the embedded WiFi chip.
Step 3: Disabling the link
To disable the WiFi link start by issuing the following HTTP request:
You should get the following answer:
wifictrl request succeeded HTTP 200 OK
You can also check that the link has indeed been disabled by going back to the status page. The 'ath0' entry should not be present anymore. The setting is not persistent, so if you happen to be unable to connect to your player after disabling the WiFi you can undo the change by power cycling the player.
If you want to disable the WiFi link for good, simply issue the following http request:
The change will now be preserved even after an upgrade. If you ever need to connect the player wirelessly in the future you can turn the WiFi back on as follow:
Impact on power consumption
I measured the power consumption of several players with a wattmeter which is accurate to +/- 0.5 watt. Turning off the WiFi link reduces the power consumption of the players by about 2 Watts. Here are the results measured when the players are idle:
Wifi On = 6.5W
Wifi Off = 4.5W
Wifi On = 4W
Wifi Off = 2W
For the security consious out there you may have split your home network up into VLANs. If you've found this page by searching then you probably already know what a VLAN is and its purpose.
At home I have split my network into 4 VLANs.
VLAN1 - Main data VLAN for all my devices
VLAN40 - VLAN for guests to use
VLAN60 - Security VLAN, CCTV, alarms etc
VLAN80 - IOT devices, internet of things, zwave, zigbee, sonos and home automation etc.
The idea of keeping IOT devices on a seperate VLAN to other devices is mainly for security. Most IOT devices are easily hackable and if this does happen they will only be able to access devices on VLAN80 and not my other devices.
Anyway this post will explain how to get the Sonos devices on VLAN80 to communicate with the controllers (iPhone, iPad, PC) on VLAN1.
With Unifi we need to enable igmp-proxy. To set it we need to SSH onto the USG.
and enter the following commands
edit protocols igmp-proxy
set interface eth1.80 role downstream
set interface eth1.80 threshold 1
set interface eth1 role upstream
set interface eth1 threshold 1
eth1.80 = the VLAN of the sonos devices (IOT)
eth1 = VLAN1 the main data VLAN with the Sonos controllers on.
I recommend restarting the igmp-proxy service on the USG.
To do so enter the command
Now it is set, you will have to re-configure the Sonos Device with the controller.
With Unifi, the CLI commands arent persistent with a re-provision. To make the changes stick we need to use a config.gateway.json file
Obviously changing the VLAN numbers to what ever yours are.
Ok well this didnt really work straight away for me.
To check that igmp is working you can issue the following commands
show ip multicast mfc
show ip multicast interfaces
This should show any multicast data its source and where it is going. For example
On the top half you can see see the source and that some data is going from eth1 to eth1.80. However with the command Show IP multicast interfaces you can see that no multicast data is coming into eth1.80 interface, it seems to be going out on eth1 and into eth1.60.
To resolve this I had to issue the restart igmp-proxy command to restart the service. A USG re-provision didnt work.
--domains "mydomain.com,emby.mydomain.com" (list all your domains you want the cert to cover - i think max is 50~)
--path E:\NGINX\html.well-known\acme-challenge (change E:\NGINX to your NGINX locaiton, keeping the html.well-known....
when you hit enter it will test your setup for the correct files and config, it basically gets a fake certificate. if this completes with no errors you now need to add the argument --live to the end of the script above, like so
hit enter and it should go off an fetch your real domain.csr account.key and domain.crt and domain.key. these will be downloaded into the le64 folder. Keep the csr and account.key safe, you will need these for renewal.
Now you have all this setup you can re-run the above le64.exe script come renew and its all done.
Technology is progressing at a rapid rate. Home automation appeared out of nowhere but has created its own foothold in the industry. Smartthings by Samsung is a modular home automation system which produces its own products but also allows third party products to be used within its ecosystem.
RGBW lighting is big at the moment, and most RGBW controllers are fairly expensive and a little hit and miss with Smartthings.
In comes the cheap H801 wifi RGBW controller.
This little device doesn't work straight out of the box it needs re-flashing with custom firmware using a FTDI usb to TTL serial board.
This post will explain how to get this to work within Smartthings.
What you need.
FTDI USB to TTL Serial board
Mini USB to USB 2.0 cable
Jumper Wires (4x Female to Male and 1x Male to Male)
ESPeasy Flashing Software
Smartthings custom device handles and smart app.
Some images taken from Smartthings Forums, also help and support available here - https://community.smartthings.com/t/release-smartlife-h801-rgbw-led-strip-wifi-controller-bulb/51182/360
Here is the hardware needed.
Flashing the Controller
Unscrew the 4 screws on the H801 Controller and remove the board from the casing.
When flashing the board it's recommended to use the FTDI to power the H801, for this we need to change the jumper on the FTDI board from 5v to 3.3v
Using the 4x female to make jumpers connect the FTDI to the H801
H801 Rx to FTDI pin2 Rx
H801 Tx to FTDI pin3 Tx
H801 3.3v to FTDI pin4 VCC **Have FTDI power H801 to minimize communication issues!
H801 Grd to FTDI pin6 Grd
Also use the male to male jumper to enable flash mode on the H801 (blue cable in picture below)
Connect the USB cable from the FTDI to a laptop/PC. The board lights might flash temporarily and go off, this is normal.
Download and extract ESPeasy_R120. I extracted it to C:\ESPeasy_R120