Ahoy Display-o-tron users! If you’ve written a plugin and want feedback, testing, contributions or just the opportunity to show it off, then this is the place.
I’ll also be lurking around to help you get started.
Last night I started work on a text input plugin, which would be available to all plugins as a standard way of entering strings of text- currently up to 15 characters long. It’s still a little rough around the edges, but it works! I have updated dot3k.menu to make it available, but it’s not in pip yeeeet!
I’d like to see a Deluge plugin, which will give status information about individual torrents.
I tested the script I found here http://forum.deluge-torrent.org/viewtopic.php?f=8&t=39731 against the NOOBS Lite download on my Pi, and the information returned is pretty comprehensive. Seems like a plugin people might actually use.
Doing it properly would be a fair amount of work- it would be straight-forward to get status information, but why stop there? Being able to pause/resume torrents would be awesome.
– Edit –
Oh my! The Deluge API is mind-boggling and I gave up on it pretty quickly- I used Subprocess.check_call() to run deluge-console and get the info out of there. It works!
Firstly, love the dot3k! much better out-of-the-box solution to all the 4x20 char LCDs that I could never quite get working with some home brewed buttons.
Secondly, there’s so much potential for these plugins. I’m rubbish at python but have tried to get some network utilities (transfers, current speed, IP displays, etc) and some weather scraping via the wunderground API.
I’ll try and upload some of them to github soon, when I can get them to a decent standard.
Did anyone work out how to have text longer than 15 char scroll automatically?
Really glad to hear you’re developing some plugins, I’ve been waiting to see what people might come up with!
Auto-scrolling is built into the menu library and enabled by default. If you try to display a string of text that’s too long, and it stays on the screen for at least 2 seconds, it will start to scroll.
If you want to fine-tune scrolling options, you can send some arguments to write_option:
write_option(row = 0,
text = 'Hello this is some scrolling text',
scroll=True, # Enable auto-scrolling
scroll_speed=200, # Delay between each scroll position
scroll_delay=2000, # Delay ( in ms ) until auto-scrolling starts
scroll_repeat=10000, # Delay ( in ms ) before auto-scroll repeats
scroll_padding=' ' # Padding added to the end of the text so it doesn't just wrap around onto itself
)
Yup, that’s right. The code I supplied is how to call write_option ( assuming all the non-python stuff I’ve been doing lately hasn’t broke my understanding of the syntax ), and if you look further down in write_option within menu.py you’ll see the code that deals with those arguments and, if you go further, the auto-scrolling itself.
I’ve gotten a wunderground weather reader and a bunch of sensors working on my dot3k, still working on the UI for it but otherwise pretty happy!
You can grab the wunderground weather reader here, you need to register for an API key but thats free. Please feel free to push any suggestions or code fixes!
Ok, so I’m 95% certain I want a DOT3K but I just wanted to find out whether this is possible first.
I am currently using a RPi Model B as a usenet downloader using Sonarr and SABnzbd+. It is headless, so I have attached the Piglow and housed it in the Pibow Ninja case. The Piglow is set up as a system monitor, so each arm of LED’s displays the status of the CPU, network traffic and temperature. This means I can quickly glance at my RPi and I know if everything is all well (normal status is 3 blinking red LED’s) because sometimes the RPi crashes, so if I see activity on the Piglow I know everything is tickety boo.
However, I would love to see more usable information, hence why I’m considering the DOT3K. I would like to have the similar set up, except see more information - i.e. % CPU usage, network transmission in MB/s, temperature in degrees C and storage space left in either % or GB/MB. Maybe with other options, such as uptime etc.
Problem is, I’m no expert. The Piglow System Monitor is a code grabbed from here and I could figure out what I needed to tweak to get it the way I liked (i.e. which system stat to use, how frequently it should update etc.).
I have had a look at the DOT3K Github page here and noticed that there is a script (menu.py) which sounds about right to what I’m looking for, but I don’t want to shell out on the DOT3K if it’s dead in the water.
I don’t think there’s an example that does exactly what you need, but Dot3k isn’t too difficult to get to grips with. It’s certainly capable of doing what you want, and much more!
It’s basically got the same chip as the PiGlow in it, except it’s tied to 9 white LEDs for the bargraph and 3 RGB ones for the backlight. The bargraph is a good way to visualize CPU usage at a glance, and you could even cycle between backlight colours to indicate different modes.
A red backlight could mean CPU usage, and the bargraph would show that. Then a blue backlight could mean Network Traffic mode and the bargraph could update to display that- etc!
If you get stuck you can always start a project thread here and ask for help and guidance, I’m sure this kind of example would be useful to other people too.
Thanks for that. I like the idea of different colours depending on the displayed system stat - perhaps it could cycle using the joystick or on a timed interval? Thought for the scrapbook there!
Thing is, if I started a project guidance thread it would just be outlining the idea! Happy to do that, but feel a bit cheeky as I’d be effectively asking people to start the project for me to try out. Do you have any pointers on where to start?
Quick edit - I’ve just took the plunge and order the DOT3K - should be delivered Friday ready for the weekend!
There are plugins for CPU, Network Speed, and Network Throughput.
It would be pretty trivial to automatically cycle through these, and fill in the gaps with an extra plugin or two for the other features you need.
The menu.py you mention shows how to build a menu out of these plugins, it’s pretty simple!
Nothing wrong with being cheeky, if your ideas are re-usable enough then I’d probably write up a plugin or two, the Dot3k GitHub could use a few more examples.