# 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
`````python
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
`````python
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)
`````
# MiTemperature
This is another similar device from Amazon which I also bought. I based
this code from https://github.com/JsBergbau/MiTemperature2
https://www.amazon.fr/gp/product/B082B4X4B2/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
Raw data
{
"_id": null,
"home_page": "https://github.com/diarmuid/AmazonEnviroSensors",
"name": "AmazonEnviroSensors",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Diarmuid Collins",
"author_email": "diarmuid.m.collins+github@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f5/41/6acb6212b04002bee8dfe5620eaad8b53cf8b93cf26f6e75418492c1ad9d/amazonenvirosensors-0.3.0.tar.gz",
"platform": null,
"description": "# Newkiton \n\nI bought a temperature senson on Amazon (https://www.amazon.com/Newkiton-NK-01B-Thermometer-Temperature-Compatible/dp/B07W53L4RD) \nI wanted to integrate it into a Graphana dashboard and to do so I needed to figure out how to pull the data from it\n\nWith that in mind, I reverse engineered the protocol. At the moment I know the basic on how to get the temperatire readings \nfrom the device and not much more.\n\nI am not that familar with BLE but I know wireshark so I used that to reverse engineer it. The I just copied the \nprotocol and came up with this\n\nThe device seems to store the data on a NVM with a simple address scheme. I presume it wraps around but I haven't \nrun it for long enough just yet.\n\nTo use this, just instanciate a device and call the temperature method. The temperature is only updated every 10 minutes \nso call it more frequently will only return a cached version\n\n`````python\nfrom Newkiton import Newkiton\nimport time\n\nsensor = Newkiton.Newkiton(deviceAddr=\"8e:f9:00:00:00:ed\")\nwhile True:\n print(\"Temp={}\".format(sensor.temperature()))\n time.sleep(60*10)\n\n\n`````\n\n# ThermoBeacon\n\nThis is another similar device from Amazon which I also bought. I based\nthis code from https://github.com/rnlgreen/thermobeacon\n\n`````python\nfrom ThermoBeacon import ThermoBeacon\nimport time\n\nsensor = ThermoBeacon.ThermoBeacon(deviceAddr=\"8e:f9:00:00:00:ed\")\nwhile True:\n print(\"Temp={}\".format(sensor.temperature()))\n time.sleep(60*10)\n\n\n`````\n\n# MiTemperature\n\nThis is another similar device from Amazon which I also bought. I based\nthis code from https://github.com/JsBergbau/MiTemperature2\nhttps://www.amazon.fr/gp/product/B082B4X4B2/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1\n",
"bugtrack_url": null,
"license": null,
"summary": "Amazon Environmental sensors",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/diarmuid/AmazonEnviroSensors"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b024169288a9abef79e6274c36140367a2ada17405ab14d6d3f4a925762d4171",
"md5": "ac0851f49b28de70028a3bc27fcfb6e8",
"sha256": "9b17aaae3eab3e476c6ae09d2c504be6d48ad179371fbc91a2a05766e4dfb457"
},
"downloads": -1,
"filename": "AmazonEnviroSensors-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ac0851f49b28de70028a3bc27fcfb6e8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20734,
"upload_time": "2024-10-08T06:45:17",
"upload_time_iso_8601": "2024-10-08T06:45:17.082513Z",
"url": "https://files.pythonhosted.org/packages/b0/24/169288a9abef79e6274c36140367a2ada17405ab14d6d3f4a925762d4171/AmazonEnviroSensors-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f5416acb6212b04002bee8dfe5620eaad8b53cf8b93cf26f6e75418492c1ad9d",
"md5": "cd63b923c1ab6c89d80b6e0efd0f235d",
"sha256": "c59a34d0067665170024e7774ebcbaebb175c9499558f0a1af0e7fde97fa9cce"
},
"downloads": -1,
"filename": "amazonenvirosensors-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "cd63b923c1ab6c89d80b6e0efd0f235d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19703,
"upload_time": "2024-10-08T06:45:18",
"upload_time_iso_8601": "2024-10-08T06:45:18.810895Z",
"url": "https://files.pythonhosted.org/packages/f5/41/6acb6212b04002bee8dfe5620eaad8b53cf8b93cf26f6e75418492c1ad9d/amazonenvirosensors-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 06:45:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "diarmuid",
"github_project": "AmazonEnviroSensors",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "bluepy",
"specs": [
[
"==",
"1.3.0"
]
]
}
],
"lcname": "amazonenvirosensors"
}