<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.mios.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.mios.com/index.php?action=history&amp;feed=atom&amp;title=User%3ACiprian.bacioiu</id>
		<title>User:Ciprian.bacioiu - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.mios.com/index.php?action=history&amp;feed=atom&amp;title=User%3ACiprian.bacioiu"/>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=User:Ciprian.bacioiu&amp;action=history"/>
		<updated>2026-06-03T05:11:55Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.8</generator>

	<entry>
		<id>http://wiki.mios.com/index.php?title=User:Ciprian.bacioiu&amp;diff=8291&amp;oldid=prev</id>
		<title>Ciprian.bacioiu: /* Luvit server used to receive POST Recordings from HTTP POST enabled sercomm cameras */</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=User:Ciprian.bacioiu&amp;diff=8291&amp;oldid=prev"/>
				<updated>2016-11-21T12:43:44Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Luvit server used to receive POST Recordings from HTTP POST enabled sercomm cameras&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:43, 21 November 2016&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Useful scripts and tools ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Useful scripts and tools ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== Luvit server used to receive POST Recordings from HTTP POST enabled sercomm cameras ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== Luvit server used to receive POST Recordings from HTTP POST enabled sercomm cameras ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;===== Usage =====&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* Run the source from the cmd using luvit. If the file is name server.lua do a&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;luvit server.lua&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* Go into the camera administrator page (usually [http://camera_ip/adm/config_trig.htm /adm/config_trig.htm])&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* Settup a Trigger for HTTP Post&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* Go into the HTTP Post configuration page and place your IP address and port that the server is running on&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* Generate a trigger event by accessing the [http://camera_ip/adm/http_trigger.cgi camera_ip/adm/http_trigger.cgi].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* The server will tell you a POST event was received. Wait till &amp;lt;code&amp;gt;FILE saved ------------------ &amp;lt;/code&amp;gt; is outputed.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* Download [https://luvit.io/install.html luvit]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* Download [https://luvit.io/install.html luvit]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key micasaverde_wiki:diff:version:1.11a:oldid:8290:newid:8291 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ciprian.bacioiu</name></author>	</entry>

	<entry>
		<id>http://wiki.mios.com/index.php?title=User:Ciprian.bacioiu&amp;diff=8290&amp;oldid=prev</id>
		<title>Ciprian.bacioiu: Created page with &quot;=== Useful scripts and tools === ==== Luvit server used to receive POST Recordings from HTTP POST enabled sercomm cameras ==== * Download [https://luvit.io/install.html luvit]...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=User:Ciprian.bacioiu&amp;diff=8290&amp;oldid=prev"/>
				<updated>2016-11-21T12:38:22Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== Useful scripts and tools === ==== Luvit server used to receive POST Recordings from HTTP POST enabled sercomm cameras ==== * Download [https://luvit.io/install.html luvit]...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Useful scripts and tools ===&lt;br /&gt;
==== Luvit server used to receive POST Recordings from HTTP POST enabled sercomm cameras ====&lt;br /&gt;
* Download [https://luvit.io/install.html luvit]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang='lua'&amp;gt;&lt;br /&gt;
local http = require(&amp;quot;http&amp;quot;)&lt;br /&gt;
local https = require(&amp;quot;https&amp;quot;)&lt;br /&gt;
local pathJoin = require('luvi').path.join&lt;br /&gt;
local fs = require('fs')&lt;br /&gt;
&lt;br /&gt;
local function onRequest(req, res)&lt;br /&gt;
	local buffer = {}&lt;br /&gt;
	print(req.socket.options and &amp;quot;https&amp;quot; or &amp;quot;http&amp;quot;, req.method, req.url)&lt;br /&gt;
	if req.method == &amp;quot;POST&amp;quot; then&lt;br /&gt;
		req:on('data', function(chunk)&lt;br /&gt;
			table.insert(buffer, chunk)&lt;br /&gt;
			if type(chunk) == &amp;quot;string&amp;quot; then&lt;br /&gt;
				&lt;br /&gt;
			end&lt;br /&gt;
		end)&lt;br /&gt;
		req:on('end', function()&lt;br /&gt;
			print(&amp;quot;Saving video file -------------------------&amp;quot;)&lt;br /&gt;
			file = io.open(&amp;quot;vid-&amp;quot;..os.time()..&amp;quot;.avi&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
			for i = 1, #buffer do&lt;br /&gt;
				print(&amp;quot;Completion: &amp;quot;..i..&amp;quot;/&amp;quot;..#buffer..&amp;quot;&amp;quot;)&lt;br /&gt;
				file:write(&amp;quot;&amp;quot;..buffer[i]..&amp;quot;&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
			file:close()&lt;br /&gt;
			print(&amp;quot;File saved -------------------------------&amp;quot;)&lt;br /&gt;
		end)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http.createServer(onRequest):listen(8080)&lt;br /&gt;
print(&amp;quot;Server listening at http://localhost:8080/&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ciprian.bacioiu</name></author>	</entry>

	</feed>