Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Start/Stop HBOT through RPC #5

Open
HESSEBO opened this issue Jul 16, 2023 · 1 comment
Open

Unable to Start/Stop HBOT through RPC #5

HESSEBO opened this issue Jul 16, 2023 · 1 comment

Comments

@HESSEBO
Copy link

HESSEBO commented Jul 16, 2023

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
Copy link

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 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants