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.

NetAtmo Cameras into LM
#2
NetAtmo has webhook option that allows sending events via HTTP: https://dev.netatmo.com/apidocumentation...y#webhooks

On LM side you need to create a server-side .lp script that will handle events. Script should be uploaded via FTP using apps login to the user directory. If the file name is netatmo.lp then the HTTP path will be http://user:password@LM_IP/user/netatmo.lp
If username/password access does not work then you can disable password protection for user directory in User access settings.

Use this as a starting point:
Code:
1234567891011121314151617181920
<? require('apps') -- read POST data body = ngx.req.get_body_data() if body then   -- decode data as JSON   data = json.pdecode(body)   -- check that data is a table   if type(data) == 'table' then     log(data)     -- movement detected, you can check data.camera_id if you have multiple cameras     if data.event_type == 'movement' then       -- do something when movement happens     end   end end
Reply


Messages In This Thread
NetAtmo Cameras into LM - by Hyxion14 - 05.11.2020, 14:51
RE: NetAtmo Cameras into LM - by admin - 09.11.2020, 07:42
RE: NetAtmo Cameras into LM - by Hyxion14 - 10.11.2020, 08:49
RE: NetAtmo Cameras into LM - by admin - 16.03.2022, 09:24
RE: NetAtmo Cameras into LM - by admin - 16.03.2022, 12:56

Forum Jump: