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.3.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.3-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Newkiton-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 04b0763fc721303ae6ddefa419a34d389f09385f89ca8f66813ad7d979a10b86
MD5 38c5873b1976896701ffca7cd6adea70
BLAKE2b-256 11088e345bc4681f831584bb70f79095b5dc00a99a0180d6330a58429856705d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Newkiton-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2dd1d2db4b29f7fa4938f6a4fa17f79fa847c0f65d308d43862757b772321601
MD5 17ca67808fa7d6e0ba69af4dc2bd78fc
BLAKE2b-256 5b748d14fab68fab41ce357b4da9bf5f928b639b7dea89d2b510ec9d693335f1

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