How to put dynamic content into HABpanel (php)?

to control my MPD server from the HABpanel I want to include the neompc client. This is a php script. How do I integrate it to my panel (template widget?) and where to put the files - inside the openhab folder structure or separate?

I have no real idea where to start ;-/

You can use the iframe widget for this. Simpy point it to the URL of neompc (like you would open it in your browser on your computer) and it will be shown within the iframe.

As these are php files, they need to be interpreted by a php-capable webserver like apache2 (httpd), lighttpd or nginx (but there are many more to choose from). Because of that, you better not just put them into the /etc/openhab2 structure, because OpenHAB2 won’t interpret the php code.

Install a webserver like described in the setup manual of neompc and as soon as you can open and use it from your browser, it is ready to be used by habpanel as well.

Thank you it works perfect. I just put the link to my local copy of neompc into an iframe widget and it looks currently like this:

Wow that fits in incredibly well. Tell me, is the audio output actually synchronized? I played a lot with a mopdiy server in 2 offices and had to craft a custom udp audio pipeline to have it in sync.

I assume you have a single mpd server running. How do you distribute the audio stream to different devices and what are these devices?

If it feels too offtopic, feel free to anser with a PM, in german as well, if you like.

Actually I have 4 instances of MPD running in parallel on my central server. All mpd’s serve a 7.1 sound card - split to 4x stereo channels, each fitted with an own amp and speaker wire going through the whole house. The advantage here is the perfectly synchronized music.
If I spawn one MPD to multiple zones it just overrides the others and plays the music in the selected zones.

1 Like