-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add an installer for LibreELEC #17
Comments
My LibreElec MicroSD card runs fine, but since there's no DeskPi scripts for the new SD card reader, SSD, or USB port moves I can't control the desktop. Hopefully they act on this issue cause these things would make great LibreElec Media Centers which is what I bought them for in the first place. I can live with Kodi 18.7 but running the latest Kodi would be awesome. |
I was thinking about this earlier and google searched to see if there was a solution because I will need to do this later myself. Idk if it would work, but you could try ssh'ing into the LibreELEC device and installing the desk pi fan script and turning the IR interface on that way since there isn't a native terminal in libre. As for the usb boot sequencing/quirks idk if that would work with LibreELEC, so you might be limited to SD card only for the time being. |
A litteraly waste 100 buckets for that case.
|
I'd give it some time. I'm not a big fan of "Made in China" stuff, but the unit I have put together seems to work pretty well despite the issue with the SSD speed. As I said in some other posts, they're testing another controller chip and hope to ship replacement PCB's out to past purchasers starting March 2021. They say the new chip they're testing will fix the SSD bottleneck issue. I'm sure some smart cookie will figure out and distribute a script for LibreElec to run along with the DeskPi units. It's in their best interests as that's pretty much what these boxes are designed for and like you, those of us purchased it for. In the meantime, I've run some stress tests on my overclocked Pi4 8GB and I have to say the results are VERY promising. The Ice Tower cooling is awesome. My CPU didn't make it past 57.9 deg C after 10 minutes and the fan never broke 50%. I'm very impressed and the prospects are nice. I'll stick with them for a bit and see how they do. I only paid about $110 for two boxes (I have my own Pi4's) and they only released this "model" with the updated GPIO ports and SSD M.2 support in November. I think if we, the comsumer, bears with them for a little, these boxes will turn out nice. |
Thank you very much for your affirmation of our products, we will continue to work hard. |
We are preparing to contact libreELEC official, hope they can provide dtoverlay like Raspberry Pi official to support front USB interface, fan driver is provided through C or Python, we are still working hard to test, please be patient, we are Try to support more distributions. |
Yes, it works on kodi. |
https://forum.libreelec.tv/thread/23217-i-want-to-try-to-make-libreelec-support-deskpi-what-should-i-do/ |
The dwc2 driver isn't included in LibreELEC, but with LibreELEC 10 you'll be able to use otg_mode=1 - this is already working in development builds, see here [BUG] Missing configuration parameter for DWC2 at RPI4 · Issue #4722 · LibreELEC/LibreELEC.tv · GitHub |
I tried ssh'ing into it and installing there, but it said that the installer script required apt, which libreELEC does not have.
|
Somebody is comparing the argon 1, i got 2 argon1 cases, 20 bucks each :
How do you explain argon1 script is functioning and then deskpi-team script doesn't function ? |
I think the "script" they're referring to "not work" for the DeskPi is the one that loads and activates the various drivers and such that make the extension board work. I think there are controllers and such that must be activated and set up so that the board they use to move the HDMI / USB and such along with the IR controller and power button have to be loaded and this is the issue. Like I've said in previous posts, this is the initial launch and I'm sure they'll get things right. I think the biggest issue they have working against them is they're based overseas and getting stuff to the US market takes a bit. My two DeskPi Pro boxes took almost a month to get to me. Hopefully they'll get the bugs worked out and the supply chain flowing so that they can deliver a better product in a more timely manner. Otherwise some enterprising person is going to set up something here in the US and dominate the business. If there is any sort of trade war between the US and China it'll impact their supply flow. Someone here in the US that makes a similar product, using the lessons learned from this box, would make a killing as the UK would probalby follow with the US in any dispute with China. Since Raspberry Pi's are very popular in the UK, that would be real bad for the DeskPi folks if they were cut out of the US market along with the UK market because of flaws and supply issues. They'd better get this fixed or someone will swoop in and take their business. |
Thanks very much.... and what can i do for you? |
The working methods of the two products are different, and the same scripts cannot be used to achieve functions. |
We are asking for you to write an install script that will work on LibreELEC OS, so the device is able to work. |
oh, sorry for my misunderstanding, we are working on it, it is a little bit hard for me due to the LibreELEC OS is not a normal linux distribution... |
I have tried several times but no luck too. it requires some packages as well. |
@yoyojacky what drivers are you referring to? I'm going to attempt at making an installer. Idk how to code, and I barely understand Kodi addon/plugins. Or how they operate but it shouldn't be too difficult considering the Argon One m.2 does the same thing and there is an installer script for it. So I'm basically going to attempt at pirating that script and then hacking it for the deskpi pro case. I already found the argon one libreelec installer script and ported over a few terms to deskpi already. https://github.com/jojobrogess/deskpi/blob/Libreelecinstaller/libreelec.sh Later on tonight I will follow this guide: https://www.argon40.com/learn/index.php/2020/03/10/argon-one-installation-guide-for-libreelec/ Hopefully I won't have to customize too much. It honestly doesn't look too complicated. The Argon one m.2 adapter board seems to work from what people are posting online. And libreelec 10 beta has already been released so the script can be built using a dev build. I'm also in the process of trying to understand how Kodi addons work. If I can get this installed and working correctly. I will try to create an addon(and repo), so you can easily change the temp values within Kodi. And hopefully, just design it as an addon rather than an installer script that has to be SSH'd or CLI'd in. Because that would be lame to have to SSH into your device just to change the fan speed or temp ranges. Wish me luck! |
yeah so i really do not know how to code. lol but i honestly think it's possible, it just has to be done by someone smart than I To get the Python GPIO library, all you have to do is to install the "Raspberry Pi Tools" add-on. Start your Python script with this lines to import that add-on lib:
|
|
Originally posted by @HiassofT in LibreELEC/LibreELEC.tv#4722 (comment)
Yeah this will have to wait until Libreelec v10 is fully released. But as of right now, I am on and it looks like this located at: Might need to BTW usb boot on I wish I knew more to help, I'll keep searching and trying. hopefully eventually I get it. |
After a bunch of tinkering I was able to get the install script to install the files correctly in the correct locations, but I'm having problems with installing the drivers. I'm not sure if I should use c or python, I would assume python but what do I know lol. With the C driver: idk if the make command works within libreelec. So I'll either have to build one outside of libreelec and include it in the installer or figure out how everything works so I can break it and do it by hand. With the python driver: it might have to be changed around slightly or include it within an addon for pyserial to work correctly https://forum.libreelec.tv/thread/22849-pip-install-not-found/ When that doesn't work, I'll have to install the drivers by hand and then modify the install code to match that "working" process. I would also care to assume that both pwmFanControl and the shutdown script need to be heavily modified to work within the libreelec file system. I've already had to remove all "sudo" calls, and find workarounds for the "read-only" file system. Hopefully later on tonight I'll get a little closer to getting the fan to turn on If anyone has any type of information they can share to help me out, or point me in the right direction I would greatly appreciate it! I honestly don't know what I'm doing lol |
@yoyojacky do you have any information on the GPIO configuation? because I found this: https://forum.libreelec.tv/thread/9472-cooling-fan-control-raspberry-pi-libreelec/ and it seems promising.. |
I was able to find a pyserial that was made for libreelec matrix https://mirrors.kodi.tv/addons/matrix/script.module.pyserial/ |
Yeah I think I got it working. let me figure out how to clean everything up and I'll post a follow up instruction manual with files. |
https://github.com/jojobrogess/deskpi/tree/LibreelecinstallerIf you want to help out, or take for yourselfJust make sure you're on the !!!PREFACE!!!:I have absolutely NO idea what I'm doing. I added in a lsb library from my own personal RPI 4 (found in: /lib/lsb/). I do NOT (currently) use the Deskpi Pro case for Libreelec. How to install DeskPi Pro script for Power Button and Fan Control:REQUIREMENTS:You MUST be on at least You will need to download a matrix ready version of pyserial on a USB and install it as an addon. IF you're After you do that, then follow these instructions:Connect LibreElec to the internet. Enable SSH. You need another computer to access the terminal of LibreElec You might also want to make sure to allow addons/updates from any source. Install Raspberry Pi Tools and System Tools Plug the USB device you loaded with pyserial into your device. Connect via SSH. The default username for LibreElec is After you've installed the required libraries, Connect into Libreelec through SSH:
Type this: Skip the next section "For Advanced Users"Go to "After the device reboot" sectionFor Advanced Users:
After the device reboots:Reconnect through SSH and run this: Use the config menu normally. Note (as of right now): I have not been able to make an addon to be able to adjust the deskpi-config files so you can change the temperature ranges without having to SSH into your libreelec every time. If I can build one, I will either post in this thread or make a new one. |
i have used pinn with libreelec but usb works only deskpi-config not no temp control |
I really wish I could understand what you wrote, maybe I could help out. As long as you are running at least libreelec 9.95.4, everything should work. Usb boot options(/update eeprom) are in the librelec icon in settings tab of Kodi. |
thanks for youre help pinn is like noobs |
ooooofff, I'm getting closer.. I think I figured out how to fix the deskpi-config user input BUG I reported: oh yeah! I just have to figure out if my testing temps/speeds are causing it to vary so much, or if it's going to dynamically run like that always. If it does, then I'll have to change it to be a little more static. It looks like the code that's setup to check whether the current temp is different from the previous read temp, and to skip changing the fan speed values if differences are between a certain threshold, isn't working correctly. |
UPDATE:Looks like having temp values separated by at least 5 degrees allows the code to "smooth out". If the temp speed ranges are less than 5 degrees, you need to lower the hysteresis value lower than I also have decided not to switch out the current default/custom fan speed script with this new one. To do this, I need to figure out how to add custom inputs to this new code, and then how to save them, and then how to "call" them instead of the default values. After that, the Libreelec Deskpi Installer will be "fully" finished. Which will make the Libreelec Deskpi Installer Complete Then full blown addon work.Pretty much the only thing I need to learn to complete this, is how to call a script(bash, shell, or python) from INSIDE the addon and be able to get to I'll just need to learn how to send arguments into deskpi-config OR to create code snippets of actions for default/custom value inputs. THEN, this whole nightmare will be over...At least kinda, I promised an addon for argon one users after one of my rants #17 (comment) lol BUT after I just learned how to do all of this, plus having an already made addon blueprint (AND AN ALREADY WORKING(ish) INSTALLER) it shouldn't take me too long to complete it. I'll do that AFTER this one, of course. |
Okay so hysteresis fan control works, but modifying it is proving to be difficult. At the moment I can only open, read, find a key and it's value/OR/write(WHILE TRUNCATING EVERYTHING ELSE) the json config file. So building a configuration tool for easily adjusting the hysteresis values is out of my reach. As well, I need to figure out the systemctl start stop process with adding an additional service. BTW this is all on a DIFFERENT branch, which is in full test and won't work correctly. The main one, is on the main branch. And still works AFAIK( no one has reported otherwise) As for the addon:Still can't get it to execute code. It's REALLY DIFFICULT coding, the way I do brute force style with no knowledge, inside a libreelec kodi addon. I WILL post an update when I get past the next hurdle, which I expect won't be for a while.. !Working! ssh Installer here |
Uh oh, tests are working.. I can now send predetermined code to the serial port THROUGH ADDON(again), and it works. But I can't seem to figure out how to turn on/off services, might have to hop skip and jump(use/build file to get it run the code) instead of using CLI commands as the actions themselves. IDK at this point, I'm 5 min into this thing working. ATM I don't think the configuration tool for the default fan control will work as it's currently built. So "echoing" user input values into a file doesn't seem too complicated. After I can control the fan, then I'll move onto trying to get pyserial installed and then the Deskpi Installer. If the addon CANNOT CONTROL THE FAN, there is NO POINT in getting it to install the installer/dependents. Users would still be able to install through SSH, but control via addon. |
So I still can't mess with systemctl for some reason, but I can make code and execute it. So basically I click the button, look at whatever for change, if nothing repeat. Which is funky for an install process.. I'll post when I make progress. |
So it looks like my idea of having a SUPER SIMPLE half addon, that ONLY has a settings page to do the initial setup and then to set/control the fan speed won't really work the way I/we need it to. I mean it WILL WORK, but there will be ZERO indication as to if it worked or not, other than a reboot after a couple seconds. Can't have that. I have to actually create some python to do the "extra" tasks of showing a dialog window inside kodi. After that I'll just need to learn how to create a dialog window to show that the command was executed. Then I'll need to learn how to send arbitrary(user input) code into the deskpi.conf. Then the addon should be complete. And then it'll just be waiting on me to figure out how to user input configure the hysteresis fan mode. |
Got notifications working as well as systemctl calls and other basic system calls. I've built a SOMEWHAT working addon, that half does what we need it to.ATM: it can install the dependencies, install the deskpi service, and set fan to constant speeds(NOT USER SPECIFIED) or run default temp range fan service. So ZERO customization. But I am actively working on trying to figure out how to make a real addon. I'll just need to figure out how to open a file(the .conf file), parse lines, replace lines, and save. Then clean up some settings code, remove my test functions, and test from a fresh install. Then release.Then I'll restart my work on getting the hysteresis function working with the install/default service. Sorry for the lag btw, if anyone is still following this lol. I don't really know what I'm doing for any of this, so it's a constant battle of trail and error, man pages, google searching, forums, soul searching, and crying until I can understand it. |
I can now set custom code inside the addon settings page and have it save into a file, to specific lines. But I just BARELY understand why, and ALL of the code needs to be rewritten because I'm doing things in a step by step SUPER BROKEN manner(so I can understand what everything is doing while I'm trying to learn how to build this). So right now you change code in settings page, then run the addon, then the change in the file happens. To have the addon work as intended, it needs to do things without needing to be ran. Plus atm I can only set 1 value, so I'll need to start writing a crap ton of if then elif statements to have it work dynamically. More than likely, this next little bit will take me more time than the last part.Since I pretty much have to rewrite things in a different order all at once without being able to test before I know it works. OHH and btw @inspector71 Pycharm is amazing for testing out python code(its an editor). Makes coding 1000x times easier, since I don't have to check kodi logs until I know it works in the python environment. I've pretty much fully switched away from ST3, although I'm pretty sure ST3 might still be better for kodi skin development since toolbox script works with it.(unless pycharm works with it too, idk) |
I Can Now:Install all dependencies, which is everything it "needs" to do. I just cleaned up all of the code and got it down to 2 functions under 1 class. I also keep thinking about if it would be efficient to run this as a service, my initial thought was that's how this needs to be ran. But it might be smarter to require the addon to be ran for settings to be saved, so that it's not constantly running. All the user would need is for the values to be changed, not constantly check if an outside entity changed the .conf file(since that probably wouldn't happen/could be solved by setting page to defaults) I could stick the whole inside a guiwindow, settings page options would still be there and function. Other than all that. everything looks like it works correctly. Then like I said, I'll start working on hysteresis for ssh. More than likely by that time I'll know more about what I'm going to do about "needing" to run the addon for the settings to be saved. |
I just turned settings page that had predefined constant fan speed buttons, into a bool condition with user input value. But now I can't test on my windows kodi anymore or pycharm, since I'm checking if a service is running and it's not on this machine. so the code error's out. but everything is fully complete now. It just need final checks. which is a tomorrow problem. |
Fresh install is going slow, lots of little fixes but everything appears to be working. I am having difficulty with installing the pyserial installer I made. Which makes no sense. As well a couple other weird bugs. Taking a dinner break, then going back at it all night. |
Alright I fixed the pyserial installer, so now the fan service works from being installed solely from the addon. BUT I messed something up somewhere. The default fan service/constant values/custom fan service are supposed to be shut off/switched when selected. Almost there .. comment 100 btw lol |
Incredible efforts.
I hope you've some idea of the time invested. Would hope @yoyojacky might at least do the honourable thing of sending you some free units, one of any variation you can develop software for, as remuneration.
(note, edited a very long time after posting to fix my own poor writing)
|
@inspector71 at this point all the work I did on this was for the customers, like me, who purchased this with the intention of using it as a media center with Libreelec. Not for deskpi to use my work as a selling point to market this to new customers.(since they vehemently opposed spending the time on this) And I'm not really into monetary compensation for stuff like this. WITH that being said, if they (@yoyojacky or @deskpi ) did want to send me their new Deskpi Lite (or even the nano version, although they would have to send me the nano device as well since I don't own one) WITH THE INTENTION OF ME RETURNING THE UNIT to create a libreelec installer FOR their device/Company, I totally would! So I'd make them a Deskpi Lite(gpio fan) and a Jetson Nano Libreelec Installer/Controller Addon for free. EVEN THEN I would definitely NEED to know the return address PRIOR, since shipping is a pain atm I don't want to spend too much money returning a device I received for free just to be able to code on it lol I think it would be fun. More than likely since I already own an Argon One(NON-m.2) and I already agreed to build them a working installer/addon. I'll do that first, and that'll teach me how to code for the gpio fans. Which will in-tern help with a Deskpi Lite addon, if there is any need for it(as in if people ask for one). Honestly, the ONLY THING I need from this is for 1 person that NEVER POSTED IN HERE to post in my addon page telling me it worked. Because then I'll know I helped at least 1 person out there in the world. |
Happy Easter Everyone!Today Feels Like A Great Day To Release SomethingSo here's the culmination of countless hours of work: https://github.com/jojobrogess/script.deskpifanservice PLEASE REBOOT AFTER INSTALLING DESKPI SERVICE. THERE STILL MIGHT BE BUGS, I kinda rushed getting this altogether to release it today. LET ME KNOW IF THIS WORKS FOR YOU |
First of all, thank you for doing so much work to make it run on libreelect. Regarding the operation of power_off, in fact, what it does is: when you press the button 2 times in a row, the MCU will send a serial port to the The Raspberry Pi sends the string "power_off", what you need is to read this string through the serial port on the Raspberry Pi side and initialize the shutdown sequence to achieve a safe shutdown |
I read all your comments today, I am very moved, I can't imagine what you have experienced during this time, I am really grateful to have users like you who insist on their own ideas and realize their own ideas, it is really amazing, During this period of time, due to the epidemic, I have been unable to visit here normally, and there is no corresponding equipment at home for testing. Although my colleagues and I have discussed and discussed many times, there are many obstacles. I am very glad to see your efforts. Thank you very much for your help to purchase deskpi pro and as a media center user, I will give feedback to the leader after unblocking. |
Great work @jojobrogess !!! Looks like such a sensational effort. Would be great to give it a go if/when I upgrade, eventually. Really fantastic work. Sorry it took me so long to reply! Ever since I filtered github emails ... I forget they are there! |
Completely understand. Your motivations are your own and that's fair enough, up to you.
I do not understand why not. In this scenario, it makes absolutely perfect sense. As previously suggested, whoever is behind the DeskPi* really needs to get their act together with testing and development of software support. If they cannot outsource this work to get it happening in reasonable time, perhaps because of an unwillingness to spend the money, the very least they can do is loan you the hardware - which of course will only cost them less than retail - to do exactly what a paid developer would do. Quite simply, they are getting your efforts for free. Efforts that are worth much more than the cost of a small hardware device. if they cannot see the business sense in that, they're really not very smart.
I absolutely understand how you feel. You've invested all your energy and all you need in return is a little recognition. I'm sorry I am at present not being more helpful to at least test your efforts. Fortunately my deskpi has been running reasonably well. The odd spontaneous crash but I would imagine that is as much down to Kodi as anything. That is not to say I do not want to still get the product I paid for which is of course a product that works as sold with what I assume is one of the top 5 or so operating systems. @yoyojacky if you have not yet offered to lend hardware to @jojobrogess, so that he can develop the software functionality he's now proven he can create, that's just not acceptable, as well as being illogical from a business viewpoint, surely? |
@jojobrogess - I plan to try this out in the next couple of days |
@jojobrogess Could you please contact our salesmen to get some new product as gift ? sorry for my slow response, I have seen all your incredible effort, that's so cool and amazing. hope we can add it to our installation scripts but I have to submit a request to our team and fully test it and adding to official scripts. thanks for your effort again. please send email to : sales@52pi.com , we are going to shipping some new product to you freely as gift. |
Well done @yoyojacky Thank you for doing the decent, fair choice. |
you are welcome bro, thanks for your good effort on this project ! that is very kind of you... |
UPDATE COMING SOON |
APOLOGIES, There will be a slight lag in the release. |
__
Zero apologies necessary. Love your work ethic on this! |
@jojobrogess , our team want to thank you for your effort, could you please send e-mail to jacky.li@52pi.com and contact with me with the gift shipping information confirmation? |
GOOD NEWS EVERYONE!Version 3 has been released WITH OSMC SUPPORT!https://github.com/jojobrogess/script.deskpifanservice Hopefully this time I did it right. IMPORTANT NOTES: To install go to Addon Settings > Installation > Install. To troubleshoot the installation or services go to Addon Settings > Troubleshoot > .. Mode Description:Constant Mode: Variable Mode: Over-Under Mode: @yoyojacky if you're still offering, (and I know it is excessive), but the DeskpiLite case would be a great gift. You can add in support for: Libreelec 9.95.4 - 12.0.0 and OSMC (December-10-2023) to https://wiki.deskpi.com/deskpipro/ I can also remove my icon from within the addon if management gets upset lol |
Just created a repo so that you don't have to install it via usb with every release/fix, it'll get updated automatically. Just add this to Kodi File Manager Source: https://jojobrogess.github.io/repository.deskpi/How to install repo and addon:Go to: Press Go to: To install the add-on services:Select the add-on Deskpi Fan Service add-on and it's services should be fully installed. |
nice job bro! I will arrange our engineer to check it out. |
Hello, I would like to request that an installer script for the LibreELEC OS be written, so that people can use the deskpi as a media center case.
The text was updated successfully, but these errors were encountered: