Please login or register.

Login with username, password and session length

Author Topic: What are HG scripts?  (Read 11718 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
What are HG scripts?
« on: March 13, 2019, 08:33:09 AM »

The word scripts may discourage some from trying these and it shouldn't. :( Some may thing these are simple bits of code which require editing to make work with their system which is not usually the case.
These are usually addon Programs/Apps or Macros for HomeGenie
 Someone has already done the grunt work (programing) for you!

True first versions of a script may require you to edit the code putting in some personal info but as they advance they become more newbie user friendly, and don't require you to scan through code. A option/settings screen allows you to check and enter options easily. Some can add options to existing devices either specific devices or any device.
Many of these scripts add things to HG that AHP could never do with out the SDK
The Old HomeGenie Forum has some nice script/programs which are well worth a look too. Although the old forum is read only users can comment on the scripts in this section just include a link to the script so others can easily find it and know what your writing about. ;)
Homegenie documentation has info that can help you create something if you wish to play around.
https://genielabs.github.io/HomeGenie/#/develop/programs However if you have what you consider a great addon idea for a HG addon but you don't wish to do the code work post it in this thread and maybe someone will create it for the community.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
How to install posted HG addon programs?
« Reply #1 on: April 28, 2019, 08:44:25 AM »

How to Install posted  programs: (macros, scripts, apps)
1: Download the posted file
2: These files have the extension hgx  since the forum won't handle HGX files you'll need to rename them with the hgx extention
3: In Homegenie go configure /programs and then to the group you wish to install the program to.
4: Now click one Actions bottom right and select import.
5: Browse to the HGX file you downloaded and renamed and click import.
6: if all goes well the program will now be in HG however it may still need to be activated by clicking on the warning symbol to the right. Once that symbol changes to a check mark your ready to go.
 >!
« Last Edit: April 28, 2019, 08:56:07 AM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
How to install Posted HG widgets?
« Reply #2 on: April 28, 2019, 08:53:35 AM »

How to install new widgets:
1: Download the posted file
2: These are zipped files and since the forum doesn't support the zip extention the file must be renamed with the zip extention (don't unzip).
3: In HomeGenie go to Configure/Widgets
4: Click on Actions (bottom right) and select import then browse to the zip file
5: With the zip file selected click import
6: The new widget should now be installed and be visible
7: Your done, enjoy the new widget.
 >!
« Last Edit: April 28, 2019, 08:55:27 AM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: What are HG scripts?
« Reply #3 on: January 13, 2020, 09:35:04 AM »

The next build of the PiX10Hub Image I'll remove all custom HG programs & widgets, it will be a vanilla(factory) HG install.
this image should work for any Pi board.
 >!
« Last Edit: January 26, 2020, 09:54:57 AM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: What are HG scripts?
« Reply #4 on: January 13, 2020, 01:38:15 PM »

Any scripts that you write can be included in the main HG distribution via the HG script submission approach.  I never did with mine because they were written with the older HG scripting approach.  While they work fine, they should be rewritten and I didn't take the time to do it.  Since yours are shiny and new, you might consider adding them so other users can go through the HG GUI to user their Windows machine and mouse to get them running.  Gene removed many of his own scripts in favor of this approach to streamline his base installation and I think it helped quite a bit getting new users up and running with a clean install as a start.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: What are HG scripts?
« Reply #5 on: January 13, 2020, 01:47:23 PM »

I have considered doing that though most are geared to the Raspbian OS and I doubt will work on a Windows machine. There are also subtle differences in the Raspbian and other Linux flavors OS that will make the scripts not work in another flavor of Linux. There realy are only a few that should work on any OS that HG will run on.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: What are HG scripts?
« Reply #6 on: January 20, 2020, 10:13:57 AM »

There are certainly some things that may work in Linux and not Windows if you are using command line calls or file locations.  If they are HG commands, they will work in any system.  I shy away from using command like commands whenever possible or for that very reason and living in the Mono framework can help avoid headaches.  Also, if you are making command line or file location hard coded locations, you might consider using a more general usage so that it doesn't break for other users.

My scripts were written for myself and, with a few exceptions, should still be usable for most anyone with minor tweaking.  Since my coding style is to include lots of in-line comments, it should be easy for others to understand what needs altering especially since HG has a built-in debugger that tells the user the line where the code broke.

Of course, this is your code for yourself but you are including it in an image that you are encouraging others to use.  If you share your work then it's always best to make it usable for the audience you are recommending it to.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: What are HG scripts?
« Reply #7 on: March 04, 2020, 07:48:07 AM »

I've copied most of my creations that I have posted here to my forum so if this forum is down when users are looking Mine may be up.
http://forums.tuicemen.net/index.php?board=124.0
I hope others will do the same.
Note: when posting creations to my site the files don't need to be renamed.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: What are HG scripts?
« Reply #8 on: March 04, 2020, 04:57:47 PM »

Gene provided a repository for scripts that can be installed directly from HG that may provide a better experience for users.  I did not follow through with my scripts because I had already shared them at GitHub to provide free access to all at any time.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: What are HG scripts?
« Reply #9 on: March 04, 2020, 05:03:58 PM »

yes realize that it just never hurts to have an extra back up.
I will eventually get my things moved to the repository >!
« Last Edit: April 18, 2021, 05:24:33 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: What are HG scripts?
« Reply #10 on: April 18, 2021, 08:27:29 AM »

HG is currently undergoing a rewrite which will include a new UI as well as a version using MS netcore.
Currently neither version using the new UI can use custom widgets (hopefully this will change). In any case moving to net core will require some program/scripts to be changed due to how they were written. I'll not attempt a rewrite of my script/programs posted here untill The HG rewrite is close to a stable release as some things may change and custom widgets may yet be allowed.
However I'll  mark my scripts/programs that will work with the new HG UI as well if they work with the NetCore build as I get arround to testing them. I'll  post in the OP "Works with new UI". This will indicate no changes are required for it to work with either version of the new UI.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.