这个小脚本(守护进程)将轮询max-cube系统已知的所有窗口传感器的状态,并检查打开的窗口

maxwindownotif的Python项目详细描述


这个小脚本(守护进程)将轮询所有窗口的状态 max-cube系统(http://www.eq-3.de)已知的传感器,并检查 打开窗户。

然后它会使用 打开天气图(http://openweathermap.org),如果温度是 在低于指定阈值时,它将使用 通知程序插件。

现在唯一可用的通知插件是使用pushover服务 (https://pushover.net)向移动电话发送通知。

它是通过提醒你关闭你的 通风后的窗户。

安装

可以使用pip安装max open window notifier

sudo pip install maxwindownotify

使用量

您可以使用cli help函数获取有关如何启动 守护进程,以及可用的选项:

$ maxwindownotify --help
usage: maxwindownotify.py [-h][-i INTERVAL][-n NETWORK][-c CITY][-t THRESHOLD] -k OWMAPPID [-s][-u USER][-p TOKEN][-v]

This deamon polls the MAX Cube for all window status. If a window is open
longer than twice the poll interval a notification will be sent using the
notifier plugin

optional arguments:
  -h, --help            show this help message and exit
  -i INTERVAL, --interval INTERVAL
                        polling interval in minutes (default 30 minutes)
  -n NETWORK, --network NETWORK
                        Network Address to send search broadcast for MAX Cube
                        (default 192.168.178.0/24)
  -c CITY, --city CITY  the city name or code in OpenWeatherMap to retrieve
                        the outside temperature from (default Munich, Germany)
  -t THRESHOLD, --threshold THRESHOLD
                        the temperature threshold for suppressing
                        notifications (default: 12C)
  -k OWMAPPID, --owmappid OWMAPPID
                        the API Key (APPID) to authenticate with Open Weather
                        Map
  -s, --simulation      randomly simulate open windows
  -u USER, --user USER  the username (or user key) used for the notifier
                        module
  -p TOKEN, --token TOKEN
                        the password (or app token) used for the notifier
                        module
  -v, --verbose         increase output verbosity

As an alternative to the commandline, params can be placed in a file, one per
line, and specified on the commandline like 'maxwindownotify.py @params.conf'.

示例:

maxwindownotify -k 82k4v1b99s41212e5bf5490432bb89f4 -u abcCKnM9uYhjng3kLV6czGFUsmZ76D -p ahxYZcjhXT6P5zDt265LGyuLVaDQNx -i 15 -c Berlin -t 8

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何从tester类访问/更改ArrayList?   java如何在Android中以编程方式更改菜单标题   spring boot在Kafka Java中为同一主题创建多个消费者组   java JVM字节码表示法,注释语法。调用动力学   java活动在旋转后泄漏了窗口PopupWindow   java允许Nashorn运行用户代码   Java Joda Time实现一个日期范围迭代器   当字符串长度为奇数时使用递归打印字符串的java基本情况   java无法从JSONArray获取JSONObject   java有没有一种方法可以使用单个示例文件进行所有测试?   java My bufferedReader读取整个文件,而不仅仅是一行。为什么?   当已有用户输入时,java变量为null   java如何将正则表达式与阿拉伯语文本一起使用   java Selenium WebDriver“单击”和JavascriptExecutor单击之间有什么区别   java在运行代码时,排序方法会在第二个数组应该按升序或降序排序时打印相同的精确数组号   java如何在HashMap中添加多个具有相同键的相同类型的对象   java有人知道为什么菜单栏在使用系统gtk主题时会显示白色文本吗?   在tomcat中用java方法访问JavaScript文件