more G-Labs products

Author Topic: New programs using duplicate PIDs  (Read 2152 times)

February 22, 2016, 11:17:03 AM
Read 2152 times

billy_hannant

  • *
  • Information
  • Newbie
  • Posts: 3
Hi all

I've just gotten a nice little Intel NUC and have been playing with HomeGenie to control our Hue lights and some WeMo switches.

It was going great until I tried to add a few extra programs in after I removed some redundant scripts I made. It tries to reuse unused PIDs which is great but when it gets to the end of the gap it just keeps using the same PID. >:(

I had the factory reset HG as the backup would do the same thing. I just thought it was something I done and started again.

Now the next day after just about completing the setup I was just optimising the setup when it happened again and I'm stuck at PID 1006 even though the highest PID I have is 1008. I had removed some old scripts I didn't need again. :-[

Before I go to a corner and cry is there a way I can tell HG to start at 1009 for the next one instead of 1006 over and over again. I don't want to start again but If I have to then I will. :'(

Hope someone can help.

Edit:

Also the Modules Cleanup doesn't list the new ones at 1006 which I have two.  :(

I've attached my backups that might be of use. The one with (1) is the current version.
« Last Edit: February 22, 2016, 11:22:03 AM by billy_hannant »

February 22, 2016, 04:56:36 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
How are you removing the old programs?  I use the web interface and last time I tried, it worked correctly.  If you are manually deleting things from the modules.xml, I suppose that could cause issues.  But, if you are removing them through the web interface, this sounds like a bug.  If so, perhaps submitting an issue on github would get more visibility.

February 22, 2016, 09:57:07 PM
Reply #2

billy_hannant

  • *
  • Information
  • Newbie
  • Posts: 3
All done via the web interface by clicking the delete button on a program.

I am on Version 1.1 beta r514 just to add.

I have found a way to edit the PID of one of the two that had the same PID via the backup of the xml file that lists all the programs and just did a restore and they are now in the Module Cleanup list again.  ;D

I've not looked into HG's files to do a direct edit as I've just been playing with the gui to start and used a bit of the web api but next time I can have a look there as well.

I've not tried to add another program yet as I've gotten the system just about right now but I will be adding a light sensor via a raspberry pi over next few days so I will post an update then.  8)

February 22, 2016, 10:51:17 PM
Reply #3

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
I got  same issue after a restore from r508 to r514. All new program I want create take PID 1000 and that pid is already used by another program. I have around 8 personnal programs in the backup from 1000 to 1009.

February 22, 2016, 10:59:21 PM
Reply #4

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Although it's a bit of a pain, you could save your programs to a hgx file and then restore individually.  This requires compiling and setting them up (as well as all modules that use them).  I would think modifying the modules.xml file to change the PID of one of the duplicates would be far easier.  This needs to be fixed since it sounds like a bug.  I'd recommend adding an issue to github so Gene can keep track of it.

March 23, 2016, 05:46:03 AM
Reply #5

lorenzanaj

  • *
  • Information
  • Newbie
  • Posts: 9
Running same version homegenie-beta_1.1.r514, and have the same problem....


March 23, 2016, 05:35:13 PM
Reply #6

lorenzanaj

  • *
  • Information
  • Newbie
  • Posts: 9
I did manage to find a work around. Mine would always select PID 1000 so it would stomp on the existing program and make a mess. So I stopped homegenie, went and restored a good backup of all the xml files. Modified program.xml file, searched for the associated <Address> tag and increment the exiting PID1000 to something not used (in my case 1004). I also found a reference to PID 1000 in group.xml so adjusted that file also. Then started homegenie up again and when I went to create a new program (PID1000) it got created correctly.


March 23, 2016, 08:44:17 PM
Reply #7

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196
This bug was submitted to github and I received notification from Gene that it was fixed but I dont know how the releases go around here and when it might be avaialable....

March 24, 2016, 03:48:50 PM
Reply #8

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Gene usually releases things to the testing release thread first.  If everything works out, he releases it with an update from the WebUI.  It will be fixed at some point, but I don't know what his plans for releases are.

March 25, 2016, 10:10:44 AM
Reply #9

Scuttle

  • *
  • Information
  • Newbie
  • Posts: 1
Any updates on this? Bug was posted a month ago, and I just spent two hours on a setup that's been totally trashed by this bug... HomeGenie is utterly broken and useless for me at the moment...

March 25, 2016, 04:01:36 PM
Reply #10

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If HG is messed up, you can restore a default configuration and start over.  If you have a backup, you can use that as a starting point to get you closer.  There was a recommendation by lorenzanaj a couple posts back on how to work around this issue.  Alternately, I would recommend installing an older version to get things set up (r512 was reported to work well).  If you make a backup with r512, you can restore it on a newer version (to keep as a backup).