How to identify the lat/long location from where the IoT button click was made

放肆的年华 提交于 2019-12-12 05:30:56

问题


How to identify the lat/long location from where the IoT button click was made

https://aws.amazon.com/iotbutton/


回答1:


There are lookups you can do from IP Address to location. i.e http://ip-api.com/json/208.80.152.201

Unfortunately for you, IoT Button clicks only give 3 event parameters:

 clickType: event.clickType, // (string) the type of press; can be "SINGLE", "DOUBLE" or "LONG"
 serialNumber: event.serialNumber, // (string) device's serial number, from the back of the button.
 batteryVoltage: event.batteryVoltage // (string) device's voltage level in millivolts. e.g. "1567mV"

If your set up of an IoT button involves putting it on a wifi network, and having it be stationary, that is the time to manually map the serial number to a latitude/longitude. Then do a look-up from serial number to lat/long.

[1] https://docs.aws.amazon.com/iot/latest/developerguide/iot-lambda-rule.html

[2] https://www.losant.com/blog/getting-started-with-aws-iot-button-losant



来源:https://stackoverflow.com/questions/44915934/how-to-identify-the-lat-long-location-from-where-the-iot-button-click-was-made

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!