Unenable C# module/program from File system

Is there a way I can un-enable one of my programs(C#) from my Raspbery Pi file system.

The program is looping, and will not let anything else run.

John

Are you asking how to turn off a HG program? Or are you asking about something that is a service on your RPi? Or what exactly?

If it’s a HG program, you can go to the programs and select the 3 dots, then select disable.

HomeGenie user interface will not load, as my program is looping with a Program.Notify, and eating all resources.

That’s the way I was reading it I just wanted to confirm. You didn’t mention it was locking the interface so that makes it a more difficult question. Yes, it is possible to run a program from the web API but I don’t have an example of how. I’m assuming (though don’t have the documentation to confirm) that if you can run you should be able to halt a program.

The problem is that if the GUI is locked, it might not let the web API run because the whole thing is broken. You can modify what is running though editing the programs.xml file and changing the field. It would be better to stop the service, change the xml file, then restart the service.

It might also be an idea to retrieve the logs and see if you can extract any further detail on the issue.

Logs would be good! HG logs are likely turned off, but the Linux logs may help potentially. If HG logs aren’t turned on and you want to see what’s going on, you can run the service manually so you see the output on the console.

@bkenobi I vaguely remember a similar issue way back that was resolved with a Mono upgrade but I imagine the OP is already running the latest release.

Checked Logs. They are filled with.

2022-07-13 10:00:50.0294 Info HomeAutomation.HomeGenie.Automation 1001 Automation Program Program.Notification {“Title”:“1001 Module: HomeGenie.Automation.Scripting.ModuleHelper”,“Message”:“patameter: HomeGenie.Data.ModuleParameter”}
2022-07-13 10:00:50.0378 Info HomeAutomation.HomeGenie.Automation 1001 Automation Program Program.Notification {“Title”:“1001 Module: HomeGenie.Automation.Scripting.ModuleHelper”,“Message”:“patameter: HomeGenie.Data.ModuleParameter”}
2022-07-13 10:00:52.4929 Info HomeAutomation.HomeGenie.Automation 1001 Automation Program Program.Notification {“Title”:“1001 Module: HomeGenie.Automation.Scripting.ModuleHelper”,“Message”:“patameter: HomeGenie.Data.ModuleParameter”}
2022-07-13 10:00:52.5045 Info HomeAutomation.HomeGenie.Automation 1001 Automation Program Program.Notification {“Title”:“1001 Module: HomeGenie.Automation.Scripting.ModuleHelper”,“Message”:“patameter: HomeGenie.Data.ModuleParameter”}
2022-07-13 10:00:52.5152 Info HomeAutomation.HomeGenie.Automation 1001 Automation Program Program.Notification {“Title”:“1001 Module: HomeGenie.Automation.Scripting.ModuleHelper”,“Message”:“patameter: HomeGenie.Data.ModuleParameter”}
2022-07-13 10:00:52.5261 Info HomeAutomation.HomeGenie.Automation 1001 Automation Program Program.Notification {“Title”:“1001 Module: HomeGenie.Automation.Scripting.ModuleHelper”,“Message”:“patameter: HomeGenie.Data.ModuleParameter”}
2022-07-13 10:00:52.5369 Info HomeAut

I am looking for a way to flag program C# 1001 and disabled in the Homegenie files/database/configs?
I cannot accesss the Homegenie User Interface, hung.

While you’re trying to figure out a solution could I suggest the following in this order.

As suggested above attempt to start HG manually. Report back the result.

With the HG service try a system upgrade

sudo apt update
sudo apt upgrade

Once completed try launching the HG service again and report back the results

Try a fresh install of HG on a fresh SD card. Did you do a configuration backup of HG at any stage. If so try to restore this on your fresh install

From what I can remember any Program 1000 or over is a user created program. It is for me on my system. If so you could follow @bkenobi advice and try edit/delete this program in the relevant .xml file.

It sounds like your configuration is corrupted at this stage. Again I’d suggest you take an image copy of your current SD card before you attempt any of the above

@lastbit any results back on the suggestions offered above. It would be nice to close this issue off for the benefit of others who may experience a similar issue.

Back on Line. I have a back-up of configuration. Trying not to loose all done for a few day days.

I will try editing XML file.

It is a user program in C#.

More to come

Success! Thank you @bkenobi.

Process Was: To Stop Errant user C# program 1001

  1. stop homegenie
  2. In directory programs ren 1001,dll to 1001a.dll
  3. In directory programs ren 1001,dll.mdb to 1001a.dll.mdb
  4. start homegenie
  5. via web interface Configure → Programs → Select Program Group
  6. For 1001 Program select three bars to the right, and Select Disable
  7. stop homegenie
  8. In directory programs ren 1001a,dll to 1001.dll
  9. In directory programs ren 1001a,dll.mdb to 1001.dll.mdb
  10. start homegenie
  11. restart web interface

You can now access the program code via the web interface, and do needed corrections.

Thanks all.
Saved me a lot of time and re-thinking.

That works so long as you know the number of the program that’s getting stuck. If not but you know it’s a user made code, you can just do the same (or move to a temporary directory) for all models 1000+. Anything under 1000 is reserved by HG for it’s known/built-in Apps as @Petediscrete stated.