Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eternal-flame-ad/phicomm-airdetector
collect data from you phicomm airdetector
https://github.com/eternal-flame-ad/phicomm-airdetector
air-quality air-quality-sensor iot phicomm
Last synced: 10 days ago
JSON representation
collect data from you phicomm airdetector
- Host: GitHub
- URL: https://github.com/eternal-flame-ad/phicomm-airdetector
- Owner: eternal-flame-AD
- License: apache-2.0
- Created: 2019-02-25T07:34:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T12:28:32.000Z (over 5 years ago)
- Last Synced: 2024-06-28T04:35:07.077Z (4 months ago)
- Topics: air-quality, air-quality-sensor, iot, phicomm
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phicomm-airdetector
参照[YinHangCode/homebridge-phicomm-air_detector](https://github.com/YinHangCode/homebridge-phicomm-air_detector)使用golang编写的phicomm airdetector m1数据收集服务器。
## Example
```golang
package mainimport (
"fmt"
"time"airdetector "github.com/eternal-flame-AD/phicomm-airdetector"
)func main() {
measurements, err := airdetector.Listen()
if err != nil {
panic(err)
}
for meas := range measurements {
fmt.Printf("%s: device %x => PM25:%d HCHO:%.2f T:%.1f H:%.1f\n", time.Now().Format("2006-01-02T15:04:05-0700"), meas.DeviceMAC, meas.PM25, meas.HCHO, meas.Temperature, meas.Humidity)
}
}
```## Usage
1. 运行服务器。
1. 使用DNS spoofing将aircat.phicomm.com解析到服务器ip。