more G-Labs products

Author Topic: win7 homegenie.exe process, serial port throughput hog?  (Read 956 times)

March 22, 2015, 05:03:29 AM
Read 956 times

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
Couple months ago I rebuilt our Toshiba 4+ year old i7 laptop drive because old drive was failing.  For a few weeks it ran great, very quiet and cool.  Then I re-installed HomeGenie (shows I am at r476 right now).  The past week it has been loud (fan cranking out very hot air) so I have been putting laptop to sleep/off (no HG :( ).

Tonight I was trying to figure out why it is running so hot/loud, with nothing running.  Using Win7 task manager the graphs show one or two of the eight cores are running 15%.  Process list showed nothing using more than 0%

I installed process explorer and it shows HomeGenie.exe using 15%, can't kill the process.  HG isn't really even running (???, nothing in the Win7 tray anyway).  So I start HG via the desktop shortcut, the manager process starts, I get the tray icon and web page.  If I stop the HG local service via tray, homegenie.exe stops (I think), fan slows down and the hot air is mostly gone.

What's going on here?  Is this normal?  It doesn;t seem like one or two cores at 15% should be generating this much heat and noise.


« Last Edit: March 26, 2015, 03:11:27 PM by kevin1 »

March 26, 2015, 03:18:15 PM
Reply #1

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
I'm finding that my arduino serial port code causes a lot of CPU consumption.  I used the serial port  HandleStringReceived example and added logic to find end of line and parse the data.  Running 9600 baud, arduino is sending 9 comma seperated values once per second.  In HG I wait for 30th transmission and then RaiseEvent for the data I want to show in my sensor widgets.

Should this be causing so much CPU utilization?  With this code enabled, I can't even get a reliable http connection to HG web server.  When I disable this arduino/serial code, it seems to run much better and I can quickly connect via web and android.

March 26, 2015, 04:39:35 PM
Reply #2

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330

Can I set this NewLine parameter in the HG class somehow?

https://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx

   NewLine   Gets or sets the value used to interpret the end of a call to the ReadLine and WriteLine methods.

I don't see the HG methods mentioned at the MSDN site, where can I find about the SerialPort class that HG uses?  The HG site class documents (http://www.homegenie.it/docs/doxy/a00009.html#a4f52027b1c2ed41feecef3acc66c814d) don' have as much detail as the MSDN.


I'm hoping to improve the performance by reducing the amount of processing I have to do by instead using the SerialPort class features documented on MSDN.

Thanks!