Skip to main content

Newkiton temperature sensor

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)

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

Newkiton-0.0.5.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Newkiton-0.0.5-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file Newkiton-0.0.5.tar.gz.

File metadata

  • Download URL: Newkiton-0.0.5.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for Newkiton-0.0.5.tar.gz
Algorithm Hash digest
SHA256 f8b7285c32205ee088b60b7084aec00f7b00e6a9aa70ae9d9b6e1d4ab2386634
MD5 d7882f66b59cc3739f0a459a8b955477
BLAKE2b-256 662b31cfcc1507411ce5f1bb15f09a0a0af7e24e44fca6ead8aa4f051e14b2a2

See more details on using hashes here.

File details

Details for the file Newkiton-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: Newkiton-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for Newkiton-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 558df963b7d9980454c9cfb7e27c92654da1874cc4a4b58aeecd63bfa7f791ed
MD5 d60d17bf89e9940169a757299bae5338
BLAKE2b-256 6dec331b2ffbcf3ff6d2e8ed493c85e0c2aa13791d590376a79da76eb408fa17

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