Can someone give me a tip what I am doing wrong with scheduling the actuator agent in my agent code to scrape some BACnet data?
_now = get_aware_utc_now()
str_start = format_timestamp(_now)
_end = _now + td(seconds=10)
str_end = format_timestamp(_end)
peroidic_schedule_request = ["slipstream_internal/slipstream_hq/1100", # AHU
"slipstream_internal/slipstream_hq/5231", # eGuage Main
"slipstream_internal/slipstream_hq/5232", # eGuage RTU
"slipstream_internal/slipstream_hq/5240"] # eGuage PV
# send the request to the actuator
result = self.vip.rpc.call('platform.actuator', 'request_new_schedule', self.core.identity, 'my_schedule', 'HIGH', peroidic_schedule_request).get(timeout=90)
_log.debug(f'[Conninuous Roller Agent INFO] - ACTUATOR SCHEDULE EVENT SUCESS {result}')
meter_data_to_get = [self.ahu_clg_pid_topic,self.kw_pv_topic,self.kw_rtu_topic,self.kw_main_topic]
rpc_result = self.vip.rpc.call('platform.actuator', 'get_multiple_points', meter_data_to_get).get(timeout=90)
_log.debug(f'[Conninuous Roller Agent INFO] - kW data is {rpc_result}!')
The RPC request is working, I can get the data but there is an actuator agent error.
{'result': 'FAILURE', 'data': {}, 'info': 'MALFORMED_REQUEST: ValueError: too many values to unpack (expected 3)'}
Full Traceback:
2021-09-13 20:47:23,334 (actuatoragent-1.0 1477601) __main__ ERROR: bad request: {'time': '2021-09-13T20:47:23.334762+00:00', 'requesterID': 'platform.continuousroller', 'taskID': 'my_schedule', 'type': 'NEW_SCHEDULE'}, [], too many values to unpack (expected 3)
2021-09-13 20:47:23,338 (continuousrolleragent-0.1 1559787) __main__ DEBUG: [Conninuous Roller Agent INFO] - ACTUATOR SCHEDULE EVENT SUCESS {'result': 'FAILURE', 'data': {}, 'info': 'MALFORMED_REQUEST: ValueError: too many values to unpack (expected 3)'}
2021-09-13 20:47:23,346 (forwarderagent-5.1 1548751) __main__ DEBUG: publish_to_historian number of items: 1
2021-09-13 20:47:23,346 (forwarderagent-5.1 1548751) __main__ DEBUG: Lasttime: 0 currenttime: 1631566043.0
2021-09-13 20:47:23,350 (forwarderagent-5.1 1548751) __main__ DEBUG: handled: 1 number of items
2021-09-13 20:47:23,710 (continuousrolleragent-0.1 1559787) __main__ DEBUG: [Conninuous Roller Agent INFO] - kW data is [{'slipstream_internal/slipstream_hq/1100/Cooling Capacity Status': 76.46278381347656, 'slipstream_internal/slipstream_hq/5231/REGCHG total_power': 59960.0, 'slipstream_internal/slipstream_hq/5232/REGCHG total_rtu_power': 44507.0, 'slipstream_internal/slipstream_hq/5240/REGCHG Generation': 1477.0}, {}]!