https://github.com/mugifly/lmag-server
Unofficial API server for leafee mag (IoT sensor for windows and doors). Tested on Raspberry Pi.
https://github.com/mugifly/lmag-server
doors iot sensor unofficial
Last synced: 12 months ago
JSON representation
Unofficial API server for leafee mag (IoT sensor for windows and doors). Tested on Raspberry Pi.
- Host: GitHub
- URL: https://github.com/mugifly/lmag-server
- Owner: mugifly
- Created: 2018-08-07T18:11:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-07T18:23:12.000Z (almost 8 years ago)
- Last Synced: 2025-04-19T21:17:59.817Z (about 1 year ago)
- Topics: doors, iot, sensor, unofficial
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```