gazpar2haws 0.3.3__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gazpar2haws/datetime_utils.py +104 -0
- gazpar2haws/gazpar.py +127 -19
- gazpar2haws/haws.py +113 -1
- gazpar2haws/model.py +83 -20
- gazpar2haws/pricer.py +309 -143
- {gazpar2haws-0.3.3.dist-info → gazpar2haws-0.4.0.dist-info}/METADATA +233 -71
- gazpar2haws-0.4.0.dist-info/RECORD +16 -0
- {gazpar2haws-0.3.3.dist-info → gazpar2haws-0.4.0.dist-info}/WHEEL +1 -1
- gazpar2haws-0.3.3.dist-info/RECORD +0 -15
- {gazpar2haws-0.3.3.dist-info → gazpar2haws-0.4.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: gazpar2haws
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Gazpar2HAWS is a gateway that reads data history from the GrDF (French gas provider) meter and send it to Home Assistant using WebSocket interface
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -23,6 +23,7 @@ License: MIT License
|
|
|
23
23
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
24
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
25
|
SOFTWARE.
|
|
26
|
+
License-File: LICENSE
|
|
26
27
|
Author: Stéphane Senart
|
|
27
28
|
Requires-Python: >=3.10
|
|
28
29
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -48,6 +49,38 @@ It is a complement to the other available projects:
|
|
|
48
49
|
- [gazpar2mqtt](https://github.com/ssenart/gazpar2mqtt): [home-assistant-gazpar](https://github.com/ssenart/home-assistant-gazpar) alternative but using MQTT events (it reduce coupling with HA).
|
|
49
50
|
- [lovelace-gazpar-card](https://github.com/ssenart/lovelace-gazpar-card): HA dashboard card compatible with [home-assistant-gazpar](https://github.com/ssenart/home-assistant-gazpar) and [gazpar2mqtt](https://github.com/ssenart/gazpar2mqtt).
|
|
50
51
|
|
|
52
|
+
## Documentation
|
|
53
|
+
|
|
54
|
+
### User Documentation
|
|
55
|
+
|
|
56
|
+
- **[README.md](README.md)** (this file) - Complete installation, configuration, and usage guide
|
|
57
|
+
- **[FAQ.md](FAQ.md)** - Frequently Asked Questions based on GitHub issues and user feedback
|
|
58
|
+
- Common configuration issues
|
|
59
|
+
- Troubleshooting steps
|
|
60
|
+
- Migration guides
|
|
61
|
+
- All known issues and solutions
|
|
62
|
+
- **[CHANGELOG.md](CHANGELOG.md)** - Version history with all changes, fixes, and new features
|
|
63
|
+
|
|
64
|
+
### Developer Documentation
|
|
65
|
+
|
|
66
|
+
- **[CLAUDE.md](CLAUDE.md)** - Developer guide for working with the codebase
|
|
67
|
+
- Architecture overview
|
|
68
|
+
- Development commands (setup, testing, linting)
|
|
69
|
+
- Key implementation details
|
|
70
|
+
- Testing guidelines
|
|
71
|
+
- **[TODO.md](TODO.md)** - Planned improvements and test coverage tasks
|
|
72
|
+
- Test coverage analysis
|
|
73
|
+
- Missing tests by priority
|
|
74
|
+
- Implementation schedule
|
|
75
|
+
- Known issues requiring tests
|
|
76
|
+
|
|
77
|
+
### Quick Links
|
|
78
|
+
|
|
79
|
+
- 🐛 Found a bug? → Check [FAQ.md](FAQ.md) first, then open an [issue](https://github.com/ssenart/gazpar2haws/issues)
|
|
80
|
+
- 📝 Want to contribute? → Read [CLAUDE.md](CLAUDE.md) and [TODO.md](TODO.md)
|
|
81
|
+
- 🔄 Upgrading? → Check [CHANGELOG.md](CHANGELOG.md) for breaking changes
|
|
82
|
+
- ❓ Have a question? → See [FAQ.md](FAQ.md) or ask in [discussions](https://github.com/ssenart/gazpar2haws/discussions)
|
|
83
|
+
|
|
51
84
|
## Installation
|
|
52
85
|
|
|
53
86
|
Gazpar2HAWS can be installed in many ways.
|
|
@@ -185,7 +218,7 @@ logging:
|
|
|
185
218
|
grdf:
|
|
186
219
|
scan_interval: 0 # Number of minutes between each data retrieval (0 means no scan: a single data retrieval at startup, then stops).
|
|
187
220
|
devices:
|
|
188
|
-
- name: gazpar2haws # Name of the device in home assistant. It will be used as the
|
|
221
|
+
- name: gazpar2haws # Name of the device in home assistant. It will be used as the entity_id prefix: sensor.${name}_*.
|
|
189
222
|
username: "!secret grdf.username"
|
|
190
223
|
password: "!secret grdf.password"
|
|
191
224
|
pce_identifier: "!secret grdf.pce_identifier"
|
|
@@ -215,6 +248,11 @@ The history is uploaded on the entities with names:
|
|
|
215
248
|
|
|
216
249
|
- sensor.${name}\_volume: Volume history in m³.
|
|
217
250
|
- sensor.${name}\_energy: Energy history in kWh.
|
|
251
|
+
- sensor.${name}\_consumption_cost: Cost from consumption (if pricing configured).
|
|
252
|
+
- sensor.${name}\_subscription_cost: Cost from subscription (if pricing configured).
|
|
253
|
+
- sensor.${name}\_transport_cost: Cost from transport (if pricing configured).
|
|
254
|
+
- sensor.${name}\_energy_taxes_cost: Cost from energy taxes (if pricing configured).
|
|
255
|
+
- sensor.${name}\_total_cost: Total cost (if pricing configured).
|
|
218
256
|
|
|
219
257
|
`${name}` is 'gazpar2haws' defined in the above configuration file. It can be replaced by any other name.
|
|
220
258
|
|
|
@@ -226,10 +264,10 @@ The cost computation is based in gas prices defined in the configuration files.
|
|
|
226
264
|
|
|
227
265
|
The section 'Pricing' is broken into 5 sub-sections:
|
|
228
266
|
- vat: Value added tax definition.
|
|
229
|
-
- consumption_prices:
|
|
230
|
-
- subscription_prices:
|
|
231
|
-
- transport_prices:
|
|
232
|
-
- energy_taxes:
|
|
267
|
+
- consumption_prices: Gas consumption prices, typically in €/kWh (quantity-based).
|
|
268
|
+
- subscription_prices: Fixed subscription prices, typically in €/month or €/year (time-based).
|
|
269
|
+
- transport_prices: Transport prices, either fixed (€/month or €/year) or based on consumption (€/kWh).
|
|
270
|
+
- energy_taxes: Energy taxes, typically in €/kWh (quantity-based).
|
|
233
271
|
|
|
234
272
|
Below, many examples illustrates how to use pricing configuration for use cases from the simplest to the most complex.
|
|
235
273
|
|
|
@@ -251,14 +289,14 @@ cost[€] = quantity[kWh] * price[€/kWh]
|
|
|
251
289
|
pricing:
|
|
252
290
|
consumption_prices:
|
|
253
291
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
254
|
-
|
|
292
|
+
quantity_value: 0.07790 # Default unit is €/kWh.
|
|
255
293
|
```
|
|
256
294
|
|
|
257
295
|
Example 2: A fixed consumption price in another unit
|
|
258
296
|
---
|
|
259
297
|
|
|
260
|
-
*
|
|
261
|
-
*
|
|
298
|
+
*price_unit* is the monetary unit (default: €).
|
|
299
|
+
*quantity_unit* is the energy unit (default: kWh).
|
|
262
300
|
|
|
263
301
|
**Formula:**
|
|
264
302
|
```math
|
|
@@ -270,9 +308,9 @@ cost[€] = \frac{quantity[kWh] * price[¢/MWh] * converter\_factor[¢->€]} {c
|
|
|
270
308
|
pricing:
|
|
271
309
|
consumption_prices:
|
|
272
310
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
311
|
+
quantity_value: 7790.0 # Unit is now ¢/MWh.
|
|
312
|
+
price_unit: "¢"
|
|
313
|
+
quantity_unit: "MWh"
|
|
276
314
|
```
|
|
277
315
|
|
|
278
316
|
Example 3: Multiple prices over time
|
|
@@ -282,9 +320,9 @@ Example 3: Multiple prices over time
|
|
|
282
320
|
pricing:
|
|
283
321
|
consumption_prices:
|
|
284
322
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
285
|
-
|
|
323
|
+
quantity_value: 0.07790 # Default unit is €/kWh.
|
|
286
324
|
- start_date: "2024-01-01"
|
|
287
|
-
|
|
325
|
+
quantity_value: 0.06888 # Default unit is €/kWh.
|
|
288
326
|
```
|
|
289
327
|
|
|
290
328
|
Price is 0.07790 before 2024-01-01.
|
|
@@ -305,7 +343,7 @@ pricing:
|
|
|
305
343
|
value: 0.20 # It is the tax rate in [0, 1.0] <==> [0% - 100%].
|
|
306
344
|
consumption_prices:
|
|
307
345
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
308
|
-
|
|
346
|
+
quantity_value: 0.07790 # Default unit is €/kWh.
|
|
309
347
|
vat_id: "normal" # Reference to the vat rate that is applied for this period.
|
|
310
348
|
```
|
|
311
349
|
|
|
@@ -332,13 +370,13 @@ pricing:
|
|
|
332
370
|
value: 0.0550
|
|
333
371
|
consumption_prices:
|
|
334
372
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
335
|
-
|
|
373
|
+
quantity_value: 0.07790 # Default unit is €/kWh.
|
|
336
374
|
vat_id: "normal" # Reference to the vat rate that is applied for this period.
|
|
337
375
|
subscription_prices:
|
|
338
376
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
377
|
+
time_value: 19.83
|
|
378
|
+
price_unit: "€"
|
|
379
|
+
time_unit: "month"
|
|
342
380
|
vat_id: "reduced"
|
|
343
381
|
```
|
|
344
382
|
|
|
@@ -348,7 +386,7 @@ cost[€] = quantity[kWh] * cons\_price[€/kWh] * (1 + vat[normal]) + sub\_pric
|
|
|
348
386
|
```
|
|
349
387
|
|
|
350
388
|
|
|
351
|
-
Example 6: Transport price
|
|
389
|
+
Example 6: Transport price (fixed fee)
|
|
352
390
|
---
|
|
353
391
|
|
|
354
392
|
A fixed yearly transport may be charged as well.
|
|
@@ -364,18 +402,48 @@ pricing:
|
|
|
364
402
|
value: 0.0550
|
|
365
403
|
consumption_prices:
|
|
366
404
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
367
|
-
|
|
405
|
+
quantity_value: 0.07790 # Default unit is €/kWh.
|
|
368
406
|
vat_id: "normal" # Reference to the vat rate that is applied for this period.
|
|
369
407
|
transport_prices:
|
|
370
408
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
409
|
+
time_value: 34.38
|
|
410
|
+
price_unit: "€"
|
|
411
|
+
time_unit: "year"
|
|
412
|
+
vat_id: reduced
|
|
413
|
+
```
|
|
414
|
+
**Formula:**
|
|
415
|
+
```math
|
|
416
|
+
cost[€] = quantity[kWh] * cons\_price[€/kWh] * (1 + vat[normal]) + trans\_price[€/year] * (1 + vat[reduced])
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Example 6bis: Transport price (based on consumption)
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
Transport can also be charged per kWh consumed.
|
|
423
|
+
|
|
424
|
+
```yaml
|
|
425
|
+
pricing:
|
|
426
|
+
vat:
|
|
427
|
+
- id: normal
|
|
428
|
+
start_date: "2023-06-01"
|
|
429
|
+
value: 0.20
|
|
430
|
+
- id: reduced
|
|
431
|
+
start_date: "2023-06-01"
|
|
432
|
+
value: 0.0550
|
|
433
|
+
consumption_prices:
|
|
434
|
+
- start_date: "2023-06-01"
|
|
435
|
+
quantity_value: 0.07790
|
|
436
|
+
vat_id: "normal"
|
|
437
|
+
transport_prices:
|
|
438
|
+
- start_date: "2023-06-01"
|
|
439
|
+
quantity_value: 0.00194 # €/kWh
|
|
440
|
+
price_unit: "€"
|
|
441
|
+
quantity_unit: "kWh"
|
|
374
442
|
vat_id: reduced
|
|
375
443
|
```
|
|
376
444
|
**Formula:**
|
|
377
445
|
```math
|
|
378
|
-
cost[€] = quantity[kWh] * cons\_price[€/kWh] * (1 + vat[normal]) + trans\_price * (1 + vat[reduced])
|
|
446
|
+
cost[€] = quantity[kWh] * (cons\_price[€/kWh] * (1 + vat[normal]) + quantity[kWh] * trans\_price[€/kWh] * (1 + vat[reduced]))
|
|
379
447
|
```
|
|
380
448
|
|
|
381
449
|
Example 7: Energy taxes
|
|
@@ -394,13 +462,13 @@ pricing:
|
|
|
394
462
|
value: 0.0550
|
|
395
463
|
consumption_prices:
|
|
396
464
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
397
|
-
|
|
465
|
+
quantity_value: 0.07790 # Default unit is €/kWh.
|
|
398
466
|
vat_id: "normal" # Reference to the vat rate that is applied for this period.
|
|
399
467
|
energy_taxes:
|
|
400
468
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
469
|
+
quantity_value: 0.00837
|
|
470
|
+
price_unit: "€"
|
|
471
|
+
quantity_unit: "kWh"
|
|
404
472
|
vat_id: normal
|
|
405
473
|
```
|
|
406
474
|
**Formula:**
|
|
@@ -424,56 +492,97 @@ pricing:
|
|
|
424
492
|
value: 0.20
|
|
425
493
|
consumption_prices:
|
|
426
494
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
495
|
+
quantity_value: 0.07790
|
|
496
|
+
price_unit: "€"
|
|
497
|
+
quantity_unit: "kWh"
|
|
430
498
|
vat_id: normal
|
|
431
499
|
- start_date: "2023-07-01"
|
|
432
|
-
|
|
500
|
+
quantity_value: 0.05392
|
|
433
501
|
- start_date: "2023-08-01"
|
|
434
|
-
|
|
502
|
+
quantity_value: 0.05568
|
|
435
503
|
- start_date: "2023-09-01"
|
|
436
|
-
|
|
504
|
+
quantity_value: 0.05412
|
|
437
505
|
- start_date: "2023-10-01"
|
|
438
|
-
|
|
506
|
+
quantity_value: 0.06333
|
|
439
507
|
- start_date: "2023-11-01"
|
|
440
|
-
|
|
508
|
+
quantity_value: 0.06716
|
|
441
509
|
- start_date: "2023-12-01"
|
|
442
|
-
|
|
510
|
+
quantity_value: 0.07235
|
|
443
511
|
- start_date: "2024-01-01"
|
|
444
|
-
|
|
512
|
+
quantity_value: 0.06888
|
|
445
513
|
- start_date: "2024-02-01"
|
|
446
|
-
|
|
514
|
+
quantity_value: 0.05972
|
|
447
515
|
- start_date: "2024-03-01"
|
|
448
|
-
|
|
516
|
+
quantity_value: 0.05506
|
|
449
517
|
- start_date: "2024-04-01"
|
|
450
|
-
|
|
518
|
+
quantity_value: 0.04842
|
|
451
519
|
- start_date: "2025-01-01"
|
|
452
|
-
|
|
520
|
+
quantity_value: 0.07807
|
|
453
521
|
subscription_prices:
|
|
454
522
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
523
|
+
time_value: 19.83
|
|
524
|
+
price_unit: "€"
|
|
525
|
+
time_unit: "month"
|
|
458
526
|
vat_id: reduced
|
|
459
527
|
- start_date: "2023-07-01"
|
|
460
|
-
|
|
528
|
+
time_value: 20.36
|
|
461
529
|
transport_prices:
|
|
462
530
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
531
|
+
time_value: 34.38
|
|
532
|
+
price_unit: "€"
|
|
533
|
+
time_unit: "year"
|
|
466
534
|
vat_id: reduced
|
|
467
535
|
energy_taxes:
|
|
468
536
|
- start_date: "2023-06-01" # Date of the price. Format is "YYYY-MM-DD".
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
537
|
+
quantity_value: 0.00837
|
|
538
|
+
price_unit: "€"
|
|
539
|
+
quantity_unit: "kWh"
|
|
472
540
|
vat_id: normal
|
|
473
541
|
- start_date: "2024-01-01"
|
|
474
|
-
|
|
542
|
+
quantity_value: 0.01637
|
|
475
543
|
```
|
|
476
544
|
|
|
545
|
+
## What's New in v0.4.0
|
|
546
|
+
|
|
547
|
+
### Enhanced Cost Breakdown
|
|
548
|
+
|
|
549
|
+
Starting from version 0.4.0, Gazpar2HAWS provides detailed cost breakdowns in Home Assistant. In addition to the total cost, separate entities are published for each cost component:
|
|
550
|
+
|
|
551
|
+
- `sensor.${name}_consumption_cost`: Cost from gas consumption (quantity × consumption_price)
|
|
552
|
+
- `sensor.${name}_subscription_cost`: Cost from fixed subscription fees
|
|
553
|
+
- `sensor.${name}_transport_cost`: Cost from transport fees
|
|
554
|
+
- `sensor.${name}_energy_taxes_cost`: Cost from energy taxes
|
|
555
|
+
- `sensor.${name}_total_cost`: Total cost (sum of all components)
|
|
556
|
+
|
|
557
|
+
Where `${name}` is the device name configured in your `configuration.yaml` file (default: `gazpar2haws`).
|
|
558
|
+
|
|
559
|
+
This breakdown allows you to analyze which components contribute the most to your total gas bill over time.
|
|
560
|
+
|
|
561
|
+
### Composite Price Model
|
|
562
|
+
|
|
563
|
+
The new pricing model supports **composite prices** where each price component can have:
|
|
564
|
+
|
|
565
|
+
1. **Quantity component**: Variable cost based on consumption (e.g., €/kWh)
|
|
566
|
+
2. **Time component**: Fixed cost based on time period (e.g., €/month)
|
|
567
|
+
|
|
568
|
+
This provides more flexibility to accurately model your energy provider's billing structure. For example:
|
|
569
|
+
|
|
570
|
+
- **Consumption prices**: Typically have only a quantity component (€/kWh)
|
|
571
|
+
- **Subscription prices**: Typically have only a time component (€/month)
|
|
572
|
+
- **Transport prices**: Can have either a quantity component (€/kWh) or a time component (€/year)
|
|
573
|
+
- **Energy taxes**: Typically have only a quantity component (€/kWh)
|
|
574
|
+
|
|
575
|
+
### ⚠️ Migration Required from v0.3.x
|
|
576
|
+
|
|
577
|
+
**If you are upgrading from v0.3.x**, the pricing configuration format has changed. You must update your configuration file to the new format.
|
|
578
|
+
|
|
579
|
+
**See [MIGRATIONS.md](MIGRATIONS.md) for detailed step-by-step migration instructions** including:
|
|
580
|
+
- Complete before/after examples for each price type
|
|
581
|
+
- Migration checklist
|
|
582
|
+
- Common issues and troubleshooting
|
|
583
|
+
|
|
584
|
+
If you're a new user or already on v0.4.0, you can skip this section.
|
|
585
|
+
|
|
477
586
|
### Environment variable for Docker
|
|
478
587
|
|
|
479
588
|
In a Docker environment, the configurations files are instantiated by replacing the environment variables below in the template files:
|
|
@@ -493,33 +602,67 @@ You can setup them directly in a docker-compose.yaml file (environment section)
|
|
|
493
602
|
|
|
494
603
|
## FAQ
|
|
495
604
|
|
|
496
|
-
|
|
605
|
+
For a comprehensive list of frequently asked questions, see **[FAQ.md](FAQ.md)** which includes:
|
|
606
|
+
|
|
607
|
+
- 📖 **General questions** - What is Gazpar2HAWS, differences from other solutions
|
|
608
|
+
- ⚙️ **Configuration issues** - PCE identifier, reset parameter, environment variables
|
|
609
|
+
- 📊 **Data & statistics** - Missing data, date issues, historical retrieval
|
|
610
|
+
- 💰 **Cost calculation** - Pricing configuration, v0.4.0 migration, new entities
|
|
611
|
+
- 🏠 **Home Assistant integration** - Entity setup, Energy Dashboard, HassIO issues
|
|
612
|
+
- 🐳 **Docker & Add-on** - Installation, logs, version issues
|
|
613
|
+
- 🔧 **Troubleshooting** - Common errors, log messages, bug reporting
|
|
614
|
+
- 🔄 **Migration & upgrades** - Version upgrade guides, breaking changes
|
|
615
|
+
|
|
616
|
+
### Quick Answers
|
|
497
617
|
|
|
498
|
-
|
|
618
|
+
**Is it an official GrDF application?**
|
|
499
619
|
|
|
500
|
-
|
|
620
|
+
No, absolutely not. It was made by reverse engineering GrDF website without any guarantee of long-term operation. Indeed, any modification made to their website risks breaking it.
|
|
501
621
|
|
|
502
|
-
|
|
503
|
-
- [home-assistant-gazpar](https://github.com/ssenart/home-assistant-gazpar) is the first program using PyGazpar. This is a Home Assistant integration which makes it possible to provide an energy sensor. Coupled with the Recorder integration, it is capable of building a history (called statistics in HA) and displaying it using the Energy Dashboard. It is also compatible with the [lovelace-gazpar-card](https://github.com/ssenart/lovelace-gazpar-card).
|
|
504
|
-
- [lovelace-gazpar-card](https://github.com/ssenart/lovelace-gazpar-card) is a HA card which nicely displays historical data in the form of tables or bar graphs. It is also compatible with [Gazpar2MQTT](https://github.com/ssenart/gazpar2mqtt).
|
|
505
|
-
- [Gazpar2MQTT](https://github.com/ssenart/gazpar2mqtt) offers exactly the same functionality as [home-assistant-gazpar](https://github.com/ssenart/home-assistant-gazpar) but runs outside of HA as a standalone application, in a Docker container or in an HA add-on.
|
|
506
|
-
- [Gazpar2HAWS](https://github.com/ssenart/gazpar2haws) replaces the use of home-assistant-gazpar/Gazpar2MQTT with the HA Recorder integration to create a data history (for Energy dashboard integration). The disadvantage of the latter solution is the non-alignment of the actual reading date and its publication date. Reading values are made available for 2 to 5 days (and sometimes longer). [Gazpar2HAWS](https://github.com/ssenart/gazpar2haws) timestamps the reading value exactly to the observation dates without any offset. In addition, [Gazpar2HAWS](https://github.com/ssenart/gazpar2haws) is able to reconstruct the complete history of your data up to 3 years in the past, which is very practical in the event of data loss. Finally, it provides ways to calculate and publish energy costs.
|
|
622
|
+
**What are the differences between PyGazpar, home-assistant-gazpar, Gazpar2MQTT, and Gazpar2HAWS?**
|
|
507
623
|
|
|
508
|
-
-
|
|
624
|
+
- **[PyGazpar](https://github.com/ssenart/PyGazpar)** - Low-level Python library used to query GrDF data
|
|
625
|
+
- **[home-assistant-gazpar](https://github.com/ssenart/home-assistant-gazpar)** - Home Assistant integration providing energy sensor with Recorder/Energy Dashboard support
|
|
626
|
+
- **[Gazpar2MQTT](https://github.com/ssenart/gazpar2mqtt)** - Standalone application that publishes data via MQTT (reduces coupling with HA)
|
|
627
|
+
- **[Gazpar2HAWS](https://github.com/ssenart/gazpar2haws)** - Uses HA Recorder integration directly, timestamps readings to exact observation dates, reconstructs 3-year history, calculates detailed costs
|
|
509
628
|
|
|
510
|
-
|
|
629
|
+
**My PCE ID has a leading zero (e.g. "0123456789") but it's being truncated. Why?**
|
|
630
|
+
|
|
631
|
+
The PCE identifier must be quoted in your YAML configuration. Without quotes, it's interpreted as a number and loses the leading zero.
|
|
632
|
+
|
|
633
|
+
```yaml
|
|
634
|
+
# ✓ Correct
|
|
635
|
+
pce_identifier: "0123456789"
|
|
636
|
+
|
|
637
|
+
# ✗ Wrong - loses leading zero
|
|
638
|
+
pce_identifier: 0123456789
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
See [FAQ.md](FAQ.md) for more questions and detailed answers.
|
|
511
642
|
|
|
512
643
|
## Troubleshooting
|
|
513
644
|
|
|
645
|
+
For comprehensive troubleshooting guidance, see **[FAQ.md](FAQ.md#troubleshooting)** which includes:
|
|
646
|
+
|
|
647
|
+
- Common log messages and their meanings
|
|
648
|
+
- Step-by-step debugging procedures
|
|
649
|
+
- Solutions to known issues from GitHub
|
|
650
|
+
- Error handling guides
|
|
651
|
+
|
|
652
|
+
### Quick Troubleshooting Steps
|
|
653
|
+
|
|
514
654
|
Sometimes, for any reason, the application does not work as expected. No entities is created in HA, some error messages are displayed, nothing happens...
|
|
515
655
|
|
|
516
|
-
In this situation
|
|
656
|
+
**In this situation:**
|
|
517
657
|
|
|
518
|
-
|
|
658
|
+
1. **Check the log file** - This is the most valuable troubleshooting tool
|
|
659
|
+
2. **Enable debug logging** - Set `logging.level: debug` in your configuration
|
|
660
|
+
3. **Verify configuration syntax** - Use a YAML validator
|
|
661
|
+
4. **Check [FAQ.md](FAQ.md)** - Many common issues are already documented
|
|
519
662
|
|
|
520
663
|
If your configuration is correct, you may have spotted a bug.
|
|
521
664
|
|
|
522
|
-
In this case, capture a
|
|
665
|
+
In this case, capture a GitHub issue [here](https://github.com/ssenart/gazpar2haws/issues) with the following information:
|
|
523
666
|
1. What kind of setup do you use ? Standalone application, Docker container or HA addon.
|
|
524
667
|
2. Is this a first installation or a version upgrade ? If upgrading version, what was the previous version and did it work well ?
|
|
525
668
|
3. Describe as precisely as possible what is happening.
|
|
@@ -527,7 +670,7 @@ In this case, capture a Github issue [here](https://github.com/ssenart/gazpar2ha
|
|
|
527
670
|
|
|
528
671
|
The first log lines should be similar to:
|
|
529
672
|
```log
|
|
530
|
-
2025-02-17 02:01:17,626 INFO [__main__] Starting Gazpar2HAWS version 0.
|
|
673
|
+
2025-02-17 02:01:17,626 INFO [__main__] Starting Gazpar2HAWS version 0.4.0
|
|
531
674
|
2025-02-17 02:01:17,627 INFO [__main__] Running on Python version: 3.12.9 (main, Feb 7 2025, 01:03:02) [GCC 12.2.0]
|
|
532
675
|
```
|
|
533
676
|
|
|
@@ -577,9 +720,28 @@ All the gazpar2haws images are available [here](https://hub.docker.com/repositor
|
|
|
577
720
|
|
|
578
721
|
## Contributing
|
|
579
722
|
|
|
580
|
-
Pull requests are welcome
|
|
723
|
+
Pull requests are welcome! For any change proposal, please open an issue first to discuss what you would like to change.
|
|
724
|
+
|
|
725
|
+
### Before Contributing
|
|
726
|
+
|
|
727
|
+
1. **Read [CLAUDE.md](CLAUDE.md)** - Developer guide with:
|
|
728
|
+
- Architecture overview
|
|
729
|
+
- Development commands (setup, testing, linting)
|
|
730
|
+
- Code structure and patterns
|
|
731
|
+
- Testing guidelines
|
|
732
|
+
|
|
733
|
+
2. **Check [TODO.md](TODO.md)** - For planned improvements and test coverage gaps
|
|
734
|
+
|
|
735
|
+
3. **Review [CHANGELOG.md](CHANGELOG.md)** - To understand recent changes and version history
|
|
736
|
+
|
|
737
|
+
### Contribution Guidelines
|
|
581
738
|
|
|
582
|
-
|
|
739
|
+
- Write tests for new features (see [TODO.md](TODO.md) for test coverage goals)
|
|
740
|
+
- Follow existing code style and patterns
|
|
741
|
+
- Update documentation (README.md, FAQ.md) as appropriate
|
|
742
|
+
- Add entries to CHANGELOG.md for your changes
|
|
743
|
+
- Ensure all tests pass: `poetry run pytest`
|
|
744
|
+
- Run linters: `poetry run pylint gazpar2haws`
|
|
583
745
|
|
|
584
746
|
## License
|
|
585
747
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
gazpar2haws/__init__.py,sha256=3MCDQdGGmT3FQMKaAB3mBJq7L75T_bJSdpDRjE-pado,58
|
|
2
|
+
gazpar2haws/__main__.py,sha256=KeMtuQAJP7LJigqfSX-RSdZI_yz-7vpoJwFNnqtscIw,3263
|
|
3
|
+
gazpar2haws/bridge.py,sha256=VEl22xt2Szgk_FVrxSvZNxp3T5Q2JXc9ulfrunHHkmo,3685
|
|
4
|
+
gazpar2haws/config_utils.py,sha256=yT2G-naMA2Vst6bQdm1bD2oVsPTU3Q_RuukCs-dZ6Ak,2280
|
|
5
|
+
gazpar2haws/configuration.py,sha256=24q8FUBMS1vpqU6RYAv5Au179HbiBk1CZIEMiBGuXq0,722
|
|
6
|
+
gazpar2haws/date_array.py,sha256=q3xTX-KS2KOtFSB042OJVerZFtS-Jw9Iin5RHKnobPs,10108
|
|
7
|
+
gazpar2haws/datetime_utils.py,sha256=eqUvezYwjsRxhORKadrOPmjG4iVkIpVUQzkytwAPwJQ,4071
|
|
8
|
+
gazpar2haws/gazpar.py,sha256=-ka3---r_0WM0JZ5v7RCgygJrVYqlGTrqg7-EwvyttA,19963
|
|
9
|
+
gazpar2haws/haws.py,sha256=JIAovE_bZpop5nmREeWGT9Sov8Z7bmap4qUs_asD1aY,13024
|
|
10
|
+
gazpar2haws/model.py,sha256=PZAr0M-xcFMzdPS4f80BATGCn4FTzdSwN5p3Q4RprCg,9036
|
|
11
|
+
gazpar2haws/pricer.py,sha256=du3WVePsG7TwNIXsEjbMBp6d_Lk4qKwQ3WQYwSwWRns,31247
|
|
12
|
+
gazpar2haws/version.py,sha256=9Iq5Jm63Ev7QquCjhDqa9_KAgHdKl9FJHynq8M6JNrY,83
|
|
13
|
+
gazpar2haws-0.4.0.dist-info/METADATA,sha256=voG2Ra4mlnWXqU6I7svw9ASR0grcGj090U_GSPOB6Cs,27099
|
|
14
|
+
gazpar2haws-0.4.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
15
|
+
gazpar2haws-0.4.0.dist-info/licenses/LICENSE,sha256=ajApZPyhVx8AU9wN7DXeRGhoWFqY2ylBZUa5GRhTmok,1073
|
|
16
|
+
gazpar2haws-0.4.0.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
gazpar2haws/__init__.py,sha256=3MCDQdGGmT3FQMKaAB3mBJq7L75T_bJSdpDRjE-pado,58
|
|
2
|
-
gazpar2haws/__main__.py,sha256=KeMtuQAJP7LJigqfSX-RSdZI_yz-7vpoJwFNnqtscIw,3263
|
|
3
|
-
gazpar2haws/bridge.py,sha256=VEl22xt2Szgk_FVrxSvZNxp3T5Q2JXc9ulfrunHHkmo,3685
|
|
4
|
-
gazpar2haws/config_utils.py,sha256=yT2G-naMA2Vst6bQdm1bD2oVsPTU3Q_RuukCs-dZ6Ak,2280
|
|
5
|
-
gazpar2haws/configuration.py,sha256=24q8FUBMS1vpqU6RYAv5Au179HbiBk1CZIEMiBGuXq0,722
|
|
6
|
-
gazpar2haws/date_array.py,sha256=q3xTX-KS2KOtFSB042OJVerZFtS-Jw9Iin5RHKnobPs,10108
|
|
7
|
-
gazpar2haws/gazpar.py,sha256=XcfT_U4QiHmg0P9pO4boueDLr52UXR2GBKdRmhu8BQw,14586
|
|
8
|
-
gazpar2haws/haws.py,sha256=1ELdompdACNf5XkpjCN6Bdiw7stPfzar3x8OjoBmhxQ,7969
|
|
9
|
-
gazpar2haws/model.py,sha256=RnKmWVLkzLsS_-r60CjXgzRfzoj_GopBAYBEuZjDT_I,7105
|
|
10
|
-
gazpar2haws/pricer.py,sha256=7xlLlPU6pXQcOnyaeoR_UEQOwuPwUG_V17FvPgSxzmM,22434
|
|
11
|
-
gazpar2haws/version.py,sha256=9Iq5Jm63Ev7QquCjhDqa9_KAgHdKl9FJHynq8M6JNrY,83
|
|
12
|
-
gazpar2haws-0.3.3.dist-info/LICENSE,sha256=ajApZPyhVx8AU9wN7DXeRGhoWFqY2ylBZUa5GRhTmok,1073
|
|
13
|
-
gazpar2haws-0.3.3.dist-info/METADATA,sha256=Hld9M1-coBenBqJQWK6ZCwsp0hSMsnXuUDw6FgQUCm8,22170
|
|
14
|
-
gazpar2haws-0.3.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
15
|
-
gazpar2haws-0.3.3.dist-info/RECORD,,
|
|
File without changes
|