找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: 99010

(20160326)数码相框初步折腾

 火.. [复制链接]
发表于 2016-4-3 20:27 | 显示全部楼层
sehu 发表于 2016-4-1 11:47
获取天气数据的yahoo weather API接口变动,导致天气数据无法获取失败问题,最后,终于被我找到了最新的yah ...

请问哪里可以控制天气的更新频率?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-3 22:54 | 显示全部楼层
sehu 发表于 2016-3-31 18:37
楼主不好意思,今天拿你的.conf文件修改了一下竖屏的设置,这会分享一下!
效果如下

bakground.png 放在哪个位置???

点评

主贴的网盘里有对应的皮肤文件。修改conf里面的路径就可以使用。  详情 回复 发表于 2016-4-3 23:05
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-4-3 23:05 来自手机 | 显示全部楼层
pyj3451729 发表于 2016-4-3 22:54
bakground.png 放在哪个位置???

主贴的网盘里有对应的皮肤文件。修改conf里面的路径就可以使用。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-4 00:20 | 显示全部楼层
Collected errors:
* pkg_hash_fetch_best_installation_candidate: Packages for lcd4linux-dpf found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package lcd4linux-dpf.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-4 10:23 | 显示全部楼层
我也买了,在路上
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-4 12:23 | 显示全部楼层
天气能显示了,但是不能自动更新,怎么解决

点评

添加计划任务,1小时运行一次天气更新脚本(脚本的权限及保存路径请修改好)。 */60 * * * * sh /mnt/sdb1/lcd4linux/scripts/getweather >> /dev/null 2>&1  详情 回复 发表于 2016-4-4 12:38
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-4-4 12:38 来自手机 | 显示全部楼层
wangluowl 发表于 2016-4-4 12:23
天气能显示了,但是不能自动更新,怎么解决

添加计划任务,1小时运行一次天气更新脚本(脚本的权限及保存路径请修改好)。

*/60 * * * * sh /mnt/sdb1/lcd4linux/scripts/getweather >> /dev/null 2>&1

点评

直接加入/mnt/sdb1/lcd4linux/scripts/getweather是不是就可以了,前面那段和后面那段请教下是什么含义?小弟只接触过dos  详情 回复 发表于 2016-4-4 22:34
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-4 22:34 来自手机 | 显示全部楼层
99010 发表于 2016-4-4 12:38
添加计划任务,1小时运行一次天气更新脚本(脚本的权限及保存路径请修改好)。

*/60 * * * * sh /mnt/sd ...

直接加入/mnt/sdb1/lcd4linux/scripts/getweather是不是就可以了,前面那段和后面那段请教下是什么含义?小弟只接触过dos
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-5 08:19 | 显示全部楼层
期待2.4竖屏完美版本!!楼主加油
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-5 15:10 | 显示全部楼层
谢谢分享,不过个人认为天气貌似在这东西上实用性不是很强、
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-6 12:26 | 显示全部楼层
天气和API都更改了,没有任何变化。脚本还是有问题啊

点评

脚本里面有保存路径  详情 回复 发表于 2016-4-6 12:59
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-4-6 12:59 | 显示全部楼层
harryke 发表于 2016-4-6 12:26
天气和API都更改了,没有任何变化。脚本还是有问题啊

脚本里面有保存路径
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-7 08:29 | 显示全部楼层
天气改成这样,但/usr/share/lcd4linux/mytheme/data/weather里的数据始终还是以前的,无变化。如果清空数据,脚本也不能自动获取,要手动输入,才有显示。
wget -O /tmp/weather 'http://xml.weather.yahoo.com/forecastrss?w=2151334&u=c'
if [ $? = 0 ]; then
        cat /tmp/weather | grep '<yweather' | awk -F'"' 'BEGIN {C1=1;}{ \
                {if (substr($1, 11, 8)=="location") L1=$2} \
                {if (substr($1, 11, 4)=="wind") {L81=$2; L82=$4; L83=$6}} \
                {if (substr($1, 11, 10)=="atmosphere") { L91=$2; L92=$4; L93=$6; \
                {if($8=="0") L94="S"} {if($8=="1") L94="R"} {if($8=="2") L94="F"}}} \
                {if (substr($1, 11, 9)=="astronomy") {LA1=$2; LA2=$4}} \
                {if (substr($1, 11, 9)=="condition") {L2=$4; L3=$6"c"}} \
                {if (substr($1, 11, 8)=="forecast") {if (C1==1) {L4=$12;L5=$6"cdu"$8"c";C1=0} else {L6=$12;L7=$6"cdu"$8"c"}}}} \
                END \
                { while (length(L3) < 4) {L3="n"L3}; while (length(L5) < 10) {L5="n"L5}; while (length(L7) < 10) {L7="n"L7}; \
                i=index(LA1,":");Xss=substr(LA1,0,i) substr(LA1, i+1, 2); \
                i=index(LA2,":");Xse=substr(LA2,0,i) substr(LA2, i+1, 2);  \
                printf "%s\n%s\n%s\n%s\n%s\n%s\n%s\nChill.%s Dir.%s\042 %skm/h\nH.%s%% %skm %smb %s\nRise %s Set %s\n%s\n%s\n", \
                L1,L2,L3,L4,L5,L6,L7,L81,L82,L83,L91,L92,L93,L94,LA1,LA2,Xss,Xse}' \
                > /usr/share/lcd4linux/mytheme/data/weather
else
        exit $?
fi

exit 0

点评

你好,我手动执行脚本仍然不能获取数据,终端显示收不到数据,会是哪些问题呢? wget -O /tmp/weather 'http://xml.weather.yahoo.com/forecastrss?w=2137085&u=c' if [ $? = 0 ]; then cat /tmp/weather  详情 回复 发表于 2016-4-12 10:45
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-7 14:27 | 显示全部楼层
尝试中
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-7 19:54 | 显示全部楼层
这个能单独当个时钟用吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-28 20:31

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

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