Skip to main content

Amazon Environmental sensors

Project description

Newkiton

I bought a temperature senson on Amazon (https://www.amazon.com/Newkiton-NK-01B-Thermometer-Temperature-Compatible/dp/B07W53L4RD) I wanted to integrate it into a Graphana dashboard and to do so I needed to figure out how to pull the data from it

With that in mind, I reverse engineered the protocol. At the moment I know the basic on how to get the temperatire readings from the device and not much more.

I am not that familar with BLE but I know wireshark so I used that to reverse engineer it. The I just copied the protocol and came up with this

The device seems to store the data on a NVM with a simple address scheme. I presume it wraps around but I haven't run it for long enough just yet.

To use this, just instanciate a device and call the temperature method. The temperature is only updated every 10 minutes so call it more frequently will only return a cached version

from Newkiton import Newkiton
import time

sensor = Newkiton.Newkiton(deviceAddr="8e:f9:00:00:00:ed")
while True:
    print("Temp={}".format(sensor.temperature()))
    time.sleep(60*10)

ThermoBeacon

This is another similar device from Amazon which I also bought. I based this code from https://github.com/rnlgreen/thermobeacon

from ThermoBeacon import ThermoBeacon
import time

sensor = ThermoBeacon.ThermoBeacon(deviceAddr="8e:f9:00:00:00:ed")
while True:
    print("Temp={}".format(sensor.temperature()))
    time.sleep(60*10)

MiTemperature

This is another similar device from Amazon which I also bought. I based this code from https://github.com/JsBergbau/MiTemperature2 https://www.amazon.fr/gp/product/B082B4X4B2/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AmazonEnviroSensors-0.2.0.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file AmazonEnviroSensors-0.2.0.tar.gz.

File metadata

  • Download URL: AmazonEnviroSensors-0.2.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for AmazonEnviroSensors-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fb4215d53326a125ea365931d6156f3c5c8ba2a6dc99997fff5b53f0f6697066
MD5 8eb90a3b52b831df5b2f58ee4da3402f
BLAKE2b-256 b7e390fada4c7cbd4c8cd623d0e06f2721ee424d34debec1f67fda285c4b2c83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page