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.3.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

AmazonEnviroSensors-0.3.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file amazonenvirosensors-0.3.0.tar.gz.

File metadata

  • Download URL: amazonenvirosensors-0.3.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for amazonenvirosensors-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c59a34d0067665170024e7774ebcbaebb175c9499558f0a1af0e7fde97fa9cce
MD5 cd63b923c1ab6c89d80b6e0efd0f235d
BLAKE2b-256 f5416acb6212b04002bee8dfe5620eaad8b53cf8b93cf26f6e75418492c1ad9d

See more details on using hashes here.

File details

Details for the file AmazonEnviroSensors-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for AmazonEnviroSensors-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b17aaae3eab3e476c6ae09d2c504be6d48ad179371fbc91a2a05766e4dfb457
MD5 ac0851f49b28de70028a3bc27fcfb6e8
BLAKE2b-256 b024169288a9abef79e6274c36140367a2ada17405ab14d6d3f4a925762d4171

See more details on using hashes here.

Supported by

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