User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

NEW - PiPoint - A simple DLNA control point

Mon Jun 23, 2014 12:56 am

I'm happy to introduce PiPoint, a very basic DLNA control point for the Pi, designed for use with small TFT touchscreens.
PiPoint is written in Java/Swing (don't be a hater) using the Cling UPnP stack. It's a simple implementation of a control point, limited to play/pause, stop (next) and mute functions [EDIT: and now, volume and seek]. See the screenshots below. Although designed for small touchscreens it can also be used from the Raspberry Pi desktop, or other Linux box, or Windows XP, or who knows maybe even the Mac.

Download an executable jar file (with instructions) from https://github.com/Douglas6/pipoint/rel ... v0.2.1.zip.

The full source is available on Github at https://github.com/Douglas6/pipoint.

Image

Image

Image
Last edited by Douglas6 on Wed Nov 05, 2014 11:27 pm, edited 2 times in total.

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Mon Jul 07, 2014 11:02 am

I've added volume and seek control sliders. Get the latest release at https://github.com/Douglas6/pipoint/releases

jpitts
Posts: 7
Joined: Thu Jul 17, 2014 1:18 pm

Re: NEW - PiPoint - A simple DLNA control point

Thu Jul 17, 2014 1:23 pm

How hard would it be to add one or two of your favorite playlists as buttons.
Say to play from a particular source/path to a specific renderer.
I'm trying to duplicate the way the favorites work on the mediahouse android app.
The goal is to also eventually control the raspberry pipoint via ir.

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Thu Jul 17, 2014 2:22 pm

Playlists would be some extra work I think, which is why few devices/apps support them. Creating playlists (browsing and searching large content libraries) likewise would be awkward on a 320x240 screen.

jpitts
Posts: 7
Joined: Thu Jul 17, 2014 1:18 pm

Re: NEW - PiPoint - A simple DLNA control point

Thu Jul 17, 2014 7:15 pm

I feel like I misspoke when I said playlist, just trying to link to the same source file and destination each time?
No browsing just a one touch button
I have a hdhomerun prime ethernet tv tuner, that broadcasts itself as a dlna server.
For example one of the paths to the channels is
This is what I see in mediahouse app
Play from HDHomerun DLNA tuner
path Channels/122 Science Channel
Play to
LGTV
Then I can save as a favorite and it automatically plays that channel/video to that renderer
The idea would be to use the pipoint to be able play a channel on a remote rendering device.
The tv does not have coax run to it, and normally I just load up mediahouse to play it,but
I'd love to hang the pipoint on the wall and just walk into the room and have it start playing a channel/video
Douglas6 wrote:Playlists would be some extra work I think, which is why few devices/apps support them. Creating playlists (browsing and searching large content libraries) likewise would be awkward on a 320x240 screen.

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Thu Jul 17, 2014 8:03 pm

I suspect that 'channels/122 Discovery channel' is just a content location, so it amounts to much the same (single item playlist essentially). I'll take some time and look into what might be an easy solution, but no promises. PiPoint was originally intended to simply 'follow along', and not initiate playback, but if it can be done fairly easily, I'll look into adding that functionality. Again, holding your breath will be hazardous to your health. :)

jpitts
Posts: 7
Joined: Thu Jul 17, 2014 1:18 pm

Re: NEW - PiPoint - A simple DLNA control point

Fri Jul 18, 2014 2:09 pm

ok thanks I also came across this website that may be of interest to you.
http://4thline.org/projects/cling/workbench/
Also for some reason my LGTV listed below as 47LV3700-UD seems to not show up as a rendered and causes an error in the output.
INFO: <<< UPnP service started successfully
Jul 18, 2014 8:25:50 AM com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager remoteDeviceAdded
INFO: Adding remote device: PlayPointUUID: uuid:56076f6e-6b79-4d65-6421-00199df3af12
Jul 18, 2014 8:25:50 AM com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager remoteDeviceAdded
INFO: Adding remote device: [TV] Living roomUUID: uuid:07bfa482-0082-1000-817d-90f1aaa4252a
Jul 18, 2014 8:25:51 AM com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager remoteDeviceAdded
INFO: Adding remote device: BubbleUPnP (Nexus 5)UUID: uuid:f238dfa1-9f74-a5e8-ffff-ffffb2e00ad9
Jul 18, 2014 8:25:51 AM com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager remoteDeviceAdded
INFO: Adding remote device: 47LV3700-UDUUID: uuid:1cebc6f6-1dd2-11b2-9d7b-db3f729527a0
Jul 18, 2014 8:25:51 AM org.teleal.cling.DefaultUpnpServiceConfiguration$ClingExecutor afterExecute
WARNING: Thread terminated org.teleal.cling.registry.RemoteItems$1@26043ad9 abruptly with exception: java.lang.ArrayIndexOutOfBoundsException: 0
Jul 18, 2014 8:25:51 AM org.teleal.cling.DefaultUpnpServiceConfiguration$ClingExecutor afterExecute
WARNING: Root cause: java.lang.ArrayIndexOutOfBoundsException: 0
Exception in thread "cling-6" java.lang.ArrayIndexOutOfBoundsException: 0
at com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager.adaptDevice(Unknown Source)
at com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager.remoteDeviceAdded(Unknown Source)
at org.teleal.cling.registry.RemoteItems$1.run(RemoteItems.java:110)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Thanks,

jonathan
jpitts@gmail.com

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Fri Jul 18, 2014 3:12 pm

Yeah, I'm familiar with the Cling workbench. I really should start digging into the code; I've avoided it so far.

Thanks for the bug report. I'll look at it this weekend. If you have a chance, it would be helpful to get the debug log. If you could edit pipoint.sh to look like the following, it should produce a log file at /tmp/pipoint.log. (Comment out the 'java -jar $EXEC' and un-comment the last line.)

Code: Select all

# Adjust the EXEC file location variable as needed
EXEC="/home/pi/pipoint/pipoint.jar"

# For running in a window on the desktop
#java -jar $EXEC
# For running fullscreen with a touchscreen; no window borders and hide the mouse
#java -jar $EXEC -f
# For saving logs to a file; adjust the configuration file name and add the -f flag as needed
# Logs will be written to /tmp/pipoint.log on a *nix system
java -Djava.util.logging.config.file=/home/pi/pipoint/logging.properties -jar $EXEC

jpitts
Posts: 7
Joined: Thu Jul 17, 2014 1:18 pm

Re: NEW - PiPoint - A simple DLNA control point

Fri Jul 18, 2014 3:28 pm

Yeah I'm now re-reading your page and realizing that you based it on Cling. :) The workbench really shows you everything that's exposed on a device pretty interesting stuff. I actually ran it from my windows pc right now, my Pi is headless right now I need to find a touchscreen, which one did you use ? Here's what I ran
C:\tmp>java -Djava.util.logging.config.file=c:\tmp\logging.properties -jar pipoint.jar
log file attached.

jpitts
Posts: 7
Joined: Thu Jul 17, 2014 1:18 pm

Re: NEW - PiPoint - A simple DLNA control point

Fri Jul 18, 2014 3:29 pm

ok the forum didn't let me attach the log file so here it is.

10:21:32,525 INFO [com.lcdfx.pipoint.PiPoint] PiPoint version 0.1.0 running under Java HotSpot(TM) 64-Bit Server VM v22.1-b02
10:21:32,585 INFO [org.teleal.cling.UpnpServiceImpl] >>> Starting UPnP service...
10:21:32,585 INFO [org.teleal.cling.UpnpServiceImpl] Using configuration: org.teleal.cling.DefaultUpnpServiceConfiguration
10:21:32,598 INFO [org.teleal.cling.transport.RouterImpl] Creating Router: org.teleal.cling.transport.RouterImpl
10:21:32,829 INFO [org.teleal.cling.transport.impl.StreamServerImpl] Created server (for receiving TCP streams) on: /192.168.1.43:57867
10:21:32,830 INFO [org.teleal.cling.transport.impl.MulticastReceiverImpl] Creating wildcard socket (for receiving multicast datagrams) on port: 1900
10:21:32,831 INFO [org.teleal.cling.transport.impl.MulticastReceiverImpl] Joining multicast group: /239.255.255.250:1900 on network interface: Intel(R) 82579LM Gigabit Network Connection
10:21:32,832 INFO [org.teleal.cling.transport.impl.DatagramIOImpl] Creating bound socket (for datagram input/output) on: /192.168.1.43
10:21:32,833 INFO [org.teleal.cling.UpnpServiceImpl] <<< UPnP service started successfully
10:21:33,157 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Adding remote device: 47LV3700-UDUUID: uuid:1cebc6f6-1dd2-11b2-9d7b-db3f729527a0
10:21:33,158 WARNING [org.teleal.cling.DefaultUpnpServiceConfiguration$ClingExecutor] Thread terminated org.teleal.cling.registry.RemoteItems$1@17d4aa61 abruptly with exception: java.lang.ArrayIndexOutOfBoundsException: 0
10:21:33,159 WARNING [org.teleal.cling.DefaultUpnpServiceConfiguration$ClingExecutor] Root cause: java.lang.ArrayIndexOutOfBoundsException: 0
10:21:33,229 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Adding remote device: PlayPointUUID: uuid:56076f6e-6b79-4d65-6421-00199df3af12
10:21:33,419 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Adding remote device: [TV] Living roomUUID: uuid:07bfa482-0082-1000-817d-90f1aaa4252a
10:21:35,426 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Adding remote device: BubbleUPnP (Nexus 5)UUID: uuid:f238dfa1-9f74-a5e8-ffff-ffffb2e00ad9
10:21:40,874 INFO [org.teleal.cling.UpnpServiceImpl] >>> Shutting down UPnP service...
10:21:41,876 INFO [org.teleal.cling.UpnpServiceImpl] <<< UPnP service shutdown completed

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Fri Jul 18, 2014 4:09 pm

jpitts wrote:my Pi is headless right now I need to find a touchscreen, which one did you use ?
I've got the Adafruit PiTFT with the Pibow case for it. Makes a neat package. My Pi is set up to boot directly to the PiPoint app; works a treat.

Thanks for the debug log. That's no help at all :( I clearly need more debug logging...

[EDIT: Ah, I see the problem, it's assuming the renderer will provide an icon for itself. I'll need to add a default icon. Easy fix, I'll commit it tonight.]

jpitts
Posts: 7
Joined: Thu Jul 17, 2014 1:18 pm

Re: NEW - PiPoint - A simple DLNA control point

Fri Jul 18, 2014 4:23 pm

nice I'll have to order that I currently have a mimi um-710
http://www.engadget.com/2008/12/20/nano ... pressions/
That I had laying around it's a small usb monitor , sadly this is before they had the touchscreen version.
It's used to display ups power stats right now for the server room
Thanks for the update on the icon image, I'll look forward to seeing that.

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Sat Jul 19, 2014 2:19 am

I've committed a fix for renderers that do not provide an icon. I can't properly test it, so please let me know if it solves the issue with your LGTV.
https://github.com/Douglas6/pipoint/releases (v0.2.1)

jpitts
Posts: 7
Joined: Thu Jul 17, 2014 1:18 pm

Re: NEW - PiPoint - A simple DLNA control point

Sat Jul 19, 2014 3:43 am

The lgtv renderer showed up in the list.
I started playing a video from the hdhomerun source, and set the lgtv as the renderer, but when clicking on the lgtv renderer it didn't show any meta data/media state change it appeared as nothing was playing.
Here is the new log.
22:39:32,661 INFO [com.lcdfx.pipoint.PiPoint] PiPoint version 0.2.1 running under Java HotSpot(TM) 64-Bit Server VM v24.51-b03
22:39:32,732 INFO [org.teleal.cling.UpnpServiceImpl] >>> Starting UPnP service...
22:39:32,732 INFO [org.teleal.cling.UpnpServiceImpl] Using configuration: org.teleal.cling.DefaultUpnpServiceConfiguration
22:39:32,747 INFO [org.teleal.cling.transport.RouterImpl] Creating Router: org.teleal.cling.transport.RouterImpl
22:39:33,121 INFO [org.teleal.cling.transport.impl.StreamServerImpl] Created server (for receiving TCP streams) on: /192.168.1.42:59508
22:39:33,121 INFO [org.teleal.cling.transport.impl.MulticastReceiverImpl] Creating wildcard socket (for receiving multicast datagrams) on port: 1900
22:39:33,123 INFO [org.teleal.cling.transport.impl.MulticastReceiverImpl] Joining multicast group: /239.255.255.250:1900 on network interface: Intel(R) Centrino(R) Advanced-N 6205
22:39:33,123 INFO [org.teleal.cling.transport.impl.DatagramIOImpl] Creating bound socket (for datagram input/output) on: /192.168.1.42
22:39:33,125 INFO [org.teleal.cling.UpnpServiceImpl] <<< UPnP service started successfully
22:39:33,721 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Adding remote device: 47LV3700-UDUUID: uuid:1cebc6f6-1dd2-11b2-9d7b-db3f729527a0
22:39:33,722 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Adding remote device: PlayPointUUID: uuid:56076f6e-6b79-4d65-6421-00199df3af12
22:39:33,893 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Adding remote device: [TV] Living roomUUID: uuid:07bfa482-0082-1000-817d-90f1aaa4252a
22:40:01,544 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Received device descriptor without or with invalid Content-Type: http://192.168.1.250:5000/ssdp/desc-DSM-eth0.xml
22:40:01,556 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Received service descriptor without or with invalid Content-Type: http://192.168.1.250:5000/ssdp/dummy.xml
22:40:01,556 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Received empty descriptor:http://192.168.1.250:5000/ssdp/dummy.xml
22:40:01,556 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Device service description failed: (RemoteDevice) Identity: (RemoteDeviceIdentity) UDN: uuid:73796E6F-6473-6D00-0000-0011321dddef, Descriptor: http://192.168.1.250:5000/ssdp/desc-DSM-eth0.xml, Root: true
22:40:06,515 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Device descriptor retrieval failed, no response: http://192.168.2.250:5000/ssdp/desc-DSM-eth1.xml
22:40:13,273 INFO [com.lcdfx.pipoint.renderer.dlna.DlnaRendererManager] Started subscriptions on [[TV] Living room]
22:40:13,645 INFO [com.lcdfx.pipoint.renderer.dlna.RenderingSubscription] Rendering subscription established
22:40:13,654 FINE [com.lcdfx.pipoint.renderer.dlna.RenderingSubscription] <Event xmlns="urn:schemas-upnp-org:metadata-1-0/RCS/"><InstanceID val="0"><PresetNameList val="FactoryDefaults"/><Brightness val="45"/><Contrast val="100"/><Sharpness val="55"/><Mute channel="Master" val="0"/><Volume channel="Master" val="70"/><X_AudioPID val="0"/><X_AudioEncoding val=""/><X_VideoPID val="0"/><X_VideoEncoding val=""/></InstanceID></Event>
22:40:13,866 INFO [com.lcdfx.pipoint.renderer.dlna.TransportSubscription] Transport subscription established
22:40:14,254 FINE [com.lcdfx.pipoint.renderer.dlna.TransportSubscription] <Event xmlns="urn:schemas-upnp-org:metadata-1-0/AVT/"><InstanceID val="0"><TransportState val="NO_MEDIA_PRESENT"/><TransportStatus val="OK"/><TransportPlaySpeed val="1"/><NumberOfTracks val="0"/><CurrentMediaDuration val="0:00:00"/><AVTransportURI val=""/><AVTransportURIMetaData val=""/><PlaybackStorageMedium val="NETWORK,NONE"/><CurrentTrack val="0"/><CurrentTrackDuration val="0:00:00"/><CurrentTrackMetaData val=""/><CurrentTrackURI val=""/><CurrentTransportActions val=""/><NextAVTransportURI val=""/><NextAVTransportURIMetaData val=""/><RecordStorageMedium val="NOT_IMPLEMENTED"/><RecordMediumWriteStatus val="NOT_IMPLEMENTED"/><PossiblePlaybackStorageMedia val="NETWORK,NONE"/><PossibleRecordStorageMedia val="NOT_IMPLEMENTED"/><PossibleRecordQualityModes val="NOT_IMPLEMENTED"/><CurrentPlayMode val="NORMAL"/><CurrentRecordQualityMode val="NOT_IMPLEMENTED"/></InstanceID></Event>
22:40:31,468 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Received device descriptor without or with invalid Content-Type: http://192.168.1.250:5000/ssdp/desc-DSM-eth0.xml
22:40:31,476 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Received service descriptor without or with invalid Content-Type: http://192.168.1.250:5000/ssdp/dummy.xml
22:40:31,476 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Received empty descriptor:http://192.168.1.250:5000/ssdp/dummy.xml
22:40:31,476 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Device service description failed: (RemoteDevice) Identity: (RemoteDeviceIdentity) UDN: uuid:73796E6F-6473-6D00-0000-0011321dddef, Descriptor: http://192.168.1.250:5000/ssdp/desc-DSM-eth0.xml, Root: true
22:40:36,421 WARNING [org.teleal.cling.protocol.RetrieveRemoteDescriptors] Device descriptor retrieval failed, no response: http://192.168.2.250:5000/ssdp/desc-DSM-eth1.xml
22:40:40,488 INFO [org.teleal.cling.UpnpServiceImpl] >>> Shutting down UPnP service...
22:40:40,608 INFO [com.lcdfx.pipoint.renderer.dlna.TransportSubscription] Transport subscription ended
22:40:40,750 INFO [com.lcdfx.pipoint.renderer.dlna.RenderingSubscription] Rendering subscription ended
22:40:41,754 INFO [org.teleal.cling.UpnpServiceImpl] <<< UPnP service shutdown completed

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Sat Jul 19, 2014 3:52 am

jpitts wrote:The lgtv renderer showed up in the list.
Ok, that's progress. This log has some meat in it, thank you for that. I'll take a look at it tomorrow.

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: NEW - PiPoint - A simple DLNA control point

Sat Jul 19, 2014 4:10 pm

jpitts wrote:when clicking on the lgtv renderer it didn't show any meta data/media state change it appeared as nothing was playing.
I'm afraid there's nothing I can do about this. PiPoint logs the XML payload that the renderer is providing; in this case the LG TV is saying :

Code: Select all

...<TransportState val="NO_MEDIA_PRESENT"/><TransportStatus val="OK"/><TransportPlaySpeed val="1"/><NumberOfTracks val="0"/><CurrentMediaDuration val="0:00:00"/>...
Have you tried BubbleUPnP or the Cling workbench? Do they get any more information when a video is playing on the LG?

Return to “Graphics, sound and multimedia”