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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for Newkiton-0.0.1.tar.gz
Algorithm Hash digest
SHA256 984d784281eaecb3b95703ff0ae91253bbfe6b1435e8a620ad7f76a78cc5d076
MD5 c4076b0974d7e00d7a3baff72848a7dd
BLAKE2b-256 a423d7cc5212d2c13b7d93a92ca20182605d4c5e91093636ef8a32978a808af3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Newkiton-0.0.1-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.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for Newkiton-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec03b1a72d581bd032375effa7898466a31bc2c16ec8538dc2abb557bee1eb3d
MD5 4c89ddec36954b22a9871deb588d1155
BLAKE2b-256 89a9579309e2da8f330d061a12dc71f1c53cb6e4874f80cf0beef78ea649ecc8

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