Skip to content

Unofficial API server for leafee mag (IoT sensor for windows and doors). Tested on Raspberry Pi.

Notifications You must be signed in to change notification settings

mugifly/lmag-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lmag-server

Unofficial WebAPI server for mag (door sensor)


Notice

  • This software is published under testing phase.
  • This is unofficial software for the convenience of users.
  • I don't any guarantee about this software.
  • I don't have any relationship with the vendor company of the sensor product.

Get Started

It tested on Raspberry Pi Zero W with Raspbian Stretch and Node v9.

$ sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

$ npm install

$ sudo npm start

Now, you can get a sensor status with using GET request to WebAPI: http://localhost:3000/xx:xx:xx:xx:xx:xx (NOTE: xx:xx:xx:xx:xx:xx is a device address of your mag.)

The following JSON is an example of a response from WebAPI. The status value can be "OPEN", "CLOSE" or "UNKNOWN".

{
	"status": "CLOSE"
}

WebAPI Document

#TODO


License

The MIT License (MIT)
Copyright (c) 2018 Masanori Ohgita

About

Unofficial API server for leafee mag (IoT sensor for windows and doors). Tested on Raspberry Pi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published