Initial Cariflex project
- 40 FlexMeasures assets (10 PV, 10 Bat, 10 Chg, 10 EV) - Geolocated on Martinique - Documentation: architecture, deployment, concepts - Standards: Flex Ready, S2, OpenADR, EPEX SPOT - R&D tools: HAMLET, OPLEM, lemlab - Map patch: Mapbox -> OpenStreetMap
This commit is contained in:
29
scripts/test_connection.py
Normal file
29
scripts/test_connection.py
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Cariflex - Create FlexMeasures assets via API client."""
|
||||
|
||||
import time
|
||||
from flexmeasures_client import FlexMeasuresClient
|
||||
|
||||
# Connect to FlexMeasures
|
||||
client = FlexMeasuresClient(
|
||||
email="admin@digitribe.fr",
|
||||
password="Digitribe972",
|
||||
host="flexmeasures.digitribe.fr",
|
||||
ssl=True,
|
||||
request_timeout=60.0
|
||||
)
|
||||
|
||||
print("✅ Connected to FlexMeasures")
|
||||
|
||||
# Get access token
|
||||
token = client.access_token
|
||||
print(f"🔑 Token: {token[:20]}...")
|
||||
|
||||
# Check existing assets
|
||||
try:
|
||||
assets = client.get_assets()
|
||||
print(f"📦 Existing assets: {len(assets)}")
|
||||
for a in assets[:5]:
|
||||
print(f" - {a}")
|
||||
except Exception as e:
|
||||
print(f"Error getting assets: {e}")
|
||||
Reference in New Issue
Block a user