Push-play image/video by DLNA to Kodi

Hi mates, I have few experience about this and I need kindly your help. I've Kodi running on two TV on the same LAN, I want to drive them separately using a particular time between medias and schedule contents during the day.. so I thought about NR to create this scenario.
Luckly there is a module for NR (node-red-contrib-dlna) which requires:
msg.device: can I simply write here the IP of target TV?
msg.payload.action: can be "play", "pause", "stop" or "load".
For action "load" msg.payload.url: how should it be the syntax of URL? Can please somebody write here an example? Thanks.

Then I suppose to have a DLNA server where Kodi can load from the medias, which program you recomend me to use? If free is better, thanks for suggestions.
Can I load photos or videos?

Maybe start with trying out node-red-contrib-kodi (node) - Node-RED.

If you really want to use a dlna server, there are free ones to be had. Google is your friend.

1 Like

(I started to reply then saw you wanted to control KODI so I redacted the post. But then read a bit more.)

Here is try 2.

Why can't you share the folder where the videos are and mount them in KODI?

The playing/control can then be done with the KODI node as Steve suggested.

1 Like

Thank you guys! This solution looks amazing simply! Share a folder and tell kodi to open that file.. I'll try it soon

1 Like

Good luck.

I just thought that was the way I would do it.

I've tried the module, I've tried with samba sending

return {
    payload:
    {
        "cmd": "Player.Open",
        "args": {
            "item": {
                "file": "smb://127.0.0.1/log/test.mp4"
            }

        }
    }
};

and it works, also I can show image, but when I do this it still in always on top and if I push a video the image stills..

Sorry, I've never used the KODI control node.

Looks Kodi 21 has serious problem dealing with it, if a picture is opened the video goes to background only, not all pictures and videos are supported, a mistery why, if I open those videos/pics inside kodi they open.

As unfortunately these way produce poor results I would try to use the DLNA way, somebody knows how shpuld be formatted the URL for ompening from DLAN server or (if possible) froma samba network path?
Thank you!

I've tried the other module, difficult to understand how it works becuase the authot didn't post any example. There is one guy there who used it and replied to my post, with him I'm trying to figure out..

I've manage to make it work, I'm using http server instead of samba for sharing files, works.
The problem I have is I can't close the picture after I load it/them, I can't watch more videos, I need a command to close the pictures, any ideas? Player.Stop returns an error

Hi, I've opened a bug to Kodi asking to close the image viewer when a video is called, to watch it.

By the time I've found an overcome handmade for fix it, I need to send 2 commands as remote can do (Yatse) on port 8080, is the key "back" and the key "fullscreen", sending them will close the photo and show the video running on background, do you know how to send those commands? With JSON-RPC_API is possible? Thanks!

Solved with

return {
    payload:
    {
        "method": "Input.ExecuteAction",
        "args": {
            "action": "back"
        }
    }
};

followed by

return {
    payload:
    {
        "method": "Input.ExecuteAction",
        "args": {
            "action": "fullscreen"
        }
    }
};

God saves souls of XMBC staff for their poor and wrong documentation, I've lost some time

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.