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

 找回密码
 立即注册
查看: 4476|回复: 4

[技术探讨] 关于sonoff模块自动打开的疑问????

[复制链接]

17

主题

335

帖子

2545

积分

金牌会员

Rank: 6Rank: 6

积分
2545
金钱
2210
HASS币
0
发表于 2019-9-14 11:46:40 | 显示全部楼层 |阅读模式
sonoff模块,控制电视开关以及测量弱电箱温度,但每次断网重连或者重启模块后模块继电器都会接通,导致电视动不动就打开,PowerOnState 是0;日志如下:
00:00:00 Project sonoff Sonoff Version 6.5.0(release-sonoff)-2_3_0
00:00:00 WIF: Connecting to AP2 chinanet in mode 11N as mytv...
00:00:07 WIF: Connected
00:00:07 HTP: Web server active on mytv with IP address 192.168.199.53
00:00:08 MQT: Attempting connection...
00:00:08 MQT: Connected
00:00:08 MQT: tele/mytv/LWT = Online (retained)
00:00:08 MQT: cmnd/mytv/POWER =
00:00:08 MQT: stat/mytv/RESULT = {"POWER":"OFF"}
00:00:08 MQT: stat/mytv/POWER = OFF
00:00:08 MQT: tele/mytv/INFO1 = {"Module":"Sonoff TH","Version":"6.5.0(release-sonoff)","FallbackTopic":"cmnd/DVES_41108B_fb/","GroupTopic":"sonoffs"}
00:00:08 MQT: tele/mytv/INFO2 = {"WebServerMode":"Admin","Hostname":"mytv","IPAddress":"192.168.199.53"}
00:00:08 MQT: tele/mytv/INFO3 = {"RestartReason":"Software/System restart"}
00:00:08 MQT: stat/mytv/RESULT = {"POWER":"OFF"}
00:00:08 MQT: stat/mytv/POWER = OFF
00:00:08 MQT: stat/mytv/RESULT = {"POWER":"ON"}
00:00:08 MQT: stat/mytv/POWER = ON
11:38:24 MQT: tele/mytv/STATE = {"Time":"2019-09-14T11:38:24","Uptime":"0T00:00:17","Vcc":3.186,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":2,"SSId":"chinanet","BSSId":"0C:9D:92:4A:7F:C0","Channel":9,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:07"}}
11:38:24 MQT: tele/mytv/SENSOR = {"Time":"2019-09-14T11:38:24","AM2301":{"Temperature":30.1,"Humidity":19.8},"TempUnit":"C"}


---------------------------
咋破,有大神知道不???
回复

使用道具 举报

6

主题

743

帖子

5956

积分

论坛元老

Rank: 8Rank: 8

积分
5956
金钱
5208
HASS币
20
发表于 2019-9-14 12:04:28 | 显示全部楼层
PowerOnState        Control relay state after powering up the device. More information
0 / OFF = keep relay(s) OFF after power up
1 / ON = turn relay(s) ON after power up
2 / TOGGLE = toggle relay(s) from last saved state
3 = switch relay(s) to their last saved state (default)
4 = turn relay(s) ON and disable further relay control
5 = after a PulseTime period turn relay(s) ON (acts as inverted PulseTime mode)


PowerOnState 3
回复

使用道具 举报

17

主题

335

帖子

2545

积分

金牌会员

Rank: 6Rank: 6

积分
2545
金钱
2210
HASS币
0
 楼主| 发表于 2019-9-14 12:07:55 | 显示全部楼层
mitu 发表于 2019-9-14 12:04
PowerOnState        Control relay state after powering up the device. More information
0 / OFF = keep relay ...

试过了,重启后还是打开的。。。。。
回复

使用道具 举报

2

主题

291

帖子

1530

积分

论坛积极会员

积分
1530
金钱
1239
HASS币
0
发表于 2019-9-15 13:52:23 | 显示全部楼层
不管你是 ON的时候断电重启 还是OFF的时候重启后都是ON么?

看日志是很奇怪的,没有指令就获取状态就获取了ON,
试一下这个PowerOnState 2

不行就再换个内核版本试试了。
回复

使用道具 举报

17

主题

335

帖子

2545

积分

金牌会员

Rank: 6Rank: 6

积分
2545
金钱
2210
HASS币
0
 楼主| 发表于 2019-9-18 22:00:07 | 显示全部楼层
还是找不到原因,直接esphome了
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 09:56 , Processed in 0.063245 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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