【原创】彩云/和风天气插件
【原创】彩云/和风天气插件
支持彩云天气,和风天气,需要注册开发者账号之后添加apikey之后才能使用。
彩云天气:https://open.caiyunapp.com/
和风天气:https://dev.heweather.com/
支持信息:
Temperature - 当前温度
Feeling Temperature - 当前体感温度
Humidity - 湿度
Pressure - 气压
PM25 - 当前PM25浓度
PM10 - 当前PM10浓度
SO2 - 当前PSO2浓度
Weather forecast(Today) - 今天天气
Weather forecast(Tomorrow) - 明天天气
等等
安装方法:
下载zip之后解压缩,放入Domoticz/plugins目录下,重启服务端。去网页端添加硬件即可。
切换到插件目录下,git clone https://github.com/obaby/baby_weather_plugin 重启服务端。去网页端添加硬件即可
添加硬件截图:
device 终端运行效果:
console 数据信息:
weather wind temp home 项目依赖:
requests
pip3 install requests
下载链接:
https://github.com/obaby/baby_weather_plugin
彩云天气:https://open.caiyunapp.com/
和风天气:https://dev.heweather.com/
支持信息:
Temperature - 当前温度
Feeling Temperature - 当前体感温度
Humidity - 湿度
Pressure - 气压
PM25 - 当前PM25浓度
PM10 - 当前PM10浓度
SO2 - 当前PSO2浓度
Weather forecast(Today) - 今天天气
Weather forecast(Tomorrow) - 明天天气
等等
安装方法:
下载zip之后解压缩,放入Domoticz/plugins目录下,重启服务端。去网页端添加硬件即可。
切换到插件目录下,git clone https://github.com/obaby/baby_weather_plugin 重启服务端。去网页端添加硬件即可
添加硬件截图:
device 终端运行效果:
console 数据信息:
weather wind temp home 项目依赖:
requests
pip3 install requests
下载链接:
https://github.com/obaby/baby_weather_plugin
Re: 【原创】彩云/和风天气插件
实时天气1 hardware (4) thread seems to have ended unexp 请问终端显示是这样是哪里问题?
Re: 【原创】彩云/和风天气插件
看意思是异常终止了,有详细日志么?
Re: 【原创】彩云/和风天气插件
2020-10-19 18:05:57.553 Error: (BabyWeatherPlugin) failed to load 'plugin.py', Python Path used was '/src/domoticz/plugins/baby_weather_plugin/:/usr/lib/python35.zip:/usr/lib/python3.5/:/usr/lib/python3.5/plat-x86_64-linux-gnu:/usr/lib/python3.5/lib-dynload'.
2020-10-19 18:05:57.556 Error: (实时天气1) Module Import failed, exception: 'ImportError'
2020-10-19 18:05:57.557 Error: (实时天气1) Module Import failed: ' Name: requests'
2020-10-19 18:06:12.210 AccuWeather Worker stopped...
2020-10-19 18:06:58.100 EventSystem: reset all device statuses...
2020-10-19 18:07:00.943 Error: 实时天气1 hardware (4) thread seems to have ended unexpectedly
2020-10-19 18:05:57.556 Error: (实时天气1) Module Import failed, exception: 'ImportError'
2020-10-19 18:05:57.557 Error: (实时天气1) Module Import failed: ' Name: requests'
2020-10-19 18:06:12.210 AccuWeather Worker stopped...
2020-10-19 18:06:58.100 EventSystem: reset all device statuses...
2020-10-19 18:07:00.943 Error: 实时天气1 hardware (4) thread seems to have ended unexpectedly
Re: 【原创】彩云/和风天气插件
需要安装requests库peter58 写了: ↑周一 10月 19, 2020 18:08 2020-10-19 18:05:57.553 Error: (BabyWeatherPlugin) failed to load 'plugin.py', Python Path used was '/src/domoticz/plugins/baby_weather_plugin/:/usr/lib/python35.zip:/usr/lib/python3.5/:/usr/lib/python3.5/plat-x86_64-linux-gnu:/usr/lib/python3.5/lib-dynload'.
2020-10-19 18:05:57.556 Error: (实时天气1) Module Import failed, exception: 'ImportError'
2020-10-19 18:05:57.557 Error: (实时天气1) Module Import failed: ' Name: requests'
2020-10-19 18:06:12.210 AccuWeather Worker stopped...
2020-10-19 18:06:58.100 EventSystem: reset all device statuses...
2020-10-19 18:07:00.943 Error: 实时天气1 hardware (4) thread seems to have ended unexpectedly
打开终端
执行pip3 install requests
然后再运行试试~~
Re: 【原创】彩云/和风天气插件
谢谢!我是装在黑群晖上的,终端是在DT27的终端上运行pip3 install requests這个吗?还是在群晖的终端上运行呢?第一次用不很懂,谢谢!
Re: 【原创】彩云/和风天气插件
pip3 install requests 群晖上执行不起,能给个完整的安装步骤吗?谢谢!!!
Re: 【原创】彩云/和风天气插件
https://loudtell.com/archives/synology-opens-ssh.html
在群晖上执行,按照上面的方法开启ssh,用自己的账号密码登录,登录后在ssh中执行。
在群晖上执行,按照上面的方法开启ssh,用自己的账号密码登录,登录后在ssh中执行。
Re: 【原创】彩云/和风天气插件
equests安装方法 sudo -i 进入超级用户在执行以下命令
[root@bb ~]# wget https://pypi.python.org/packages/source ... c11.tar.gz
[root@bb ~]# wget -q http://peak.telecommunity.com/dist/ez_setup.py
[root@bb ~]# python ez_setup.py
[root@bb ~]# wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz
[root@bb ~]# tar -xvzf 1.5.5.tar.gz
[root@bb ~]# cd pip-1.5.5/
[root@bb pip-1.5.5]# python setup.py install
[root@bb pip-1.5.5]# pip install requests
执行这步 python setup.py install报错
Extracting pip-1.5.5-py2.7.egg to /usr/lib/python2.7/site-packages
pip 1.5.5 is already the active version in easy-install.pth
Installing pip script to /usr/bin
error: [Errno 2] No such file or directory: '/usr/bin/pip'
就没办法执行pip install requests 不知道怎么起的?
群晖DS918+ DSM6.2.1-23824版本
[root@bb ~]# wget https://pypi.python.org/packages/source ... c11.tar.gz
[root@bb ~]# wget -q http://peak.telecommunity.com/dist/ez_setup.py
[root@bb ~]# python ez_setup.py
[root@bb ~]# wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz
[root@bb ~]# tar -xvzf 1.5.5.tar.gz
[root@bb ~]# cd pip-1.5.5/
[root@bb pip-1.5.5]# python setup.py install
[root@bb pip-1.5.5]# pip install requests
执行这步 python setup.py install报错
Extracting pip-1.5.5-py2.7.egg to /usr/lib/python2.7/site-packages
pip 1.5.5 is already the active version in easy-install.pth
Installing pip script to /usr/bin
error: [Errno 2] No such file or directory: '/usr/bin/pip'
就没办法执行pip install requests 不知道怎么起的?
群晖DS918+ DSM6.2.1-23824版本
Re: 【原创】彩云/和风天气插件
不好意思,用pip3也一样,是在root@里只打pip3 install requests一个命令吗?
root@QH_hassio:~# pip3 install requests
-ash: pip3: command not found
root@QH_hassio:~# pip3 install requests
-ash: pip3: command not found
Re: 【原创】彩云/和风天气插件
看你的domoticz用的python3,所以这个也要在python3下安装。你的python3路径看前面的回复是/usr/lib/python3.5/
你看下/usr/lib/python3.5/bin 目录下有没有pip3.
ls /usr/lib/python3.5/bin
如果没有执行下which python3,看下Python的具体路径,然后看对应路径下有没有pip3. 如果没有通过下面的命令安装pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
然后尝试执行pip3 install。如果不行,把上面的命令的全不log贴到下面回复下。
Re: 【原创】彩云/和风天气插件
首先谢谢!不知道是不是这样安装。
-----------------安装情况--------------------
root@QH_hassio:~# ls /usr/lib/python3.5/bin
ls: cannot access /usr/lib/python3.5/bin: No such file or directory
root@QH_hassio:~# which python3
/usr/local/bin/python3
root@QH_hassio:~# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1842k 100 1842k 0 0 3879 0 0:08:06 0:08:06 --:--:-- 8507
root@QH_hassio:~# python3 get-pip.py
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting pip
Using cached pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.4
Uninstalling pip-20.2.4:
Successfully uninstalled pip-20.2.4
WARNING: The scripts pip, pip3 and pip3.5 are installed in '/volume2/@appstore/py3k/usr/local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.2.4
root@QH_hassio:~# pip3 install
-ash: pip3: command not found
root@QH_hassio:~# pip3 install requests
-ash: pip3: command not found
-----------------安装情况--------------------
root@QH_hassio:~# ls /usr/lib/python3.5/bin
ls: cannot access /usr/lib/python3.5/bin: No such file or directory
root@QH_hassio:~# which python3
/usr/local/bin/python3
root@QH_hassio:~# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1842k 100 1842k 0 0 3879 0 0:08:06 0:08:06 --:--:-- 8507
root@QH_hassio:~# python3 get-pip.py
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting pip
Using cached pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.4
Uninstalling pip-20.2.4:
Successfully uninstalled pip-20.2.4
WARNING: The scripts pip, pip3 and pip3.5 are installed in '/volume2/@appstore/py3k/usr/local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.2.4
root@QH_hassio:~# pip3 install
-ash: pip3: command not found
root@QH_hassio:~# pip3 install requests
-ash: pip3: command not found
Re: 【原创】彩云/和风天气插件
你的pip3安装到了/volume2/@appstore/py3k/usr/local/bin
这个路径没有添加到path下.
执行以下命令安装:
cd /volume2/@appstore/py3k/usr/local/bin
pip3 install requests
这个路径没有添加到path下.
执行以下命令安装:
cd /volume2/@appstore/py3k/usr/local/bin
pip3 install requests
Re: 【原创】彩云/和风天气插件
都不好意思问了,还是不行;這个怎么这样麻烦,安装ASSIO都没這个难,好久没玩這个,這几天没事才又来学习下。
admin@QH_hassio:~$ sudo su -
root@QH_hassio:~# cd /volume2/@appstore/py3k/usr/local/bin
root@QH_hassio:/volume2/@appstore/py3k/usr/local/bin# pip3 install requests
-ash: pip3: command not found
root@QH_hassio:/volume2/@appstore/py3k/usr/local/bin#
admin@QH_hassio:~$ sudo su -
root@QH_hassio:~# cd /volume2/@appstore/py3k/usr/local/bin
root@QH_hassio:/volume2/@appstore/py3k/usr/local/bin# pip3 install requests
-ash: pip3: command not found
root@QH_hassio:/volume2/@appstore/py3k/usr/local/bin#
上次由 peter58 在 周三 10月 21, 2020 07:58,总共编辑 1 次。
Re: 【原创】彩云/和风天气插件
我都想给你远程协助了,
Re: 【原创】彩云/和风天气插件
我试了以下,群会的nas的bash比较坑,即使切换到安装目录下依然提示找不到命令:
cd /volume2/@appstore/py3k/usr/local/bin
./pip3 install requests
相关文章,我大概写了下:https://wp.me/pbtmY7-20k
cd /volume2/@appstore/py3k/usr/local/bin
./pip3 install requests
相关文章,我大概写了下:https://wp.me/pbtmY7-20k
Re: 【原创】彩云/和风天气插件
oot@QH_hassio:~# cd /volume2/@appstore/py3k/usr/local/bin
root@QH_hassio:/volume2/@appstore/py3k/usr/local/bin# ./pip3 install requests
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Requirement already satisfied: requests in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (2.24.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (1.25.11)
Requirement already satisfied: certifi>=2017.4.17 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (3.0.4)
谢谢你一直耐心的解答,是不是安装成功了?
root@QH_hassio:/volume2/@appstore/py3k/usr/local/bin# ./pip3 install requests
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Requirement already satisfied: requests in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (2.24.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (1.25.11)
Requirement already satisfied: certifi>=2017.4.17 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /volume2/@appstore/py3k/usr/local/lib/python3.5/site-packages (from requests) (3.0.4)
谢谢你一直耐心的解答,是不是安装成功了?