semvec/pypi-packages huggingface dataset:
wemportal 0.0.5
Python module for fetching wemportal data.
Requires Python: >=3.8

# Python wemportal module
[![Tests](https://github.com/floek/wemportal/actions/workflows/test.yml/badge.svg)](https://github.com/floek/wemportal/actions/workflows/test.yml)
[![PyPi](https://github.com/floek/wemportal/actions/workflows/publish-release.yml/badge.svg)](https://github.com/floek/wemportal/actions/workflows/publish-release.yml)

I wanted to scrape the Weishaupt WEM Portal without using [Home Assistant](https://home-assistant.io/).
@erikkastelec created a nice project [hass-WEM-Portal](https://github.com/erikkastelec/hass-WEM-Portal), so
I used his code to create this python module for standalone scraping of WEM Portal.

It utilizes the mobile api for the most of the data. The statistics are collected via web api.

## Installation
```
pip install wemportal
```

## Example usage
```python
from wemportal.wem_portal import WemPortal

# Create API object
api = WemPortal(
    username="<WEM Portal Username>",
    password="<WEM Portal Password>"
)

# Fetch data
api.login()
devices = api.fetch_devices()
api.logout()

# Print values
for device in devices:
    print(f"== Device {device.name} ==\n")

    print("Values:")
    for data in device.get_parameter_values():
        print(f"\t{data['ParameterId']}: {data['ValueNumericValue']} {data['ValueUnit']}")

    print("\nHot Water Statistics:")
    for data in device.hot_water_statistic.values:
        print(f"\t{data.datetime.date()}: {data.value:.2f} {device.hot_water_statistic.unit}")

    print("\nHeating Statistics:")
    for data in device.heating_statistic.values:
        print(f"\t{data.datetime.date()}: {data.value:.2f} {device.heating_statistic.unit}")
```

## Reporting bugs or incorrect results

If you find a bug, please create an issue in the
[repo issues tracker](https://github.com/floek/wemportal/issues/).

## Please contribute
It was created for myself, but if you find it useful: Please contribute.
AmazonEnviroSensors 0.3.0
Amazon Environmental sensors

# 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