Exemple #1
0
 def on_boot_notification(self, charge_point_vendor, charge_point_model,
                          **kwargs):
     return call_result.BootNotificationPayload(
         current_time=datetime.utcnow().isoformat(),
         # interval=300,
         interval=3,
         status=RegistrationStatus.accepted)
    def on_boot_notification(**kwargs):  # noqa
        assert kwargs['firmware_version'] == "#1:3.4.0-2990#N:217H;1.0-223"

        return call_result.BootNotificationPayload(
            current_time='2018-05-29T17:37:05.495259',
            interval=350,
            # 'Yolo' is not a valid value for for field status.
            status='Yolo',
        )
Exemple #3
0
    async def _on_boot_notification(
            self, charge_point_vendor, charge_point_model,
            **kwargs) -> call_result.BootNotificationPayload:
        self._data_object.boot_timestamp = utc_datetime()
        self._session.commit()

        return call_result.BootNotificationPayload(
            current_time=utc_datetime().isoformat(),
            interval=60,
            status=RegistrationStatus.accepted)
 async def on_boot_notification(self, **kwargs):
     print("on_boot_notification")
     payload = call.BootNotificationPayload(**kwargs)
     await self.register_charging_station(self.id,
                                          payload)  # make internal call
     return call_result.BootNotificationPayload(
         current_time=datetime.utcnow().isoformat(),
         interval=10,
         status="Accepted",
     )
    def on_boot_notification(charge_point_model, charge_point_vendor,
                             **kwargs):  # noqa
        assert charge_point_vendor == "Alfen BV"
        assert charge_point_model == "ICU Eve Mini"
        assert kwargs['firmware_version'] == "#1:3.4.0-2990#N:217H;1.0-223"

        return call_result.BootNotificationPayload(
            current_time='2018-05-29T17:37:05.495259',
            interval=350,
            status='Accepted',
        )
Exemple #6
0
async def on_boot_notification(
    *, payload: call.BootNotificationPayload, context: HandlerContext
) -> call_result.BootNotificationPayload:
    id = context.charging_station_id
    print(f"(Central System) on_boot_notification Charging Station {id=}")
    # Do something with the payload...
    return call_result.BootNotificationPayload(
        current_time=datetime.utcnow().isoformat(),
        interval=10,
        status=RegistrationStatus.accepted,
    )
Exemple #7
0
 def on_boot_notification(self, **payload):
     """
     Callback function for BootNotification messages
     """
     logger.console("=> BootNotification " + str(payload))
     if "BootNotification" in self.__awaited_msgs:
         self.__msgq.put(call.BootNotificationPayload(**payload))
     return call_result.BootNotificationPayload(
         current_time=datetime.utcnow().isoformat(),
         interval=5,
         status='Accepted'
         )
Exemple #8
0
    def on_boot_notification(self, **kwargs):
        print("cp -> server , on_boot_notification: \n", kwargs, "\n")
        self.export_json_file(kwargs, "./dataFromCp2Server",
                              "BootNotification.req")

        response = call_result.BootNotificationPayload(
            current_time=datetime.utcnow().isoformat(),
            interval=10,
            status=RegistrationStatus.accepted)

        self.export_json_file(response.__dict__, "./dataFromCp2Server",
                              "BootNotification.con")
        print("server -> cp, on_boot_notification: \n", response, "\n")
        return response
 def on_boot_notification(self, charge_point_model, charge_point_vendor,
                          **kwargs):
     """ Route BootNotification calls. """
     return call_result.BootNotificationPayload(
         current_time="", interval=30, status=RegistrationStatus.accepted)