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

Uploaded Python 3

File details

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

File metadata

  • Download URL: Newkiton-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 6e653a1b2b7d680f80c007e6e91fcd8ec699a48c3e3443a937b4caf09297a09e
MD5 9828ed2bd14e7e2427c39924c9782c5a
BLAKE2b-256 2f9298876b4f7e9caaca4fa6dff956004f7764aa14db9c8d0bfadd633bcc76e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Newkiton-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1e1e3bec3f21787a4c8530f4fd56d6adde59105a7067ca7c14e1fc3a3193f2c
MD5 770de5c0a094c7cd73986eb796528fb0
BLAKE2b-256 03b7df289cc46d4d76d22eb59ff5b366ee706204180e87d4df8a36d1b381f249

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