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.4.tar.gz (3.4 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.4-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Newkiton-0.0.4.tar.gz
  • Upload date:
  • Size: 3.4 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.4.tar.gz
Algorithm Hash digest
SHA256 b0d6b667636d77c9efb131edf7a75ff8b26035d8f14dc448a00dd6e547a5bfd5
MD5 ad5a133924cef6fdf2b0a425ddb8a92c
BLAKE2b-256 30e669b874ec0b6ae9a2bcf859bd3224e8f543b83ac79b3be35754bc65199100

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Newkiton-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 81f9f9cae7ed7ac5c49bb708742dcf3a5cda995e7c79a37f03ed97e59d36c594
MD5 4c1c826798c9fd9a1222373b7e9ad123
BLAKE2b-256 9b0eeec2c6964c15df44bde98828517250adb4a708b06a9c44a569f118076b84

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