Category: 未分類

  • My Attempts to Integrate Home Assistant with ADT UK

    TL;DR. In the UK, you cannot connect the ADT alarm panel with any other devices or services that aren’t ADT-certified.

    Z-Wave Secondary Controller

    This is the first solution that I tried. Now I no longer say it doesn’t work in other regions than the UK, but I also can’t verify that myself. Full disclaimer that my experience is limited to the UK market, I managed to put my SmartThings Hub v3 Z-Wave into the learner mode, and was able to use the ADT mobile app to add it as a secondary controller (IIRC, it asked for a code, and I just gave 2222 which seems to be the generic installer’s code that ADT engineers use). Afterwards, I have 5 Z-Wave “Dimmer Switches” shown in the SmartThings app (I have 4 motion sensors, 1 door/window sensor, which I assume that’s why I have 5 Z-Wave devices shown up), but none of them would transmit any data. Later on, they went into the state of “disconnected” perpetually.

    To make things worse, the ADT panel would then display a warning saying my SmartThings Hub is an unknown device in the “Smart Devices” section. I was also not able to remove it myself using neither the panel nor the mobile app.

    In the end, over a phone call with an ADT technician, they were able to remotely remove my SmartThings Hub from the devices. Now my SmartThings Hub is just in a broken state as a secondary Z-Wave controller. Of course, I could reset my SmartThings Hub but then I’d also need to reconnect my 15 ZigBee devices. Instead of going through that hassle, I managed to use the SmartThings web app to remove these zombie Z-Wave dimmer switches, which is enough to hide them from the SmartThings app.

    Qolsys Gateway

    I then checked out https://github.com/XaF/qolsysgw which seemed to be the only working integration according to some HomeAssistant posts. Unfortunately, I’m not able to see “Installation” in the Advanced Settings in my Qolsys IQ Panel 4.

    Over a phone call with an ADT technician, I’ve been told that menu is reserved for ADT engineers only, and that connecting to other systems such as Google Home, Alexa is not allowed in the UK (but he admitted it is something that customers can do in the US for example). This might explain why some people is able to use Z-Wave secondary controller, yet I’m not able to (though the error is much less obvious).

    I do feel a bit conflicted on their approach to this matter, as this effectively breaks my smart home setup into two disconnected worlds: one with SmartThings and HomeAssistant that’s relatively well connected, and one with just ADT alarm system. Hopefully they’ll update their policies in the UK in the coming years, and we could use more competition in this space and someone should provide a solution that integrates with other smart home systems in the UK.

  • 部落格迁移到甲骨文云

    感觉这是重复每隔几年就要进行的练习,这一次把Blog从Amazon Lightsail VPS迁移到了甲骨文云(Oracle Cloud)的虚拟机。

    很多人白嫖甲骨文云(确实有非常丰厚的免费额度),我之前架设的Termux的APT镜像也是用的甲骨文的免费资源。但是最近发现免费账户基本allocate不到资源了,所以填了个信用卡升级到了Pay As You Go账户级别,突然就能allocate到VM了。虽然是付费账户,但只要还是在免费额度以内,并不会产生费用所以其实无所谓。

    甲骨文云的定价真的是白菜价(免费啊!),开了个四核24G内存的VM来作为我主要的VPS,其中一个用途就是用来跑这个博客(部落格)网站。促使我从Amazon Lightsail搬过来并不是因为我不想每个月掏那3.5美金(好吧,不只是),而是很快亚马逊要开始对公用的IPv4地址收取额外的费用。已经被亚马逊云收费恶心过一次了(给的CPU非常垃圾,超过的部分要额外收费,超得太过了还会pause导致前一段时间VPS无响应了一天)。一对比,甲骨文云的虚拟主机性能高出太多,还不要钱!

    吐槽完了,分享一下这次迁移的心得。

    1. 首先从原主机上做一个新的备份,把/var/www/整个目录都备份下来,然后MySQL或者MariaDB也做一个备份(这里至少需要备份wordpress这个table
    2. 把备份传到新主机上(用scp安全传输)
    3. 新主机依次安装配置好:
      • nginx
      • php-fpm
      • iptables (保证80和443端口开放)
      • mysql-server or mariadb-server (用和原主机一样的vendor,不然可能恢复备份的时候会有问题)
    4. 恢复wordpress到新主机的数据库里
    5. 恢复/var/www/,可能需要按新的nginx配置稍微改动权限或者nginx的配置文件

    一开始我在新VM安装配置的是MySQL,结果恢复备份的时候就有问题(database engine不一致,好像用了个MySQL没有或者是默认没有的引擎)。彻底删掉重新配置安装MariaDB就没事了。

    后来又遇到恢复的SQL用户没法登录的问题,好在这个简单,我删掉重新创建一个同名的用户(同样的密码)就OK了。

    我遇到的最大的问题,是wordpress本身没法运行,害得我要重新下载安装wordpress,不过可以继续用原来的数据库所以并没有丢失任何帖子或者评论,多媒体附件从之前的备份wp_content目录下拷贝过来修改好权限也没问题。就是插件都要重新安装配置,干脆就趁机轻装上阵少了几个插件,然后换了一套主题。

    另一个小问题是,因为IP地址变化,要在DNS那边改动,估计会导致有一段时间暂时无法访问。要申请新的SSL证书,LetsEncrypt也会要检查DNS记录,所以要稍微耐心一点。

    目前个人感觉网站访问速度比之前在亚马逊垃圾VPS要快一些。操作系统也从CentOS 7换成了Ubuntu 22.04,所以很多组件也随着升级了(PHP升级到8.1了!),也算是个bonus

  • 2021年度回顾

    很少写这类年度回顾/年末总结的文章,最近很多想法,就在这里乱写一通来告别2021吧。

    (more…)
  • NodeConf EU 2018與會有感

    上週有幸到鄰國愛爾蘭的Kilkenny郡參加本年度的NodeConf EU大會。會場選在風景宜人的蹩腳窩郊外,離都柏林機場有一個半小時的車程,不遠,就是estate都不在鎮上,所以每天倒也只能全身心灌注在大會和組織者安排的夜間活動上,倒也是個結交新朋好友的機會。

    (more…)

  • OK镜上眼大半年的体验

    Orthokerotology(Ortho-K,国内俗称“OK镜”)治疗,是用硬性角膜塑形镜对近视患者进行视力矫正的治疗方法。具体过程可以自行维基百科查阅,或者百度看各种医院广告

    (more…)

  • Moto 360二代(2015)入手体验

    懒癌晚期,加上公司政策的一些限制,没什么技术东西可写,只好拿买的电子产品滥竽充数凑一篇新博文。

    其实买了有两个多月了(懒癌啊,不想写),对Moto 360 2nd Gen还是比较满意的,虽然没有想象中那么好,而且价格居然比一代贵(而且在我买了两周后它可耻地降价促销了……)。但是,作为智能手表中颜值颇高,且有Android和Moto信仰加持,至少也要给个7.5/10的评分。

    (more…)

  • 联想YOGA 700-14ISK上手体验

    之前给我的联想老笔电(Z465A)买了块Kingmax的SSD,前段时间硬盘S.M.A.R.T.报警而且Linux日志开始出现I/O错误(连dnf update都会失败了……),Windows下任务管理器看硬盘一直是100%, 99%的读写。四年多的老笔记本了,也该换了。加上上个月末黑五促销,Currys的折扣还是很实惠的,于是以便宜了150镑的价格入手了联想YOGA 700 14英寸版(YOGA 700-14ISK)。配置还是可以的:

    • 英特尔i7-6500U 2.5GHz (Skylake,双核四线程,集成Intel HD Graphics 520 GPU)
    • 8G RAM (DDR3L 1600MHz)
    • 256G SSD
    • 2.4GHz + 5GHz WiFi
    • 蓝牙4.0
    • 14英寸1080P IPS多点触摸屏
    • 预装Windows 10 64位家庭版(附赠1个月的McAfee杀毒软件)

    (more…)

  • 关于ShadowsocksR和Shadowsocks的安全性

    前一段时间关于Shadowsocks的事情闹得沸沸扬扬的,最近显然大批小白已经被吸引到所谓的「Shadowsocks增强版」(ShadowsocksR)那边去了。作为用C++/Qt实现Shadowsocks业余开发者,打算对这两个炸子鸡简单地发表一下自己的看法。

    (more…)

  • 华硕Chromebook C201上手体验

    这款华硕的Chromebook就是上次一起发布的一大堆Chrome设备中的一款,而且是和国内海信、海尔的Chromebook使用相同的SoC(瑞芯微RK3288-C)。不过借助于品牌溢价和更成熟的笔记本制造历史,相同配置的C201比海信和海尔的要贵20美元。我买的这台是4G RAM版本,在美国亚马逊上淘的,199美元。价格很便宜,但是绝对不输那些用Atom的Chromebook,下面开始上手体验。

    (more…)

  • 都柏林大学圣三一学院年度考试感受

    今天刚刚参加我在都柏林大学圣三一学院(Trinity College Dublin, The University of Dublin,以下简称TCD)的第一堂年度考试(Annual Examination,就是期末考试,因为上半学年没有期末考试,所以一年只有一个月这样的考试,故名年度考试)。主要考场的纪律和安排比较有意思,和国内差别很大。

    (more…)