This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
[Published] sabNZBd
sabNZBd for Homey
Improvements and feature requests are welcome.Published in the appstore: https://apps.athom.com/app/com.swttt.sabnzbd
With this app you can add your sabNZBd server as a device to Homey.
Examples:
- When watching TV(iptv, streams, netflix etc.), pause your downloads
- Only download during the night (or other timers)
- Only download when nobody is home
- If a new download is added say "A new download arrived on your server!" or do something else.
- NEW: On download added you now can use the title tag. The title tag contains the movie title (ex. Lord of the strings ) or the tv show title, season and episode (ex. The bold and the beatifull season 1 episode 666).
Current features:
- Pause and resume sabNZBd within flows
- Log download speed in insights
- Flow trigger based on new download added (NEW: Now with title label/token)
- Edit settings and polling rate after the device is added
- Adding a device takes a few seconds without any feedback (does gives errors on not able to connect)
Github version is out of sync with the app store!
https://github.com/swttt/com.swttt.sabnzbd
Comments
Now we can use Couchpotato app to add a movie and then check sabnzb to see if it started downloading
First time i coded in nodeJS, so i expected some bugs/errors at least...
[EDIT]
Eventually the wizard times out with a message that it can not connect. And the request shows a failed in the network tab of the console. I'm pretty sure the details are correct as I copied them from CouchPotato that is using SABnzbd as download client. Could it be related that I use the option to redirect traffic to a https port?
Just hit save and wait 5 seconds and it "should" pop up.
The entered details make a request on http://YOURHOST:YOURPORT/api?apikey=YOURAPIKEY.
I should add an option to enable/disable https on the settings, that should make it work.
Anyway, thanks for the feedback. Just something i didn't think of cause i don't use the https option.
Added an issue for myself on github, and will try to fix asap.
It did close the window where you enter your details automatically? Cause when it fails to connect to the api, it shouldnt.
Just looked over my code on github, and will be able to fix https very easy. (Probably fixed tonight)
"Kon geen verbinding maken met sabNZBd. Check je connectie gegevens. Error: unable to verify the first certificate"
I'm indeed running SABnzbd on HTTPS without a valid certificate so I can explain the error. As I run SABnzbd on my LAN it's not possible to add a certificate based on the IP address so I think it should ignore that there is no valid certificate.
Adding it without HTTPS still works fine.
[EDIT]
I was able to crash the app. I restarted SABnzbd to change to make SABnzbd only available through HTTPS on the default port. When I went back to Homey the app has crashed with the following log.
I should be able to add a checkbox to disable/enbale certificate checks, thats no problem. Or just disable the checks in general. (You notice the certificate when you connect to sabnzbd trough your browser.)
Regarding the crashlog, did the same thing yesterday, and didn't crash on me. So ill try to reproduce tonight.
Currently finishing some bug fixes, added a flow card (if download gets added) and made the settings edit-able after adding the device (including the polling rate).
Currently pushed 0.1.1 to github and awaiting approval in the appstore.
This fixes the issue with not saving the settings right.
It seems possible, but for a hobby developer like me to hard to figure out what the right way would be. (libraries or should i create a function...)
So if someone has ideas, feel free to share them
I think the way it should work is like this:
Interval runs and gets the job array/object from the api. It saves this as a device_data object. In the next interval it compares the current(new) jobs array/object to the one saved in device_data. Now this is the hard part (at least for me). I need checks both ways. I want to know if a download is finished (What was in the old array and isn't in the new one) and check if there are any new jobs added (what is in the new array and not in the old).
Than the next problem (not sure yet if its a real problem). What if there are 3 new jobs added? I could run the flow trigger for all 3 of them, but do the flows wait until the previous is finished or do they try to run at the same time?
(maybe @Emile could give some info on this one)
Anyone else having this?
You could of course run the github version. Github is 1 release ahead of the app store.
I'll publish the latest github version as well.
If there are no crashes etc. There won't be much features added the coming weeks, I just became a father. So long days, and short nights