This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Local Weatherstation to Logicmachine
#2
Create a resident script with 10 seconds sleep time.
Code:
require('socket')

server = socket.bind('*', 8000)

while true do
  client = server:accept()
  client:settimeout(1)

  data, err, partial = client:receive('*a')
  log(data, err, partial)

  client:send('HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n')
  client:close()
end

On your weather station set Server IP to LM IP and Port to 8000. Set upload interval to 10-15 seconds and post what you get in LM Logs tab.
Reply


Messages In This Thread
RE: Local Weatherstation to Logicmachine - by admin - Yesterday, 12:20

Forum Jump: