Adding support for the Meural Canvas II digital painting

I’m a non-coder, so I have no idea if this is feasible, but a few months ago we purchased a Netgear Meural Canvas II.

They’ve since released a REST API for it, which they’ve documented here:

https://documenter.getpostman.com/view/1657302/RVnWjKUL?version=latest

I’m not sure if this is a massive amount of work, or how to look at it, or if it is of interest? Since I’m apparently the first one to post about this, I’m guessing not many people own a Canvas or would appreciate support. But the option for me to toggle on/off and set certain pictures through Home Assistant would be great.

Hello,

The meural canvas has a web server with rest commands, you can find the remote at CanvasIp/remote

I just put together a little configuration using this web remote if you are interested.

First of all you need to setup a fixed ip for your Canvas (you can do that via the admin page of your isp router).

By adding this to your configuration.yaml you will allow Home Assistant to execute the basic commands of the meural

rest_command:      
  meural_left:
    url: "http://MEURAL_FIXED_IP/remote/control_command/set_key/left"
    verify_ssl: false
  meural_right:
    url: "http://MEURAL_FIXED_IP/remote/control_command/set_key/right"
    verify_ssl: false
  meural_up:
    url: "http://MEURAL_FIXED_IP/remote/control_command/set_key/up"
    verify_ssl: false
  meural_down:
    url: "http://MEURAL_FIXED_IP/remote/control_command/set_key/down"
    verify_ssl: false
  meural_suspend:
    url: "http://MEURAL_FIXED_IP/remote/control_command/suspend"
    verify_ssl: false
  meural_resume:
    url: "http://MEURAL_FIXED_IP/remote/control_command/resume"
    verify_ssl: false
  meural_autocalibratebacklight:
    url: "http://MEURAL_FIXED_IP/remote/control_command/als_calibrate/off"
    verify_ssl: false
  meural_setlandscape:
    url: "http://MEURAL_FIXED_IP/remote/control_command/set_orientation/landscape"
    verify_ssl: false
  meural_setbacklight:
    url: "http://MEURAL_FIXED_IP/remote/control_command/set_backlight/{{ states('input_number.meural_canvas_backlight') }}"
    verify_ssl: false
  meural_setportrait:
    url: "http://MEURAL_FIXED_IP/remote/control_command/set_orientation/portrait"
    verify_ssl: false

The “set_backlight” command is using a template to set the backlight at the value of “input_number.meural_canvas_backlight” which you define by adding this

input_number:
  meural_canvas_backlight:
    initial: 80
    min: 0
    max: 100
    step: 1

It can be useful to see the current backlight of the canvas so i added a sensor polling the canvas

sensor:
  - platform: rest
    resource: http://MEURAL_FIXED_IP/remote/get_backlight
    name: Meural Backlight
    value_template: '{{value_json.response}}'

With all that added to the configuration.yaml I’ve configured the ui so that when you tap on the backlight slider it sets the backlight to the desired value

entities:
  - entity: sensor.meural_backlight
    name: ' '
  - entity: input_number.meural_canvas_backlight
    name: Luminosité
    tap_action:
      action: call-service
      service: rest_command.meural_setbacklight
title: Meural Canvas
type: entities

With the other basic rest commands it looks like that
Annotation 2020-05-11 203624

Cheers

1 Like

Thanks for this! I added this as a package and it works for me.

I’m curious where the REST api is documented? The link at the top of the thread seems to be about their online REST API, not the local device’s - atl east, I couldn’t find the methods you’re using.

For example, I’d like to be able to have homeassistant turn off and on based on a timer or motion detection. Do you have a link to the device API?

Hi !

Regarding the rest commands I went to the meural remote page and used the network tab (under inspect) in chrome to discover the rest commands to the remote.
You can use those rest commands in HA for automation once you’ve defined them in the config file.
Suspend / resume for off / on

Cheers

Ah, what’s the remote page? It sounds like you’re saying you can access the built-in web server on the device?

When I go to http://meural/ I get a 401 and I can see it’s running a Ubuntu service, but that’s it. What URL are you accessing to get to a remote?

doh - http://meural/remote/ works for me, and I had no idea it existed.

Is there a place one can download this package :slight_smile: can it be released as a HACS add-on?

I’ve been working on a Meural HA integration for the past few weeks, having purchased one last month. I’m not actually a dev, so there’s probably a lot in there that can be improved, but it’s been working pretty well for my device so far:

I’m continuing work on my Meural integration, so if you’ve tried it out before, it’s worth updating to new code. I don’t really have a version release system because this is just me experimenting as I go, but I’m trying to keep the master stable and all my really gory code in separate branches.

For an idea of what it looks like, my integration sets your Canvas up as a media player. This way all regular media player services work as you’d expect - you can turn the Canvas on or off, pause and play, go to previous/next image, change playlists and set shuffle. It will retrieve artwork thumbnail, artwork title and artist name to display in the Media Control card. Looks like this in Lovelace:

And if you click on the entity details you have some more controls:

There are also some service calls registered under the meural.xxx domain that will let you set brightness, reset the brightness based on current ambient light, set device options on the Meural server, or toggle display of the information card on your device.

Additionally, because it’s set up as a media player, it can be exposed to Google Assistant (as opposed to the Alexa-only support that Meural offers) via Nabu Casa or your manually configured setup. As a proof of concept I posted this video to Twitter:

Very neat! Would love to try it out. I’ve downloaded it, moved meural/ into custom_components/ and restarted. The log shows that it’s loading the component (and warning about it being experimental)

However, I don’t see anything in integrations when I search either netgear or meural.

The docs say this: “Log in with your Netgear account when setting up the integration.”

Can you be a bit more specific about what integration to add?

Ok, clearing the cache on the integrations helped and I was able to add a Meural integration. I gave username and password, it claims success.

No media_player.meural entity is getting created though. The meural. services exist. The log file only shows that it’s creating the domain and trying to create the entity:

2020-05-29 20:15:25 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.meural
2020-05-29 20:15:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=meural, service=set_brightness>
2020-05-29 20:15:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=meural, service=reset_brightness>
2020-05-29 20:15:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=meural, service=toggle_informationcard>
2020-05-29 20:15:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=meural, service=set_device_option>

It doesn’t seem to be attempting to long in using my credentials?

Oh, let me try and help you out with that! But let’s move it to this components topic to keep everything nice and orderly :slight_smile:

update: you can now find it in HACS without having to add it as a custom repository. That should make it easy for anyone to install!

Not the person you asked it from, but the integration I built (and @thomasvs kindly contributed to) is now available to install via HACS as a custom repository.