ioBroker.simple-api
ioBroker.simple-api copied to clipboard
Add get/setBinaryState
Describe the bug
I'm not able to get binary information of states
To Reproduce
- Create a state with type
file
- Use
setBinaryState
to store binary information (like an image) - Call
http://ip:8087/getPlainValue/your.state.id
- See error
error: datapoint "[object Object]" not found
Expected behavior
Return the binary information of state
Versions:
- Adapter version: 2.6.2
- JS-Controller version: 3.3.22
- Node version: v14.18.1
- Operating system: Linux Debian Bullseye
Additional issue:
https://github.com/ioBroker/ioBroker.simple-api/blob/e74ee7040565e8d0597d2f5bce014f2322c5d7ac/lib/simpleapi.js#L831
originId
contains my translated name object:
{"en":"Thumbnail","de":"Miniaturansicht","ru":"Миниатюра","pt":"Miniatura","nl":"Miniatuur","fr":"La vignette","it":"Miniatura","es":"Miniatura","pl":"Miniaturka","zh-cn":"缩略图"}
So... error: datapoint "[object Object]" not found
is not true. It was found.
my idea would to to introduce a "getBinaryValue" endoint ...
The "name" topic will be fixed. binary state support is an enhancement for later