Hy home assistant ninjas,
I own a Canvia Picture Frame from the initial kickstarter campaign. The canvia is a similar device like the meural from Netgear which has a custom integration. The Canvia unfortunatelly has not. I want to integrate the canvia into HA.
I was able to reverse engineer some of the REST API calls … and I must admit I am new to this level of coding.
However … I can already select next/prev picture with these calls:
rest:
- scan_interval: 360
resource: http://canvia.ip/commands/get-current-image
sensor:
- name: Canvia Title
value_template: "{{ value_json.title }}"
rest_command:
canvia_next:
url: http://canvia.ip/commands/next
method: POST
canvia_previous:
url: http://canvia.ip/commands/previous
method: POST
Additionally with postman I am able to toggle a setting (show plate with picture information).
Via postman works like a charm. Howerver with HA yaml it does not work.
# none/partial/full
canvia_overlay_mode:
url: http://canvia.ip/commands/overlay-mode
method: POST
payload: '{"mode":"{{ mode }}"}' # none/full/partial
and the respective service call
service: rest_command.canvia_overlay_mode
data:
mode: none
the display mode won’t turn off. I would appretiate some hints how to get this going.
I tried a similar approach for toggling the screen on/off via a REST switch without success.
switch:
- platform: rest
name: "Canvia"
resource: http://canvia.ip/commands/do_sleep
state_resource: http://canvia.ip/commands/do_sleep
body_on: '{ "do_sleep": "false" }'
body_off: '{ "do_sleep": "true" }'
is_on_template: '{{ value_json.do_sleep == "false" }}'
headers:
Content-Type: application/json
I suspect the content length header … bc if I turn this off in postman … the call from postman is not successful either.
I dont know enough yet to further debug this and hope someone in the community has more knowledge and could help out.
At the end I would like to see a custom component similar like the one available for Meural.
Regards.
Ralf