Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
### #84 get video frameconn_.Reconnect()auth_s=device_.devdata_[114]+":"+device_.devdata_[115]auth_a=Array.new;auth_s.each{|c| auth_a.push(c)}fix_path=device_.devdata_[2];fix_path='/'+fix_path if(fix_path[0]!='/'[0]);s = "GET "+fix_path+" HTTP/1.0\r\n"s+= "Accept: */*\r\n"s+= "Authorization: Basic "+auth_a.pack("m").chop+"\r\n"s+= "\r\n"conn_.Send(s)recv=""while(true) buff=conn_.Recv(16384, 5000) if(buff.length() == 0) break end recv = recv + buffendif (recv=~ /^HTTP[^\r\n]+200\sOK.+?\r\n\r\n(.+)$/m) fileName="/tmp/ip_camera_img"+device_.devid_.to_s imageFile=File.new(fileName+".jpg",'w') imageFile.print $1 imageFile.close() system("/usr/bin/convert "+fileName+".jpg "+fileName+".png"); size=File.stat(fileName+".png").size imageFile=File.new(fileName+".png",'r') img = imageFile.read(size); imageFile.close() data_set(img) format_set('png')end### #350 Process Incoming Dataconn_.Close()### #200 Move Upconn_.Reconnect()auth_s=device_.devdata_[114]+":"+device_.devdata_[115]auth_a=Array.new;auth_s.each{|c| auth_a.push(c)}s = "GET /decoder_control.cgi?command=0&onestep=1 HTTP/1.0\r\n"s+= "Accept: */*\r\n"s+= "Authorization: Basic "+auth_a.pack("m").chop+"\r\n"s+= "\r\n"conn_.Send(s)recv=""while(true) buff=conn_.Recv(256, 5000) if(buff.length() == 0) break end recv = recv + buffend### #201 Move Downconn_.Reconnect()auth_s=device_.devdata_[114]+":"+device_.devdata_[115]auth_a=Array.new;auth_s.each{|c| auth_a.push(c)}s = "GET /decoder_control.cgi?command=2&onestep=1 HTTP/1.0\r\n"s+= "Accept: */*\r\n"s+= "Authorization: Basic "+auth_a.pack("m").chop+"\r\n"s+= "\r\n"conn_.Send(s)recv=""while(true) buff=conn_.Recv(256, 5000) if(buff.length() == 0) break end recv = recv + buffend### #202 Move Leftconn_.Reconnect()auth_s=device_.devdata_[114]+":"+device_.devdata_[115]auth_a=Array.new;auth_s.each{|c| auth_a.push(c)}s = "GET /decoder_control.cgi?command=4&onestep=1 HTTP/1.0\r\n"s+= "Accept: */*\r\n"s+= "Authorization: Basic "+auth_a.pack("m").chop+"\r\n"s+= "\r\n"conn_.Send(s)recv=""while(true) buff=conn_.Recv(256, 5000) if(buff.length() == 0) break end recv = recv + buffend### #203 Move Rightconn_.Reconnect()auth_s=device_.devdata_[114]+":"+device_.devdata_[115]auth_a=Array.new;auth_s.each{|c| auth_a.push(c)}s = "GET /decoder_control.cgi?command=6&onestep=1 HTTP/1.0\r\n"s+= "Accept: */*\r\n"s+= "Authorization: Basic "+auth_a.pack("m").chop+"\r\n"s+= "\r\n"conn_.Send(s)recv=""while(true) buff=conn_.Recv(256, 5000) if(buff.length() == 0) break end recv = recv + buffend
conn_.Reconnect()auth_s="user="+device_.devdata_[114]+"&pwd="+device_.devdata_[115];#auth_a=Array.new;#auth_s.each{|c| auth_a.push(c)}fix_path=device_.devdata_[2]+auth_s;fix_path='/'+fix_path if(fix_path[0]!='/'[0]);s = "GET "+fix_path+" HTTP/1.0\r\n"s+= "Accept: */*\r\n"#s+= "Authorization: Basic "+auth_a.pack("m").chop+"\r\n"s+= "\r\n"conn_.Send(s)recv=""while(true) buff=conn_.Recv(16384, 5000) if(buff.length() == 0) break end recv = recv + buffendif (recv=~ /^HTTP[^\r\n]+200\sOK.+?\r\n\r\n(.+)$/m) fileName="/tmp/ip_camera_img"+device_.devid_.to_s imageFile=File.new(fileName+".jpg",'w') imageFile.print $1 imageFile.close() system("/usr/bin/convert "+fileName+".jpg "+fileName+".png"); size=File.stat(fileName+".png").size imageFile=File.new(fileName+".png",'r') img = imageFile.read(size); imageFile.close() data_set(img) format_set('png')end
conn_.Reconnect()auth_s="user="+device_.devdata_[114]+"&pwd="+device_.devdata_[115];#auth_a=Array.new;#auth_s.each{|c| auth_a.push(c)}s = "GET /decoder_control.cgi?command=4&onestep=1&"+auth_ss+= " HTTP/1.0\r\n Accept: */*\r\n"#s+= "Authorization: Basic "+auth_a.pack("m").chop+"\r\n"s+= "\r\n"conn_.Send(s)recv=""while(true) buff=conn_.Recv(256, 5000) if(buff.length() == 0) break end recv = recv + buffend
OK. Got this working as a dce device (not under motion). Anyone who's interested can try these settings. I copied the Panasonic IP Camera template and pw44's examples.