型号如图,只要是标准的 NMEA通讯协议都可以通过esphome接入homeassistant,通讯只需要接一根TX到8266即可
esphome代码很简单如下:
esphome:
name: gps
platform: ESP8266
board: esp8285
# Enable logging
logger:
# Enable Home Assistant API
web_server:
port: 80
ota:
password: ""
wifi:
networks:
- ssid:
password:
- ssid:
password:
ap:
ssid:
password:
mqtt:
broker:
username:
password:
captive_portal:
uart:
rx_pin: 13
baud_rate: 9600
# Declare GPS module
gps:
latitude:
name: "Latitude"
longitude:
name: "Longitude"
altitude:
name: "Altitude"
speed:
name: "speed"
course:
name: "course"
satellites:
name: "satellites"
然后可以通过NODERED,配合GPSLogger获取轨迹
|