X10 Community Forum

📱🖥️PiX10Hub => 💬General Discussion => 📝User created HG Scripts (programs/macros/widgets) => Topic started by: Tuicemen on March 22, 2019, 05:45:44 PM

Title: 🛠HG Tools
Post by: Tuicemen on March 22, 2019, 05:45:44 PM
"These all work with the new HG UI however the status info custom widget doesn't so the generic status widget is required"
This is actually a group of C# scripts (programs) and is a work in progress so more scripts may possibly get added in the future.
Currently this includes:
1: DateTime Reset, this will reset the RPi clock if for what ever reason it fails to be off.
2: RPi Reboot, this  does what the name suggests
3: RPi UpDate, this  does a RPi package update not a firmware update
4: SafeShutdown, this  does what the name suggests
5:DateTime Info, this displays date, time, the Pi thinks it is as well as the time the RPi has been power up and running and the CPU temperature.(no more info will be added to this)
6: Status Info, this  displays same info as the DateTime Info  as well as added info but all info at once in a single custom widget shown below. Currently there are no plans to add more info to this.
7: tuicemen_tools_info.zip, a Custom Widget & icon for Status Info. Note: the DateTime Info app can also be set to use this widget if one wishes with a edit to the start up tab  changing the widget the program tries to use.
8: RPi Memory Cleaner, this basically flushes your cache memory possibly freeing up some held by an update or install.
9: RPi Drive Cleaner, this will free up space held from Deb package installers,  RPi upgrades, & updates.


Any one of the tools can be included in a simple wizard script for auto firing on the condition you choose or manually started.
Install Instructions:
to install new widgets go to configure/widgets then click on Actions and import widget browse to the widget zip file("tuicemen_tools_info.zip") and import. Do not unzip prior
Questions and suggestions are always welcome!
 >!
Note:Package was last updated 2019-04-20



Title: Re: 🛠HG Tools
Post by: Tuicemen on March 28, 2019, 04:41:21 PM
While playing with creating a widget for my weather triggers I found a command to check the uptime of the RPI and thought that would be cool to display But then I thought I should also be displaying the RPI time it thought it was so one could tell if the Pi clock was off. So I incorporated the two into the DateTimeInfo widget.
I've included this in the updated tools package. ;)
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 11, 2019, 01:46:48 PM
I've been playing a bit more with the Date Time widget and thought it also would be cool to see the CPU temperature as well as the day & month displayed other then numerical.
I'm still tweaking this  but will include it as an update to the DateTimeInfo program in the tools download set once done.
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 12, 2019, 12:54:02 PM
I wasn't satisfied with the display area this widget supplies so I decided to take a stab at creating a new widget.
This widget displays all info at once and should allow for easier addition of extra info.
Thought still in the early stages it is looking promising.
I'm looking at adding free space left, and total memory used info next
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 13, 2019, 03:41:39 PM
I've added the new widget and Status Info program to the tools package in the OP and left the DateTimeInfo program in.
The DateTimeInfo program will not get any new adds these will be added to the Status Info program at a future time.
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 17, 2019, 06:40:44 AM
I took some time off from developing the Weather Alerter Program and looked again at the possibilities of the Status Info program can display.
Wow the possibilities are endless with a RPI you can even read board voltages.
yesterday I added disk space total and available space which is why the attached shows a up time of just a few hours. I had forgot to expand the file system ::) :' I also added a free memory reading to this but I think I'm running low on memory myself  rofl
Title: Re: 🛠HG Tools
Post by: soxfan1966 on April 17, 2019, 05:38:01 PM
I downloaded the new program and widget and just added them (the one from 04/13) - looks good.  I'd like to get the updated one from today when you get it ready.  Thanks
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 17, 2019, 05:45:54 PM
I downloaded the new program and widget and just added them (the one from 04/13) - looks good.  I'd like to get the updated one from today when you get it ready.  Thanks
I'm still doing some minor tweaks to it but glad you like the current available one.
Good thing is the current widget doesn't need updating it expands with each new info line I add(provided I keep the information to a minimum).
I'd like to add another tool to go along with this but I'm at a loss right now for an idea. ::) :'
In any case I most likely will make the new version available on my site first. ;)
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 17, 2019, 10:58:35 PM
I believe I may have found some useful tools before I started this  quest  my pi was starting to get bogged down. not surprising I forgot to expand the file system as mentioned earlier  but my memory was starting to vanish and that can be expected with everything play with on this machine. However a tripple gain in free memory :o  How is that even possible!?
Now to just put it all together! rofl
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 18, 2019, 08:57:32 AM
Since I have more then one ZeroW running here (2) I decided to attempt to recreate this astonishing memory gain improvement.
I since it has different things running and using memory I didn't expect the same results and I didn't.
However I did gain almost double the free memory. :o
This is amazing but now I'm wondering did I just forget to run something ::) :'
Commands require root access but all are just simple console commands.
I doubt most users will see the same gain I have, but any improvement is a bonus even if short lived.
 >!
Title: Re: 🛠HG Tools
Post by: bkenobi on April 18, 2019, 11:33:43 AM
As I said early on in the hub's development, if you are considering performance of the card as important rather than strictly size, the RPiZW is not the right choice.

http://socialcompare.com/en/comparison/raspberrypi-models-comparison

The RPi3B+ has 4x as many cores clocked 40% faster running 64-bit (not 32-bit) with 2x the system memory and many more USB.  In fact, if you look at the specs, the RPiZW is slightly faster than the RPi1B (1GHz vs 700MHz) but it has less connections overall.

There's nothing wrong with the Zero, but it's not a performance board compared to the full sized options.  So, unless it's going into a confined space (moreso than the very compact RPi3), it's a poor choice for many reasons.
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 18, 2019, 12:59:35 PM
The ZeroW boards were chosen for more for their low cost and that they could handle HG with X10 more then any thing else. At the time these were going for under $5 a pop so users reluctant about the tinny SB computers wouldn't think twice about giving X10 on a PI a shot. In fact that's what got me using it in the first place.
If I fried a $5 board it would be no drain on my pocket book, $50 or more I would have felt.
Petera and I were looking to get users setup on a pi as cheaply as possible.

Whether one takes the performance of the SD card or the PI in general into account has no barring on the fact of improving operations.
I push my Zero W boards to the extremes and I do that for a reason.
I would have seen a simular improvement no matter what RPI this was done on.
In fact, I'm sure using the performance tools on my 3B+ will produce even better results as I use it for streaming Video, HA with HG and it is loaded with noobs which loaded  some unused apps that are space and memory hogs.
 ;)

Now I did discover that both ZeroW boards don't have the same amount of initial base memory even though both were purchased from the same vendor.  B:(
I just may have to switch things up a bit as to what is run from each. ::) :'
I also now know I'm glad I went with the 16 gig SD cards for my Zero W boards
 >!

Title: Re: 🛠HG Tools
Post by: bkenobi on April 18, 2019, 05:43:43 PM
If you are trying to push the board to the extreme, then you should make sure you have appropriate cooling.  Many people use these boards for pretty powerful tools and add passive and/or active cooling onto them.  I don't know if the RPi has thermal throttling, but if so and you are pushing it hard, it may slow down to avoid breaking.
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 19, 2019, 08:58:24 AM
The one that I'm pushing the hardest does have passive cooling, an addon board which adds 3 full size USB and Urit , runs X10 (cm19), Zwave (USB Dongle) and a Kinects Video Cam with motion. I don't have this overclocked in fact I don't think you can overclock a Zero W
I'm still experimenting with the Kinects but I've gotten further then I would have expected since Windows 7 and older had problems with it.
The other Zero is inside a CM15 and has no extra cooling of any kind and runs a few extra softwares besides HG and HA-bridge and Bluetooth is enabled for sound.

My reasoning for pushing the ZeroW boards hard is I want to be sure I can recommend it for use with the PiX10Hub and know for certain the average user won't have an issue. ;)
 >!

UpDate: I've posted the updated package !
Title: Re: 🛠HG Tools
Post by: Tuicemen on April 21, 2019, 09:24:13 AM
I never though of using the tools from the HomeGenie Plus app but it is possible to view both the DateTime Info and the Status Info widgets from it. I love the fact that the Plus app allows you to hide or show items which you wish displayed.
The DateTime Info pulls easily into the app the Status Info widget doesn't with out doing a bit of a change in the HG server prior to adding once added you can switch back. Hopefully Gene will get this bug worked out for the next update.
 >!
Title: Re: 🛠HG Tools
Post by: Tuicemen on May 13, 2019, 10:12:50 AM
So on the week end I decided to load my mini PC (Assus Eeebox) with Linux and HG to free up a RPi for another possible project.
This mini PC was incredibly slow running Windows (even XP) Linux does run much better but where it realy shines is running HG this is incredibly fast.
I liked these tools especially the Status display but wondered if all would work with a i386 Linux OS. The good news is yes though the Status info program needs some tweaking (editing) as the command to get the CPU temperature wasn't recognized.
Also lm-sensors needs to be installed then configured. While doing this I also noticed installing hddtemp would allow the hard drive temperature to be displayed with a bit of extra code added to the program.
https://askubuntu.com/questions/15832/how-do-i-get-the-cpu-temperature
 >!
Title: Re: 🛠HG Tools
Post by: Tuicemen on January 10, 2020, 07:09:54 AM
I use (look at) the status info program all the time usualy to keep an eye on cpu temperature. The other day I though it would be nice to have this also display the current build so I added this. True this isn't  needed, however I have 3 machines running HG and each is on a different build so it is an extra reminder of what machine I'm looking at.
Many Linux users frown on this program as it means you don't have to enter into the command line saying it stops newbies from learning Linux and I'm  spoon feeding users. ??? ::) Most the info displayed requires a command entered to retrieve the info and what is displayed is not all the info you get from the command. I only display what I thought was relevant for me.
 As well my memory isn't what it was so this saves me time having to look up commands.
Title: Re: 🛠HG Tools
Post by: soxfan1966 on January 10, 2020, 07:15:08 AM
I use this too, it's a nice easy summary of the state of the machine.
Title: Re: 🛠HG Tools
Post by: bkenobi on January 10, 2020, 11:23:54 AM
HG build info is also available by selecting the about item from the main menu.
Title: Re: 🛠HG Tools
Post by: petera on January 10, 2020, 01:02:07 PM
Yes the old HG forum is a great source for all those resources. One of the old forum members mentioned to me recently that he was considering establishing a new HG forum in a similar format to the old one and using the old posts as the backbone for it. It would certainly provide a perception of continuity as most if not all of the typical HG queries have been addressed there and it could possibly encourage some of the old forum members back. The format of the new forum was not to everyone’s liking.

It sounds like a good idea assuming there’s no copyright issues etc to consider.
Title: Re: 🛠HG Tools
Post by: Tuicemen on January 10, 2020, 01:17:36 PM
HG build info is also available by selecting the about item from the main menu.
What I added doesn't show the HG build but the Pi OS build(Stretch, Buster, Bullseye…), sorry for the confusion.
Yes the old HG forum is a great source for all those resources. One of the old forum members mentioned to me recently that he was considering establishing a new HG forum in a similar format to the old one and using the old posts as the backbone for it. It would certainly provide a perception of continuity as most if not all of the typical HG queries have been addressed there and it could possibly encourage some of the old forum members back. The format of the new forum was not to everyone's liking.

It sounds like a good idea assuming there's no copyright issues etc to consider.
I believe to old forum used the same software as this forum (SMF). Moving to something new is never to every ones liking. I do agree having the old posts on the same new forum would make things much easier, though I'm not sure it would encourage many old users back. As you've stated many times, many have moved on.
Title: Re: 🛠HG Tools
Post by: Tuicemen on January 10, 2020, 02:06:11 PM
Here's the three  different machines status displays
Title: Re: 🛠HG Tools
Post by: Tuicemen on January 10, 2020, 02:20:34 PM
Looking over my Status screen captures I see I forgot to expand my Buster file system B:(  B:(  B:(
Title: Re: 🛠HG Tools
Post by: petera on January 10, 2020, 02:49:15 PM
Well the good news is an old forum member is currently working on a dockerized version of HG. I was able to point him in the right direction but just didn't have the time to help him on this occasion.

This has been done by Alex in the past but this version will reflect the current HG version and the docker image should load on any platform including good old Windoze. The beauty of the docker image is that it doesn't need to concern itself about operating systems so technically you can have an infinite amount of HG instances running on the same board. Also it runs a lot faster and efficiently and a lot less prone to those freeze ups.

Now this will be something to look forward to
Title: Re: 🛠HG Tools
Post by: Tuicemen on January 10, 2020, 03:26:51 PM

Well the good news is an old forum member is currently working on a dockerized version of HG. I was able to point him in the right direction but just didn't have the time to help him on this occasion.

This has been done by Alex in the past but this version will reflect the current HG version and the docker image should load on any platform including good old Windoze. The beauty of the docker image is that it doesn't need to concern itself about operating systems so technically you can have an infinite amount of HG instances running on the same board. Also it runs a lot faster and efficiently and a lot less prone to those freeze ups.

Now this will be something to look forward to

That does sound promising. :)%
Title: Re: 🛠HG Tools
Post by: petera on January 10, 2020, 04:19:17 PM
Indeed. Few if any produce image files now unless they are capable of being packaged for Docker. Life is so easy as a result. I'm running Hass.io in a docker container and none of those nasties with system crashes and runtime errors. You'll find HG docker images from various GitHub maintainers that you are free to use. Many of them don't exceed v1.1 r525, the last time Gene packed in development. I wonder why. Self explanatory I suppose  :)%
Title: Re: 🛠HG Tools
Post by: LostDog88 on January 13, 2020, 06:12:31 PM
Just installed all your "tools" this morning Mr. T. Fabulous work. Thanks for those. Not sure I would use all of them, but I loaded them all anyways. As time goes on I will disable the ones I have no interest in and learn the ones I am interested in.

Again. Thanks. Really, stuff like that is a major help!
Title: Re: 🛠HG Tools
Post by: Tuicemen on January 13, 2020, 06:19:26 PM
Most of the tools were created just while learning how to run some CLI commands I rarely use any of them myself other then the info display. I grouped the tools all together as most were just simple programs.
Glad you found a use for some. >!
Title: Re: 🛠HG Tools
Post by: Tuicemen on February 07, 2023, 04:16:25 PM
Here's a scree grab of the widgets in the new UI