VMx

vmx.im
啥都学一点的填坑人
  1. 首页
  2. crestron
  3. 正文

快思聪控制电脑关机及自定义运行小应用

2021年9月13日 751点热度 0人点赞 0条评论

使用原理 快思聪使用TCP Client进行HTTP GET访问小应用,小应用对URL进行解析,然后实现关机,休眠,运行指定程序等功能。

remoteshutdown

该项目是一个 Windows 应用程序,它提供了使用 HTTP GET 请求关闭、暂停、休眠 PC 、关闭屏幕或自定义运行的功能。

该应用程序位于系统托盘区域,您也可以在其中触发自定义命令关闭。

该程序具有以下设置:

  • 在 Windows 启动时加载程序
  • 安全码
  • 系统托盘菜单定制
  • 自定义端口号
  • diycomm使用同目录下面的diy.bat文件,你可以在bat文件中进行定制你需要运行的程序。


    远程请求示例:

默认会运行你设置中指定的应用。
http://remote-host-name:5001/

无安全码,默认命令
http://remote-host-name:5001/secret/

无安全码自定义命令:
http://remote-host-name:5001/secret/hibernate
http://remote-host-name:5001/secret/shutdown
http://remote-host-name:5001/secret/suspend
http://remote-host-name:5001/secret/diycomm

当设置了安全码后,将secret 替换为你的安全码即可。

crestron 快思聪设置

  • 新建一个你需要运行remoteshutdown程序的 tcp/ip client,并将IP改成你主机的名字
  • 添加httpapi 自定义组件,并设置如下:

    简单介绍,名字可自定义,此时我只是举例说明:
    port:对应你remoteshutdown 的PORT
    http_conn:必连,测试发现必须为“1”,才正常,不然码对也没用。
    http_tx:发送通道,必填
    http_status: 重试5次无效会关闭发送,正常3次即完成。(估计是对应的http 三次握手)
    http_code$:常用格式为:GET / HTTP/1.0\nHost: 192.168.22.48\n\n,如 http://www.sina.com/weibo/index.html 可写成:GET /weibo/index.html HTTP/1.0\nHost: www.sina.com\n\n
    http_get:为按键响应

下载地址:
快思聪http文件:
http://f.vmx.im/soft/http_test.rar
remoteshutdown
http://f.vmx.im/soft/remoteshutdown.rar
参考网址:https://crestrontutorials.blogspot.com/2006/06/requesting-content-from-web-page.html
https://github.com/karpach/remote-shutdown-pc

Post Views: 399
标签: crestron 关机,程序开发 快思聪
最后更新:2023年5月16日

huifei

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2021 vmx.im. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang