『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: 27hh

[进阶教程] 闲置安卓手机安装HA变身智能家居中枢,及网关接入教程

  [复制链接]

3

主题

159

帖子

587

积分

高级会员

Rank: 4

积分
587
金钱
428
HASS币
0
发表于 2018-2-28 14:09:55 | 显示全部楼层
27hh 发表于 2018-2-28 00:42
我的华为手机(安卓4.1)没有这个问题,看看系统电源管理设置?

网上查了一下,是新版Android为了省电(我的是Android 6.0),在手机锁屏过程中禁止了接收 UDP Multicast。
除非有应用程序在锁屏过程中占用了MulticastLock锁,系统才给接收Multicast。

如果Linux Deploy支持占用MulticastLock锁就好了,要么得自己写程序占用它。
回复

使用道具 举报

0

主题

2

帖子

34

积分

新手上路

Rank: 1

积分
34
金钱
32
HASS币
0
发表于 2018-3-2 17:20:42 | 显示全部楼层
新手入门
回复

使用道具 举报

1

主题

59

帖子

239

积分

中级会员

Rank: 3Rank: 3

积分
239
金钱
180
HASS币
0
发表于 2018-3-2 21:34:20 来自手机 | 显示全部楼层
谢谢,试试这个,一直没成功
回复

使用道具 举报

0

主题

18

帖子

132

积分

注册会员

Rank: 2

积分
132
金钱
114
HASS币
0
发表于 2018-3-2 22:15:43 来自手机 | 显示全部楼层
纯小白,正好有一个破手机,试试看效果,练练手。
回复

使用道具 举报

1

主题

59

帖子

239

积分

中级会员

Rank: 3Rank: 3

积分
239
金钱
180
HASS币
0
发表于 2018-3-3 17:57:02 | 显示全部楼层
大神不知道为什么每次安装到这里都出现这个错误
(homeassistant) homeassistant@localhost:/home/android$ pip3 install -U homeassistant
Collecting homeassistant
  The repository located at mirrors.ustc.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.ustc.edu.cn'.
  Could not find a version that satisfies the requirement homeassistant (from versions: )
No matching distribution found for homeassistant
回复

使用道具 举报

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2018-3-3 22:39:21 | 显示全部楼层
aaax 发表于 2018-3-3 17:57
大神不知道为什么每次安装到这里都出现这个错误
(homeassistant) homeassistant@localhost:/home/android$  ...

If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.ustc.edu.cn'.
两种方法,一种是把换的那个源,前面改成https,另一种,在命令后面加上 --trusted-host mirrors.ustc.edu.cn 。
回复

使用道具 举报

2

主题

101

帖子

420

积分

中级会员

Rank: 3Rank: 3

积分
420
金钱
319
HASS币
0
发表于 2018-3-4 09:30:32 | 显示全部楼层
大神我按你说的方式连接小米网关,在HA里无法发现网关及子设备
~209FRTD5()DVLF11D~@EKK.png
用下面这种的写法在手机里的HA可以发现网关及子设备,但是无法控制,请教下,不知道是哪里出了问题?

O(ZCSR6%$EZJJ7)9Q_SKE11.png


回复

使用道具 举报

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2018-3-4 14:11:17 | 显示全部楼层
博藏轩 发表于 2018-3-4 09:30
大神我按你说的方式连接小米网关,在HA里无法发现网关及子设备

用下面这种的写法在手机里的HA可以发现网 ...

我帖子里是很久以前的写法,你的写法部分正确,mac地址冒号去掉试试。
回复

使用道具 举报

1

主题

59

帖子

239

积分

中级会员

Rank: 3Rank: 3

积分
239
金钱
180
HASS币
0
发表于 2018-3-4 22:11:40 | 显示全部楼层
27hh 发表于 2018-3-3 22:39
If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you ma ...

谢谢,这个问题终于解决了
但是添加完小米网关后,有一个开关设备总是没有找到
提示
2018-03-04 22:06:43 ERROR (Thread-8) [xiaomi_gateway] Unsupported device found! Please create an issue at https://github.com/Danielhiversen/PyXiaomiGateway/issues and provide the following data: {'data': '{"voltage":3600}', 'short_id': 50306, 'cmd': 'read_ack', 'sid': '158d0002118118', 'model': 'ctrl_ln2.aq1'}
这个是aqara双建开关零火版
回复

使用道具 举报

3

主题

159

帖子

587

积分

高级会员

Rank: 4

积分
587
金钱
428
HASS币
0
发表于 2018-3-4 22:29:38 | 显示全部楼层
不ROOT可以安装Linux Deploy吗?

我有一台歌华的4K机顶盒(Android系统的),已经通过 TTL 串口进入系统,在root下把 adbd 和 telnetd 都起来了,这样就很方便地用 adb 或 tellnet 以 root 身份进入更改系统文件了。

请问,能在 root 用户下用拷贝/修改文件的方式将 Linux Deploy 装上吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-3 12:08 , Processed in 0.062196 second(s), 39 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表