HA-meural: custom integration for Netgear Meural Canvas digital art frames

Gave it a shot tonight but I’m afraid dealing with retrieving the image from a given URL, then POSTing that image to the remote/postcard call is a few bridges too far for me right now. No experience at all with doing that in python.

I’ll have to learn how to write components in HA at some point.

If you can point me to where in the code you’d add it, I can take a look at adding it?

Sure! If you go to the dev branch:

I created the service preview_image in media_player.py, which calls the function self.local_meural.send_postcard with the image URL.

That function is defined at the bottom in pymeural.py:


Which should take that image URL and turn that into image data we can then POST request to /remote/postcard/…

Would be awesome if you’re able to add this :slight_smile:

Give this pull request a go: https://github.com/GuySie/ha-meural/pull/15

I spent way too long diving into the depths of aiohttp chasing down a bug, when in the end it looks like there may just be a bug in the Meural web server. Both through this and with the remote web control, uploading an image sometimes makes the meural display a previously uploaded image. When it hits that state, I can’t recover. A reboot helps.

Do you have a v2 Meural or an original one?

1 Like

Thanks, that’s awesome! I’m running your code now, this seems to work perfectly. Haven’t managed to crash it out to a previously uploaded image yet, either. I’m just torn if this should be a part of play_media because it’s not actually playing (changing the current item being displayed) but previewing.

I’ve got the v2. Don’t really know if there are really any differences between the two, aside from the frame and the smaller 21" size they added to the v2 line-up.

I did it that way because that’s how it works for chromecast (see Display image on chromecast)

I’m not sure about the distinction of playing vs previewing - is previewing something specific supported by media_player entities?

Given that sending the image this way is permanent until you take a user action, it feels more like playing than previewing to me.

What web server version does your meural report? Mine says Server: Apache/2.4.7 (Ubuntu)

What OS version does your meural report? My app says it’s 2.0.8 (updated it yesterday, it was 2.0.7 before)

Previewing is a term Meural uses for sending an image to the Canvas to be displayed that is not officially on that device yet; it’s normally used to preview art you might want to buy from their art collection on the large screen.

Ah, this seems to be different for us. It is not permanent for me - it displays exactly as long as the preview duration you can set through the Meural web interface - that’s why I’m pretty sure postcard is the same as Meural’s preview system. I had that set to 60 seconds so after a minute it went back to my original playlist.

Server says: Apache/2.4.18 (Ubuntu)
Meural app says: 2.1.9
Device JSON says: V2.1.9_2.0.10

Which version Canvas do you have?

I have the v1. Can you capture a full POST as made by the webapp? Where does it specify duration?

The duration is specified in the settings in Meural’s web interface:


Do you have those settings or is that different for the v1?

Yes, quite different.

BTW, notice the inspect console on the right. This is right after uploading an image.
Can you do the same thing? Ctrl-Shift-I for inspect, open the Network tab, upload the image, then click on the postcard/ URL on the left, and click on “Source” bottom right for the form data.

Oh sorry, I was unclear. What you’re posting is what I call the web remote, which looks identical on my end.

There appears to be no setting here for any of the durations, nor of several other settings (eg Shuffle) that can only be set via the Meural app or Meural website. It’s one of the things that I don’t know how to deal with yet - if I could get and set these locally, we wouldn’t have to deal with the Meural servers at all.

The image I posted was from the interface on Meural’s website, but the same settings can be set through the Meural app.

The Preview duration is the one that I was referring to. I can’t set it locally from the web remote, but that settings does influence how long the postcard image remains visible on my device.

I updated the master branch today! Did keep the postcard code in a preview_image service for now, not the play_media service. Unless this breaks expected behavior from a media player, it just felt safer not to have play and preview mix.

On a related note, am looking forward to this being in the next HA release:


It’ll let the Google Assistant media players have more functionality than on/off or modes. With that built in, we’d actually have more features with Google than Meural’s Alexa implementation.

I’ve made the repo HACS compatible, so if anyone reading this before did not want to try installing it manually: you can now add it as a custom repository in HACS. If this works well, I’ll see about getting it added as a default repo in HACS soon!

What about splitting it off is safer? It seems strange to make the behavior of this media player inconsistent with other media players like the chromecast. I also don’t see what problems it causes to add it to play_media.

Consider how users would have to use it - if I want to send an image from my doorbell to my tv using a chromecast and to my meural, I would have to use two different service calls in the automation as a result.

True, I had not considered the scenario where you’d want to automate multiple media players for the same image. Makes sense that this would be the most common use-case in automation. I’ll revert it back to your code.

I really do think that previewing as my Canvas does it (overrides temporarily) and playing as I’d expect a media player to normally do (plays an item for the full expected duration, unless explicitly stopped by user) are 2 different concepts, but then again maybe not enough to make using the integration unnecessarily complicated :slight_smile:

Maybe I’m confused as to what media_player action you want to attach preview to.

https://www.home-assistant.io/integrations/media_player/ is what the media_player entity type supports. I don’t see any actions that would map to “preview”. Which one would you map?

No I agree with you, that is why I thought it would be better off in its separate service. There is no equivalent of what Meural does with previewing/postcard in the media_player domain. That is why I thought having it outside of the media_player domain, by making it a meural.preview_image service, would be a cleaner solution.

Ah, got it. So you’d add the service to a different domain name. Well, why not both?

I’ve been trying to install it through HACS, but it’s not showing up. Anything I should do for it to show?

Ah, didn’t realize you can add custom github repositories to HACS as well.

I’m getting a 404 though: