Monday, December 30, 2019

XiaoMi - Home Security Setup

This post will be updated .....

Mi Control Hub
This is the main control centre for the Xiaomi home security. There are many features and it can seamlessly / easily connect to many of the Xiaomi devices such as:
Xiaomi Switch
Xiaomi Door Sensor
Xiaomi Occupancy Sensor
Xiaomi XiaoFang camera
.... more

Glossary 
Some useful meanings for Xiaomi words
Devices - usually Xiaomi sensors or Xiaomi components that can be connected to the Control Hub.
Trigger - some thing that can cause the alarm, eg opening a door will 'trigger' the Door Sensor or something moving will 'trigger' the Occupancy Sensor.
Alert - when 'Trigger' happens, we can choose what to do, that means we choose the Alert. The Alert can be sounding an alarm, or sending email.


Control Hub - set main timer
The main timer means setting a time range, so that within this time range, any of the devices can be set as a trigger.
Part A: Set the Time
1. From the Xiaomi Home APP on your phone, tap "Mi Control Hub", tap Auto (from Hub / Auto / Device), tap Alert, tap "Timed Alert".
2. Now in the "Timed Alert" page, tap at the bottom "Add timer".
3. To set your automatic timer, fill in these fields:
Repeat - One Time / Everyday / Mon to Fri / Weekend / Custom
On - choose start time
Off - choose end time
Part B: Choose the Sensors / Device
1. From "Time Alert", go back one page to the "Alert" page. OR From the Xiaomi Home APP on your phone, tap "Mi Control Hub", tap Auto (from Hub / Auto / Device), tap Alert.
2. Tap "Alert Trigger Device". Now you see a list of sensors or devices like: Occupancy Sensor, Door, etc
3. Tap any devices that you want to use as a Sensor.
Part C: More options
4. From the Alert page, there are more options:
a. Delay Effective Time - choose how long to delay before sounding the alarm.
b. More Settings - you can set things like
- Control Hub alert ringtone
- Alert Volume (sound on the Control Hub)
- Alert red light blinking time
- Alert time
- Push notification to phone
- Linkage Alert
c. Log








Saturday, December 28, 2019

CMS Security Discussion - Drupal, Joomla, WordPress

Which is the most secured CMS - Drupal, Joomla, WordPress?

https://www.getastra.com/blog/cms/security-comparison-of-cms-wordpress-vs-drupal-vs-joomla/
Very good write-up. Drupal came in first followed by Joomla and Wordpress.
"Drupal encountered the least number of cyber attacks since 2005"
There is a nice table of comparison featuring CVEs reported, Security Advisory, Clickjacking Protection, 2FA, etc

https://blog.templatetoaster.com/drupal-vs-joomla-comparison/
The title and categories being compared sound interesting. The paragraphs focus on different features of comparison. However the content itself seems light, with not much specific statistics.

https://blog.cpanel.com/wordpress-joomla-drupal-a-security-comparison/
There is no clear-cut answer given. However the site offers various links to see the list of security issues, and also other sites that do the comparisons.

Monday, November 18, 2019

Data Science - Evaluating ML Models using Cumulative Gain Lift, K-S Statistic, ROC, AUC, Gini Index

The links below have some very good technical details. This post will not repeat those details, but instead give some plain description to explain certain things which are not that clear.


Machine Learning algorithms aim to train a data set, then applied to new data set. So the main question is How good is the model? The following tools aim to answer that.

Confusion Matrix - The purpose is not to confuse but determine the proportion of correct or incorrect predictions. Think of the truth tables about false positives, Type I and Type II errors, etc.

Let's also focus on the example where the Dependent Variables has only two classes: True/False, Positive/Negative etc....

The Gain is usually plotted as a Cumulative Gain Chart (CGC). The chart is for only ONE of the target value - they don't often mention this clearly enough. So the Y-axis on the CGC can be either for the Positive or Negative case. The X-axis shows the proportion of population. The graph reads this way: after a fraction of the population is considered, how many of the Target is correctly predicted, as compared with no model being used (ie random chance).

The Lift graph is obtained by the Gain value divided by the decile at which it is being plotted.

The AUC is the area under the ROC curve. The ROC is a plot between the True Positive rate vs the False Positive rate. If purely by random chance, no prediction at all, the performance is 0.5 - which is the area under the graph of the diagonal line. An ML model with prediction will mean the ROC is curved above the 45deg line. The area under this represents the probability which is between 0.5 to 1.0. 

The Gini Index the 2*AUC - 1, the reason for this is to make the AUC to have the value of 0.0 to 1.0.

The K-S statistic and graph shows how well the model predicts and separates between the Positive and Negative target values.

Wednesday, May 22, 2019

How To Setup XGody JS01 ANC Bluetooth Wireless Earphone


This article is about setting up and using the Xgody JS01 Active Noise Cancellation (ANC) Bluetooth Wireless Earphone device.

Firstly, there are some photos from the product:


Front Box Back Box



English Instructions
Chinese Instructions



There are 4 Buttions:
- Power button
- Multifunction button/key
- Next / Forward button
- Previous / Rewind button

Power ON/OFF: Long Press Power button.
PowerOn:   Voice - Kai1Ji1.  Lights - Blue flashing
PowerOff:  Voice - Guan1Ji1. Lights - Red single flash
Error: Instructions say Multifunction key, it should be Power button.

Bluetooth Pairing
Error: Instructions is wrong to say "Keep press Multifunction key 3s."
The correct way to do Bluetooth pairing is.
- Power off the headset - Long Press power button.
- Wait a few seconds.
- Press and hold both Power and Multifunction buttons together for a few seconds.

Next/Previous Music Tracks Selection
- To go to next music track, long press the Next button
- To go to previous music track, long press the Previous button

Volume control
- Volume up - single press of Next button
- Volume down - single press of Previous button

Music Play/Pause
- Single press of Power Button to Play or Pause.

Redial Last Number
- Double press of Power Button to call the last called number on the phone.

Friday, March 29, 2019

Powerline over Ethernet

This is a collection of info pages on the subject of Powerline over Ethernet devices.

This usually comes in a pair of plugs. Plug these two into different socket points at home, then the electrical network carries the computer network information. At the two plugs, simply connect routers or devices directly to it.

Powerline networking: what you need to know

In terms of security,
i) If using in an apartment, dormitory or building shared by other people, obviously your network becomes exposed for others to see.
ii) Change the default network name that comes with these devices.
How to Secure Your HomePlug Powerline Network

A list of such products:
https://www.google.com/search?q=powerline+ethernet+plug&source=lnms&tbm=shop&sa=X&ved=0ahUKEwjG3oPUuqfhAhWGbysKHZqcAFUQ_AUIDigB&biw=1920&bih=975

https://www.google.com/shopping/product/6595958003211101474?q=powerline+ethernet+plug&biw=1920&bih=975&prds=paur:ClkAsKraXz60cDZk3Z0H8z_SaprppRgYMC-fTVGjam0HjT-Wo3EPeb3sNkR4wU0aXYLEgHs3cMd8_R1lX_pUMyQxTtDkrZJeC5CzydSmScMi0vPCm06BGLKnDBIZAFPVH73ZrB8fBDJAc77N4iIz-j9P3skszg&sa=X&ved=0ahUKEwjf2JnVuqfhAhVbXn0KHcC5BVQQ8wII7gI