Is it possible to delete a custom dataset?
For testing I created a remote and had to create an (empty) custom dataset.
Then I deleted the remote an wanted to re-create the remote with a new custom dataset but I was told that a custom dataset with the same name already exists.
Unfortunately I couldn’t find a way to delete or even find this dataset - only download was possible.
Is it possible to delete an orphaned custom dataset or maybe re-attach a custom dataset to a different remote?
Yes, this is possible, but not via the GUI a. k. a. Web Configuriator.
First you need an API key. The command looks like this, for example, and should work just like this at the beginning (the command only works like this in a Linux terminal):
curl -X 'POST' 'http://<IP-address_of_your_remote>/api/auth/api_keys' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"name": "<name_for_the_key>", "scopes":["admin"]}'
After that you can use
curl -X 'GET' 'http://<IP-address_of_your_remote>/api/ir/codes/custom?page=1&limit=10&delimiter=%2C' -H 'accept: application/json' -H 'authorisation: Bearer <your_API-key>'
to show all custom IR codes.
With
curl -X 'DELETE' 'http://<IP-address_of_your_Remote>/api/ir/codes/custom/<Device-ID>' -H 'accept: application/json' -H 'accept: application/json' -H 'authorisation: Bearer <Your_API-Key>'
you can then delete it specifically.
If it is your only custom IR code so far, you can delete it with
curl -X 'DELETE' 'http://<IP-address_your_remote>/api/ir/codes/custom' -H 'accept: application/json' -H 'accept: application/json' -H 'authorization: Bearer <your_API-Key>'
to delete all custom IR codes directly.
Everything in angle brackets including the brackets must of course be replaced by your values beforehand.
You can find the API descriptions by entering only the IP address of your remote in the browser and then going to Core-API REST under API definitions.
You don’t even need an API key for this and can just use your PIN as explained here: [bug] User-created IR-Sets do not appear in the dropdown when creating a new remote, but block creating a new ir-set with the same name · Issue #4 · unfoldedcircle/feature-and-bug-tracker · GitHub
Replace $IP, $PIN and in the second command $DEVICE_ID with the matching one you got from the first command
Retrieve all custom codesets:
curl ‘http://$IP/api/ir/codes/custom?page=1&limit=100’ -u ‘web-configurator:$PIN’
Delete a codeset (if it’s no longer used):
curl --request DELETE ‘http://$IP/api/ir/codes/custom/$DEVICE_ID’ -u ‘web-configurator:$PIN’
1 Like
Ok, great. Thank you both.
I’ll try that.