WIP Synology DiskStation PowerOff
#1
Hi,

I wanted to write my first Add-On and decided to write something that shuts down my Synology DiskStation when I poweroff my Raspberry Pi from within XBMC.
Actually it is only sending a "poweroff" command to the NAS via SSH, so basically this Add-On can be used on every remote computer allowing SSH connections, so the name is a little bit misleading here.

To be platform independent, I switched from using the sshpass and ssh linux commands' to the python library 'paramiko'. It seems to work well, but I don't know how to package the Add-On with this library since it has parts in it that are compiled for the host OS.
My "solution" right now is to add a disclaimer in the addon.xml that tells you to install paramiko on your XBMC host system.
Is there a better way to do this? Maybe there is a built-in SSH lib in XBMC? I haven't found any information on this.

Since this is my first Add-On, I'd like to ask the experienced Add-On developers what could be improved or how I can solve the library issue.

Currently the Add-On lives in my Github repository:
https://github.com/aclemens?tab=repositories

Right now the Add-On is only triggered when using my Amber skin fork, otherwise it must be started manually.

I'm sure there might be Add-Ons that can power down a remote (NAS) server, but basically I just wanted to start wirh Add-On development, so I wanted something that isn't too complex to start with.

Andi

Also an error popup dialog will appear when running the script without the paramiko library, so the user will be informed when running the Add-On...
Reply
#2
I added some screenshots:

watch gallery
Reply

Logout Mark Read Team Forum Stats Members Help
Synology DiskStation PowerOff0