Bug: Unable to enable thing using bootstrap
nyagamunene opened this issue · comments
What were you trying to achieve?
I was trying to connect a thing to the channels by using curl request to the things service.
What are the expected results?
The expected result is a successful response indicating that the thing has been connected to the channel.
What are the received results?
This was the received results. When setting the state to 1 this is the result.
And this is the logs from the bootstrap service.
And this is the logs from the things service.
Steps To Reproduce
- Run Magistrala using command
make run
- Run Bootstrap service using command
make run_addons bootstrap
- Created new thing and channel.
- Create bootstrap configuration of the thing and channel
- Connect the thing to the channels using the following request:
curl -s -S -i -X PUT -H "Authorization: Bearer <user_token>" -H "Content-Type: application/json" http://localhost:9013/things/state/<thing_id> -d '{"state": 1}'
In what environment did you encounter the issue?
Docker
Additional information you deem important
This issue is preventing the thing from being connected to the channels, which is a critical functionality.For more details, Please refer below bootstrap doc
https://docs.magistrala.abstractmachines.fr/bootstrap/
If the connection between the 'thing_id' and 'channel_id' was established through the User Interface (UI), then the disconnection should also be performed through the UI. Similarly, if the connection was established using the curl
command in the terminal, the disconnection should also be executed using a curl
command in the terminal.
As it stands, there is no interchangeability between the two methods. In other words, a connection made through the UI cannot be disconnected using a curl
command in the terminal, and vice versa. Each method of connection requires its corresponding method of disconnection.