• 1
  • 20
  • 21
  • 22(current)
  • 23
  • 24
Release XBMC LCDproc Python addon
Hello,
I am new on the forum and wanted to say that everything was working perfectly, so far so good. Your Add-on rocks
So I wanted to thank you for your hard work, and help a little bit with a little contribution.

I noticed like everybody the Freespace not reported as it should, but for myself, it is not a big deal.
I saw on the forum, that for the moment it was impossible to display an equalizer (or a vu meter) I think it could be possible do do that in a certain manner at least for the Imon LCD.
I do not know if it could be integrated to ce LCDProc Add-on or not, but at least, it should be possible to have a permanent vumeter activated, aside KODI.
Let me explain, I found a little piece of code in python, that permits to monitor the sound output, via pulseaudio. It works pretty well and displays a vumeter in textmode in a terminal. This piece of code display only one channel but can be easyly adated to display two channels, and send the output to the Imon LCD, like you did for Icons, using the extra bars (the thin ones, or the thick ones) for rendering.
This little piece of code is in python like I said, like your addon, may be it can be integrated, at least for linux, as an extra add-on for kody.
The piece of code is here :
https://bitbucket.org/mjs0/peak-detect/src
And requires the installation of this :
https://github.com/Valodim/python-pulseaudio

in order to make that work with ubuntu :
1) Install the python-pulseaudio library :
download the zip file, extract somewhere, open a terminal with Ctrl+Alt+T :
- cd to the directory where the setup.py is located
Code:
cd /Downloads/python-pulseaudio-master
- activate the permission for the file setup.py to be executed
Code:
sudo chmod +x <filename>.py
- run the script to install the library
Code:
sudo ./setup.py install
2) Download the python vumeter :
a) open this link (if you are lucky, it will be downloaded, go directly to step c) if not, you see the code in your browser) :
https://bitbucket.org/mjs0/peak-detect/r..._detect.py
b) open Gedit, Paste everything, saves as peak_detect.py where you want, go to step d)
c) open your file with GEdit (right click on it , open with GEdit)
d) Add this line, at the beginning, as a first Line, just before the first line (import sys) :
Code:
#!/usr/bin/env python
e) save, don't close gedit for the moment, reopen your terminal
f) use the cd command to go to the directory of this file, and allow permission to execute :
Code:
chmod +x peak_detect.py
g) execute the script :
Code:
./peak_detect.py
h) for the moment, it does nothing but displaying the various output that can be monitored, look at what output you want to monitor, mine was at index 2 and named "alsa_output.pci-0000_00_14.2.analog-stereo", copy this name, go back to GEdit and replace SINK_NAME = 'xxxxxxxxxxxxx' with SINK_NAME = 'the name of your device", save, close GEdit
i) close the terminal, open a new one, re-execute the script like in step g)
j) browse to a music file, double clic on it to play
k) you have a vu meter working in your terminal !
Reply
Here the same script I adapted for stereo output Wink

(EDIT herrnst: Large paste/script removed, please use pastebin or better directly put scripts into a source repo at e.g. GitHub)

Now, we can output that to the Imon LCD via LCD Proc, on the progress bars, like described here :
http://forum.kodi.tv/showthread.php?tid=55696


The only problem is that it migh spam the LCDProc socket
Reply
Is there some way to disable the 'navigation' messages on the LCD/VFD? I have my single line VFD set up to show the system time and remain video time when playing a video. However, if I press a key while playing a video, such as the Info key or Menu key, the VFD changes to the navigation message for a second. (I now have it set up to show time and date). In the gui I have set it to 1 second, but can't lower that to 0 seconds.

What I'm looking for is a set up that does this:
- when playing a video: show time & remaining time
- when not playing a video: show time & date

My VFD (on a Moneual 320) has just 1x14 characters and is too small to show any other meaningful messages.


Any possibilities?
Reply
OK, finally, I achieved to have a decent script (see my two posts above for the how-to in order to configure and run it in Linux)

You launch it before you launch Kodi, and you have a working vumeter playing in your XBMC Smile
It does not affect messages or icons displayed on your Imon LCD and complete nicely the LCDProc Addon.
Here is the script :

(EDIT herrnst: Large paste/script removed, please use pastebin or better directly put scripts into a source repo at e.g. GitHub)

I open a new thread on the forum for people who are interested by this littlething Smile
Reply
(2015-03-18, 20:16)Chloé Avrillon Wrote: Now, we can output that to the Imon LCD via LCD Proc, on the progress bars, like described here :

Surely a creative way to achieve this, but this won't work on plain ALSA, OSS (Linux/RPi), CoreAudio (OSX), Android or even Win32 (DX/WASAPI). For a proper implementation, we'd need a way to get the audio data out of Kodi's audio subsystem.

(2015-03-19, 21:39)Chloé Avrillon Wrote: It does not affect messages or icons displayed on your Imon LCD and complete nicely the LCDProc Addon.

Just a hint: Upon sending messages to LCDproc, you should always read back the response. If not, your VU meter will stop working out of a sudden due to the socket filling up with LCDd's responses. Also, this might interfere with progressbars or volumebars mapped to the two bar thingies.

(2015-03-19, 14:10)willemd Wrote: Is there some way to disable the 'navigation' messages on the LCD/VFD?

Currently not, but should be fairly easy to implement. Will put it on the list. However, please don't hold your breath on this, reallife's eating up much spare time at the moment.

Regards,
nst
script.xbmc.lcdproc!
Leia+VAAPI+HD-Audio+LCDproc addon,TVHeadend-master/DVB-C/T2+pvr.tvh addon on Ubuntu 18.04 (amd64)
Reply
(2015-03-20, 10:05)herrnst Wrote: Surely a creative way to achieve this, but this won't work on plain ALSA, OSS (Linux/RPi), CoreAudio (OSX), Android or even Win32 (DX/WASAPI).
THere's a way, it requires the use of the pyaudio library in python and the installation of portaudio, which is cross platform and support every audio system.
(2015-03-20, 10:05)herrnst Wrote: For a proper implementation, we'd need a way to get the audio data out of Kodi's audio subsystem.
You are right, and I was wondering how were the visualizations were working, are there OS dependent or do they use the Kodi AE subsystem ?
In the first case, it might be possible to have a case by case approach, like those visualizations. I have a little Idea how to implement that, just need a bit of time to work on it.

By the way, I've read on the official Kodi wiki that the nex Audio Engines implements it's own pulseaudio implementation.
(2015-03-20, 10:05)herrnst Wrote: Just a hint: Upon sending messages to LCDproc, you should always read back the response. If not, your VU meter will stop working out of a sudden due to the socket filling up with LCDd's responses.
Yes you are very true, I've made the correction in my script, I opened a dedicated thread for that.

(2015-03-20, 10:05)herrnst Wrote: Also, this might interfere with progressbars or volumebars mapped to the two bar thingies.
You are right again, for something eye-candy extrabars should not be used in LCD.xml
Reply
(2015-03-22, 19:31)Chloé Avrillon Wrote: THere's a way, it requires the use of the pyaudio library in python and the installation of portaudio, which is cross platform and support every audio system.
Sounds like this requires installation of additional (system) binaries, which is not really an option.

(2015-03-22, 19:31)Chloé Avrillon Wrote: You are right, and I was wondering how were the visualizations were working, are there OS dependent or do they use the Kodi AE subsystem ?
Visualization addons have a callback-like mechanism for that, where a pointer to the actual audio data is being passed, but that's part of that specific API, however. For Python addons, we'd need something like a function to request just that from the application (method of the xbmc library/object, for example). Something similar exists for video, which is used by e.g. the boblight addon.

(2015-03-22, 19:31)Chloé Avrillon Wrote: By the way, I've read on the official Kodi wiki that the nex Audio Engines implements it's own pulseaudio implementation.
That's probably refering to the PA sink, which is a client to the PA server like any other PulseAudio-supporting application. Kodi definitely doesn't ship it's own audio server Wink

nst
script.xbmc.lcdproc!
Leia+VAAPI+HD-Audio+LCDproc addon,TVHeadend-master/DVB-C/T2+pvr.tvh addon on Ubuntu 18.04 (amd64)
Reply
Okay, one other question:

As my HTPC first needs to boot up a virtual machine to get LCDd running, the first 60 seconds or so, Kodi cannot connect to LCDd (since it hasn't started yet).

My log is then as follows:

Code:
15:28:12 T:3672   ERROR: ### [XBMC LCDproc] - Connect: Caught exception, aborting.
15:28:12 T:3672   ERROR: ### [XBMC LCDproc] - Connect failed. Retry in 4 seconds.
15:28:23 T:3672   ERROR: ### [XBMC LCDproc] - Connect: Caught exception, aborting.
15:28:23 T:3672   ERROR: ### [XBMC LCDproc] - Connect failed. Retry in 8 seconds.
15:28:33 T:3672   ERROR: ### [XBMC LCDproc] - Connect: Caught exception, aborting.
15:28:33 T:3672   ERROR: ### [XBMC LCDproc] - Connect failed. Retry in 16 seconds.
15:28:49 T:3672   ERROR: ### [XBMC LCDproc] - Connect: Caught exception, aborting.
15:28:49 T:3672   ERROR: ### [XBMC LCDproc] - Connect failed. Retry in 32 seconds.
15:29:21 T:3672   ERROR: ### [XBMC LCDproc] - Connect: Caught exception, aborting.
15:29:21 T:3672   ERROR: ### [XBMC LCDproc] - Connect failed. Retry in 64 seconds.
15:30:15 T:3672  NOTICE: ### [XBMC LCDproc] - Connected to LCDd at 192.168.56.101:13666, Protocol version 0.3 - Geometry 14x1 characters (70x8 pixels, 5x8 pixels per character)
15:30:15 T:3672  NOTICE: ### [XBMC LCDproc] - Driver information reply: Driver for VLSystem VFD/IR combination in Moneual MonCaso 320
15:30:15 T:3672  NOTICE: ### [XBMC LCDproc] - Loading settings from C:\Users\user\AppData\Roaming\Kodi\addons\script.xbmc.lcdproc\resources\LCD.xml.defaults
15:30:15 T:3672  NOTICE: ### [XBMC LCDproc] - Loading settings from C:\Users\user\AppData\Roaming\Kodi\userdata\LCD.xml

So, every time it tries to connect but fails, it adds a double waiting period. 4 - 8 - 16 secs - etc. It's a smart setting, because usually when it takes longer than a few seconds, the host may pretty well be unavailable. In my case I know the host will be there, but it's just a bit slow.

Is there some way to disable this extra waiting period after it cannot connect? Or postpone the doubling a few times?

I understand the addon shouldn't keep trying every millisecond for eternity, but in this special case I feel like I'm waiting perhaps 64 seconds too long for something to appear on the VFD. Big Grin

Is it something I can easily change in the code or in a setting?

I know it's just details and maybe I'm nagging a bit, but we all try to get the smoothest Kodi experience, right. Wink

Thanks!
Reply
if my htpc goes in suspend mode, the display show in the first line the time and in the second line"please wait"

is it possible to change this? I use a mdm166a
AsRock Q1900DC - SanDisk SSD 64GB - Crucial 2x 4GB - Streacom F1C EVO (Futaba M166A Display, YARD2) - BluRay Panasonic UJ-265
Reply
(2015-04-18, 15:43)willemd Wrote: Is there some way to disable this extra waiting period after it cannot connect? Or postpone the doubling a few times?

To change this, you need to tamper with this code block.

(2015-04-19, 08:23)noxx2 Wrote: if my htpc goes in suspend mode, the display show in the first line the time and in the second line"please wait"

No idea what's putting that on your display. Maybe this workaround helps (in that it'll turn off the display backlight).

nst
script.xbmc.lcdproc!
Leia+VAAPI+HD-Audio+LCDproc addon,TVHeadend-master/DVB-C/T2+pvr.tvh addon on Ubuntu 18.04 (amd64)
Reply
thx, I had try I, unfortunately it don't work
Reply
(2015-03-22, 20:40)herrnst Wrote:
(2015-03-22, 19:31)Chloé Avrillon Wrote: You are right, and I was wondering how were the visualizations were working, are there OS dependent or do they use the Kodi AE subsystem ?
Visualization addons have a callback-like mechanism for that, where a pointer to the actual audio data is being passed, but that's part of that specific API, however. For Python addons, we'd need something like a function to request just that from the application (method of the xbmc library/object, for example). Something similar exists for video, which is used by e.g. the boblight addon.

Any ideas on this? I want to try to create and addon to access Kodi's audio subsystem, like the visualizations do but for standard addons. Specifically I want know the frequencies playing, like bass, mids, and highs to display a spectrum analyzer on an external LCD screen running OpenELEC.
Reply
I'm working to customize a little bit on progress bar like this:
Code:
00:22:35 █████░░░░░░░░░ 01:25:57
or
00:22:35 █████═════════ 01:25:57

I put the Player.Time and working to put Player.Duration to correct position, but the special character like ░ or ═ is harder to handle. I still can't send them to LCDproc. Tried to escape with \u2250 and \xCD but no luck.

Update: LCDprog is not support Unicode character at this time.

I wrote my codes with minus sign (-).

Image
Reply
Hello,
is there a way to change the time format (from 12h to 24h) and especially the displayed font when the system is turned off? It isn't good looking and barely readable at the moment. When the system is running the font is different and looking ok, and also the time format is 24h.

I'm running OpenElec on a Silverstone ML02 (imonlcd)

Thank you
Doesel
Reply
Hi all,
Very new to this forum so hi everyone - and I have a question if I may?
I have Kodi (16) installed on an Ubuntu-based Shuttle SG33G5M - and it works great. I've managed to get the VFD working using LCDProc and the Kodi add-on, and it's all good.

However, the issue with the Shuttle VFD is that it's only 1 line of 20 characters - so If I want to display Album name, artist, track and duration, I have a big loooonnngggg line of information scrolling across the screen!

Is it possible to either:
1) Add a 'pause' into the relevant line within the LCD.xml file so that once it scrolls to 'duration' it pauses?
2) Or is it possible to add more than one 'screen' of information into the movie section of the XML? So I could show 'Movie name' for say 10 seconds, and then have it switch to 'duration'?
3) Also - I have the various play, pause and stop icons, but It doesn't show the volume icon on the display. Can anyone help?

No idea if any of this is possible but it would be great to get some assistance.

Keep up the great work!

Lee
Reply
  • 1
  • 20
  • 21
  • 22(current)
  • 23
  • 24

Logout Mark Read Team Forum Stats Members Help
XBMC LCDproc Python addon2