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

 找回密码
 立即注册
查看: 17131|回复: 30

[流程系列] 使用IOS系统homekit自带遥控控制电视

[复制链接]

31

主题

531

帖子

2463

积分

金牌会员

Rank: 6Rank: 6

积分
2463
金钱
1927
HASS币
20
发表于 2021-7-22 16:03:03 | 显示全部楼层 |阅读模式
本帖最后由 dinglifeng 于 2021-7-22 20:37 编辑

自从用了HA,家里各种遥控器都闲置了下来,着急用的时候又没电池,没办法只能想办法把它尽量放到手机里一起控制了

遥控学码就不用赘述了吧,我用的RM4 pro,各位客官用啥都可以,反正就是学习红外吗呗,教程一大堆。
开关状态反馈的话我用的aqara的插头,zigbee协议,各位用啥都行,没有或者不需要的话,把状态反馈的流删掉就可以了(“Samsung TV Status”和“转换”两个删掉)Homekit添加码默认都是1,有特殊需求的自己修改一下

流放下面了,各位自取吧,把所有节点点开确认一下需要修改的内容,特别是蓝色的部分。

IMG_3664.PNG

截屏2021-07-22 下午3.55.37.png 试试文件方式
samsung_tv_homekit.json.zip (6.72 KB, 下载次数: 312)

[{"id":"8fb2612e.4eb98","type":"tab","label":"Samsung Television","disabled":false,"info":""},{"id":"a9e569de.eb508","type":"inject","z":"8fb2612e.4eb98","name":"TV on","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{"Active":1}","payloadType":"json","x":210,"y":220,"wires":[["93bc492d.3d6848"]]},{"id":"250f61e5.cdbe8e","type":"inject","z":"8fb2612e.4eb98","name":"TV off","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{"Active":0}","payloadType":"json","x":210,"y":260,"wires":[["93bc492d.3d6848"]]},{"id":"db46bcc.eec00c","type":"debug","z":"8fb2612e.4eb98","name":"State and source output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":970,"y":60,"wires":[]},{"id":"d01e0a4e.49da68","type":"debug","z":"8fb2612e.4eb98","name":"Volume output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":680,"y":580,"wires":[]},{"id":"26b7c791.d278","type":"inject","z":"8fb2612e.4eb98","name":"TV Setup","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":true,"onceDelay":"5","topic":"","payload":"","payloadType":"date","x":220,"y":160,"wires":[["404e9088.92a208"]]},{"id":"404e9088.92a208","type":"function","z":"8fb2612e.4eb98","name":"Setup TV","func":"var name = "Samsung TV";\n\nmsg.payload = {\n "ConfiguredName": name,\n "ActiveIdentifier" : 0,\n "SleepDiscoveryMode" : 0,\n "Active" : 0\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":160,"wires":[["93bc492d.3d6848"]]},{"id":"93bc492d.3d6848","type":"homekit-service","z":"8fb2612e.4eb98","isParent":true,"hostType":"0","bridge":"f6a4260d.7e51e","accessoryId":"","parentService":"","name":"Samsung TV","serviceName":"Television","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","softwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{    "RemoteKey":null}","waitForSetupMsg":false,"outputs":2,"x":610,"y":220,"wires":[["9db07332.5cc9"],["91845793.afa5a8"]]},{"id":"983c3244.9dfbe8","type":"homekit-service","z":"8fb2612e.4eb98","isParent":false,"bridge":"f6a4260d.7e51e","parentService":"93bc492d.3d6848","name":"Television Speaker","serviceName":"TelevisionSpeaker","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","softwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{"VolumeControlType":1,"VolumeSelector":true,"Mute":true}","waitForSetupMsg":false,"outputs":2,"x":450,"y":500,"wires":[[],["d01e0a4e.49da68","9d9db8f5.590a38"]]},{"id":"a033f0fd.75fb1","type":"inject","z":"8fb2612e.4eb98","name":"find out what Characteristics","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{"foo":"bar"}","payloadType":"json","x":180,"y":500,"wires":[["983c3244.9dfbe8"]]},{"id":"9d9343d8.f8148","type":"api-call-service","z":"8fb2612e.4eb98","name":"Samsung TV On/Off","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.samsung_tv_power","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":160,"wires":[[]]},{"id":"9db07332.5cc9","type":"switch","z":"8fb2612e.4eb98","name":"Active","property":"payload.Active","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":160,"wires":[["9d9343d8.f8148"],["9d9343d8.f8148"]]},{"id":"9d9db8f5.590a38","type":"switch","z":"8fb2612e.4eb98","name":"Volume","property":"payload.VolumeSelector","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":680,"y":520,"wires":[["57842ca0.f84424"],["86d96e5c.ecda1"]]},{"id":"57842ca0.f84424","type":"api-call-service","z":"8fb2612e.4eb98","name":"Volume Increase","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_volume_increase","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":520,"wires":[[]]},{"id":"86d96e5c.ecda1","type":"api-call-service","z":"8fb2612e.4eb98","name":"Volume decrease","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_volume_decrease","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":930,"y":580,"wires":[[]]},{"id":"91845793.afa5a8","type":"switch","z":"8fb2612e.4eb98","name":"RemoteKey","property":"payload.RemoteKey","propertyType":"msg","rules":[{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"11","vt":"str"},{"t":"eq","v":"15","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":830,"y":320,"wires":[["db0f9ab2.0cda"],["1bb1a7a8.399bc8"],["e5bfde90.179dd"],["678f4b12.2af0f4"],["3567981c.0d8ef8"],["9acf0762.fe7d98"],["485bd21e.b06724"],[]]},{"id":"e5bfde90.179dd","type":"api-call-service","z":"8fb2612e.4eb98","name":"TV_ARROW_LEFT","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_arrow_left","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1230,"y":340,"wires":[[]]},{"id":"678f4b12.2af0f4","type":"api-call-service","z":"8fb2612e.4eb98","name":"TV_ARROW_RIGHT","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_arrow_right","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1240,"y":400,"wires":[[]]},{"id":"3567981c.0d8ef8","type":"api-call-service","z":"8fb2612e.4eb98","name":"TV_SELECT","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_ok","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":460,"wires":[[]]},{"id":"9acf0762.fe7d98","type":"api-call-service","z":"8fb2612e.4eb98","name":"TV_BACK","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_back","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":520,"wires":[[]]},{"id":"d94aaf52.cf903","type":"change","z":"8fb2612e.4eb98","name":"转换","rules":[{"t":"change","p":"topic","pt":"msg","from":"switch.samsung_tv_power","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"{"Active":1}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"{"Active":0}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":100,"wires":[["93bc492d.3d6848","db46bcc.eec00c"]]},{"id":"a7949ec4.c9316","type":"server-state-changed","z":"8fb2612e.4eb98","name":"Samsung TV status","server":"d06297cb.c4f038","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.samsung_tv_power","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":80,"wires":[["d94aaf52.cf903"]]},{"id":"db0f9ab2.0cda","type":"api-call-service","z":"8fb2612e.4eb98","name":"TV_ARROW_up","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_arrow_up","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1220,"y":220,"wires":[[]]},{"id":"1bb1a7a8.399bc8","type":"api-call-service","z":"8fb2612e.4eb98","name":"TV_ARROW_down","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_arrow_down","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1230,"y":280,"wires":[[]]},{"id":"485bd21e.b06724","type":"api-call-service","z":"8fb2612e.4eb98","name":"TV_home","server":"d06297cb.c4f038","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.samsung_home","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":580,"wires":[[]]},{"id":"f6a4260d.7e51e","type":"homekit-bridge","bridgeName":"Television Bridge","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","softwareRev":"","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":false},{"id":"d06297cb.c4f038","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]






评分

参与人数 1金钱 +20 收起 理由
+ 20 厉害了word楼主!

查看全部评分

回复

使用道具 举报

22

主题

414

帖子

2255

积分

金牌会员

Rank: 6Rank: 6

积分
2255
金钱
1841
HASS币
30
发表于 2021-7-22 16:35:38 | 显示全部楼层
本帖最后由 Tao173 于 2021-7-22 16:38 编辑

但是导入不了,重新传一下?
你有所不知,小米设备带屏幕都是为了后期广告投送的。
灵长类退散
回复

使用道具 举报

16

主题

331

帖子

2408

积分

金牌会员

Rank: 6Rank: 6

积分
2408
金钱
2077
HASS币
0
发表于 2021-7-22 20:18:53 来自手机 | 显示全部楼层
……多谢分享
回复

使用道具 举报

31

主题

531

帖子

2463

积分

金牌会员

Rank: 6Rank: 6

积分
2463
金钱
1927
HASS币
20
 楼主| 发表于 2021-7-22 20:31:27 | 显示全部楼层
本帖最后由 dinglifeng 于 2021-7-22 20:39 编辑
Tao173 发表于 2021-7-22 16:35
棒但是导入不了,重新传一下?

用工具校验一下,我自己导入倒是正常。。。。。用附件文件试试看
回复

使用道具 举报

33

主题

2196

帖子

5838

积分

论坛元老

Rank: 8Rank: 8

积分
5838
金钱
3642
HASS币
60
QQ
发表于 2021-7-23 00:22:20 | 显示全部楼层
谢谢分享。
我不生产技术,我只是技术的搬运工。
回复

使用道具 举报

16

主题

331

帖子

2408

积分

金牌会员

Rank: 6Rank: 6

积分
2408
金钱
2077
HASS币
0
发表于 2021-7-23 06:46:44 来自手机 | 显示全部楼层
输入源那块怎么加入哈?
回复

使用道具 举报

0

主题

11

帖子

58

积分

注册会员

Rank: 2

积分
58
金钱
47
HASS币
0
发表于 2021-7-27 16:17:19 | 显示全部楼层
学习了,看看怎么弄
回复

使用道具 举报

7

主题

227

帖子

2258

积分

论坛积极会员

积分
2258
金钱
2031
HASS币
0
发表于 2021-7-27 21:44:44 | 显示全部楼层
状态反馈和控制完全可以使用API QQ截图20210727214334.jpg


回复

使用道具 举报

1

主题

28

帖子

209

积分

中级会员

Rank: 3Rank: 3

积分
209
金钱
181
HASS币
0
发表于 2021-7-30 10:56:47 | 显示全部楼层
只有暂停键有反应,显示remotekey=11怎么办呢?
回复

使用道具 举报

31

主题

531

帖子

2463

积分

金牌会员

Rank: 6Rank: 6

积分
2463
金钱
1927
HASS币
20
 楼主| 发表于 2021-7-30 12:57:01 | 显示全部楼层
Always_67 发表于 2021-7-30 10:56
只有暂停键有反应,显示remotekey=11怎么办呢?

11 链接的后面的流是啥?
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-21 19:04 , Processed in 0.554129 second(s), 36 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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