hummingbot / brokers

This repository contains different brokers that can be used to communicate multiple instances of Hummingbot, or send information to the bots.
Apache License 2.0
22 stars 13 forks source link

Unable to Start/Stop HBOT through RPC #5

Open HESSEBO opened 1 year ago

HESSEBO commented 1 year ago

Environment: Linux Docker

I am trying start start/stop HBOT through Nodred Flows through MQTT inject node, after connecting both HBOT and nodred to the same topic. I can see HBOT on the logs saying that: ''rpc - could not unpack request message 'data'

My guess that probably my triggering command start/stop is recognized by hbot instance, may be I didn't inject the right command to trigger. I tried the following command on the inject node:

{ "name":"start", "command":"start" } start, stop etc... All didn't work

image

capponMatteo commented 1 year ago

Hi 😁 I was doing the same from a node.js application and I had to go through the source code of commlib and the MQTT bridge itself to get it, but this is the format you're supposed to use when sending messages:

const createStartCommand = () => JSON.stringify(({
  header: {
    reply_to: RESPONSE_TOPIC,
    timestamp: Date.now(),
  },
  data: {}
}));

Where RESPONSE_TOPIC is a string constant specifying the topic on which you'd like to get the response sent to. Hope this is helpful, let me know how it goes 😁