python cli和web切换器,用于使用433MHz射频发射器的etekcity电源插座
pyoutlet的Python项目详细描述
**pyoutlet**
==
python cli&;用于ETEKCITY电源插座的Web切换器,使用433MHz射频
——**cli**实用程序和一个最小的**flask webapp**带有开/关按钮和一个配置编辑器。
-安装就像“pip install pyoutlet”
-cli用法:
“switch off label_switch_5`
“switch on 4`
打开开关“4”->;发送代码:4529411。引脚:0。脉冲长度:185
`switch--info`
**pyoutlet json config-in“/path/to/pyoutlet/codes_outlets.json”
--gt;*1->;开:4527411,关:4527420
*2->;开:4527555,关:4527564
*3->;开:4527875,关:4527884
*4->;on:4529411,off:4529420
*label_switch_5->;on:4535555,off:4535564
-outlet代码保存(并标记)在“pyoutlet”模块内的json文件中,如下所示:
{
“pulse廑length”:185,
“outlets”:
[
{
“on”:4527411,
“off”:45274242,
“标签”:“1”
>>,
{
“on”:4527555,
“off”:4527564,
“label”:“2”
},
{{
“on”:4527875,
“off”:4527884,
“label”:“3”
},
{“on”:4529411,
“off”:4529420,
“label”:“1”
/>,
“on”:4529411,
“off”:4529420,
“on”:4529420,
“on”:4529420,
“label”:“on”:45275},
{
“开”:4535555,
“off”:4535564,
“label”:“label_switch_5”
}
]
}
-一些屏幕截图:
<;table>;
<;td colspan=“2”>;
outlets control page
<;td>;
<;tr>;
<;td>;![控制页](https://raw.githubusercontent.com/azogue/pyoutlet/master/docs/control_page.png)<;/td>;
<;td>;![控制页](https://raw.githubusercontent.com/azogue/pyoutlet/master/docs/control_-page_xs.png)<;/td>;
<;/tr>;
<;/table>;
<;br>;
<;table>;
<;td colspan=“2”>;
outlets配置编辑器
<;/td>;
<;tr>;
<;td>;![配置编辑器-编辑JSON配置](https://raw.githubusercontent.com/azogue/pyoutlet/master/docs/edit_page_manual_editor.png)<;/td>;
<;td>;![配置编辑器-查看JSON配置](https://raw.githubusercontent.com/azogue/pyoutlet/master/docs/edit_page_view.png)<;/td>;
<;/tr>;
<;tr>;
<;td>;![配置编辑器-上载JSON配置](https://raw.githubusercontent.com/azogue/pyoutlet/master/docs/edit_page_upload.png)<;/td>;
<;td>;![配置编辑器-HomeBridge配置](https://raw.githubusercontent.com/azogue/pyoutlet/master/docs/edit_page_homebridge_conf.png)<;/td>;
<;/tr>;
<;/table>;