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

Uploaded Python 3

File details

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

File metadata

  • Download URL: Newkiton-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 c1e4956f289f0bdb1940ee971987d31cbea0d48321391fa6454dbac6ca45189c
MD5 81ca26cf4b0cae35a9ea1efe44eb6a69
BLAKE2b-256 527844e6de83fccf9d92e6dc63e40f10feb62348b283cc39eb792882c94eeb52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Newkiton-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 36dc22f7121c55cd12e2737051675c833c11697a45d32e0677869a8d4fd973b0
MD5 0b346e46373cd9898abc05f2e2268466
BLAKE2b-256 7d7b7a9cd6c137fcd1717fe219b17787ff3abd6edb2041f717e5b6504d29f91f

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