Metadata-Version: 2.4
Name: stroomer
Version: 0.1.1
Summary: Energy inference and EV charging ETA utilities (SoC-based).
Author-email: Your Name <you@example.com>
License: MIT License
        
        Copyright (c) 2025
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to do so, subject to the
        following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: energy,iot,nilm,ev,charging
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# stroomer

Utilities for appliance inference and EV charging ETA (SoC-based).

## Usage

### Appliance inference
```python
from stroomer import StroomerPredictor

p = StroomerPredictor()
# daya per unit (W)
p.set_appliances({
    "Lampu": 10,
    "Kipas": 50,
    "TV": 100,
    "Kulkas": 150,
    "AC": 1000
})

# Opsional: batasi jumlah masuk akal (mis. lampu maksimal 20 unit)
p.set_max_counts({
    "Lampu": 20,
    "Kipas": 2,
    "TV": 2,
    "Kulkas": 2,
    "AC": 1
})

out = p.predict(power=180)  # misal terbaca 180 W total
print(out)
# Kemungkinan output:
# {
#   "on": {"Lampu": 3, "Kipas": 1},  # 3*10 + 1*50 = 80 W (contoh) -> akan dicari kombinasi terdekat ke 180
#   "target_power": 180.0,
#   "predicted_total": 180.0,
#   "relative_error": 0.0
# }
```

### Charging ETA (SoC-based)
```python
from stroomer import ChargingTimePredictor
eta = ChargingTimePredictor(capacity_kwh=50, target_soc=90, efficiency=0.92)
print(eta.predict(power=8000, SoC=30))
# -> {"FinishDuration":"03:14","FinishTime":"2025-08-18T13:25:00+00:00"}
```

## Dev
```
pip install -U build twine pytest
pip install -e .
pytest -q
python -m build
```
