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)
ThermoBeacon
This is another similar device from Amazon which I also bought. I based this code from https://github.com/rnlgreen/thermobeacon
from ThermoBeacon import ThermoBeacon
import time
sensor = ThermoBeacon.ThermoBeacon(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
Built Distribution
File details
Details for the file Newkiton-0.1.0.tar.gz
.
File metadata
- Download URL: Newkiton-0.1.0.tar.gz
- Upload date:
- Size: 4.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b5a328c1eef7cc3d25112acb09cab9e69d1b5df6fa3ffd9a291614029f5abed |
|
MD5 | 3dffcedf405af5e9dd190325bafb7529 |
|
BLAKE2b-256 | d933cb65d63ba325cc5d6766f9de9b9edd59133c1e1c6e44281595215dfefd7f |
File details
Details for the file Newkiton-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: Newkiton-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dcd23d37191755b0ec9a307b3a2a27cfe7910907d8b3c9510eed585454a74e7 |
|
MD5 | f00e3544e2cea15795b6b5f67ae07619 |
|
BLAKE2b-256 | 11e53a1cee52348ac13436bb5622506be801422cf22cd0b56d253ddd83587e1a |