Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions elhub_sdk/acknolwedgment.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
request have been acknowledged.

"""

import logging
import uuid
from datetime import datetime
Expand Down Expand Up @@ -54,7 +55,7 @@ def acknowledge_poll(

"""

factory = client.type_factory('ns4')
factory = client.type_factory('ns7')
eh_request = factory.Acknowledgement(
Header={
'Identification': uuid.uuid4(),
Expand All @@ -81,7 +82,7 @@ def acknowledge_poll(
},
ProcessEnergyContext={ # https://dok.elhub.no/ediel2/general#General-Process
'EnergyBusinessProcess': {
'_value_1': BSR_IDS.METERING_VALUES.value,
'_value_1': BSR_IDS.POLL.value,
'listAgencyIdentifier': LIST_AGENCY_IDENTIFIER.ELHUB.value,
},
'EnergyBusinessProcessRole': {
Expand All @@ -100,7 +101,7 @@ def acknowledge_poll(
)

try:
response = client.service.Acknowledge(eh_request)
response = client.service.AcknowledgePoll(eh_request)
if history.last_received:
return True
logger.error(f"Unknown error: {response}")
Expand Down
2 changes: 1 addition & 1 deletion elhub_sdk/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class BSR_IDS(Enum):
METERING_VALUES = "BRS-NO-315"
THIRD_PARTY = "BRS-NO-622"
METERING_POINT_CHARACTERISTICS = "BRS-NO-611"
POLL = "POLL"


class ROLES(Enum):
Expand Down Expand Up @@ -90,7 +91,6 @@ class THIRD_PARTY_ACTION(Enum):
UPDATE = "Update"



class STATUS_TYPE(Enum):
"""
Status Type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_acknowledge_poll_metering_values():

client, history = APIClient.get_client(
environment=ElHubEnvironment.TEST,
service=ElHubService.METERING_VALUES,
service=ElHubService.POOL_METERING_VALUES,
key_file=KEY_FILE,
cert_file=CERT_FILE,
)
Expand Down