import requests
import time

payload = {
    "deviceId": "demo-device-1",
    "ts": int(time.time() * 1000),
    "telemetry": {
        "soil_moisture": 22.5,
        "air_temp": 19.7
    },
    "assetRef": {"source": "thingsboard", "deviceId": "demo-device-1"}
}

resp = requests.post("http://localhost:8800/ingest/thingsboard", json=payload, timeout=20)
print(resp.status_code, resp.text)
