www.homeseer.com    
 

Go Back   HomeSeer Message Board > Analog & Digital IO Device Plug-ins > Analog & Digital IO Discussion > Arduino Plugin (3P)

Arduino Plugin (3P) Discussions related to the Arduion plugin for HS3 by enigmatheatre

Reply
 
Thread Tools Display Modes
  #121  
Old July 5th, 2016, 09:02 AM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
I've disabled the test board, it doesn't seem to have an impact on the total CPU usage.



I restarted the HS3 server yesterday, so here is the CPU usage after 18 hours:


It wasn't like this in the beginning, but it's been like this for a while.
__________________
HSPro 3.0.0.435, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
Running on Windows 10 (64) virtualized
on ESXi (Fujitsu Primergy TX150 S8).
WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!
Reply With Quote
  #122  
Old August 29th, 2016, 02:10 PM
Ron Ron is offline
Seer
 
Join Date: Apr 2016
Location: Netherlands
Posts: 6
Question Version 1.0.0.122 Output problem

Hello Greig,

I have updated de plugin to beta version 122.
after the update i uploaded the new sketch to the arduino, but ethernet would not connect anymore. when i deleted the board and added a new one, connection was succesful.
When i started adding output pins, i could only add 10 pins, with the next one i got the error message "A maximum of 40 Outputs can be added to each board.".
Do you have a solution for this?"

Tnx
Ron
Reply With Quote
  #123  
Old August 29th, 2016, 04:03 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
Fixed in V.123.
You can use the old Sketch with this build.

Greig
__________________
Zwave = Z-Stick, 3xHSM100™ 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts =
Various
Reply With Quote
  #124  
Old August 29th, 2016, 05:17 PM
Ron Ron is offline
Seer
 
Join Date: Apr 2016
Location: Netherlands
Posts: 6
Thumbs up Fixed

Quote:
Originally Posted by enigmatheatre View Post
Fixed in V.123.
You can use the old Sketch with this build.

Greig
Hello Greig,

Wow what a fast fix!!! Its working.
Many tnx

Ron
Reply With Quote
  #125  
Old September 3rd, 2016, 10:21 PM
jim@beersman.com jim@beersman.com is offline
Seer
 
Join Date: Jul 2013
Location: Missouri
Posts: 26
Version 123

I have several of the NodeMCU devices sitting around so I installed your latest version on one. I'm able to connect Homeseer to the device and it polls the one input pin, a door sensor when it first connects. It does not appear to poll the device again unless I have HomeSeer disconnect and then reconnect.

The led on the NodeMCU turns On and Off with the opening and closing of the sensor so I'm assuming it it correctly identifying the state of the sensor

I just noticed that on my Arduino Mega, Version 123 does not correctly report the correct status of inputs greater than 11.

Last edited by jim@beersman.com; September 3rd, 2016 at 11:31 PM.
Reply With Quote
  #126  
Old September 4th, 2016, 09:57 AM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
Quote:
Originally Posted by jim@beersman.com View Post
I have several of the NodeMCU devices sitting around so I installed your latest version on one. I'm able to connect Homeseer to the device and it polls the one input pin, a door sensor when it first connects. It does not appear to poll the device again unless I have HomeSeer disconnect and then reconnect.

The led on the NodeMCU turns On and Off with the opening and closing of the sensor so I'm assuming it it correctly identifying the state of the sensor

I just noticed that on my Arduino Mega, Version 123 does not correctly report the correct status of inputs greater than 11.
Hi Jim,

Yes this is a known problem in the sketch that I have spent many hrs trying to find this bug but just can not pin it down. There is support for NodeMCU in the plugin but I would like to get inputs working before launching this.
If you have any clues as to a fix for this then please do speak up.
Greig.
Reply With Quote
  #127  
Old September 4th, 2016, 11:42 AM
jim@beersman.com jim@beersman.com is offline
Seer
 
Join Date: Jul 2013
Location: Missouri
Posts: 26
Version 123

Quote:
Originally Posted by enigmatheatre View Post
Hi Jim,

Yes this is a known problem in the sketch that I have spent many hrs trying to find this bug but just can not pin it down. There is support for NodeMCU in the plugin but I would like to get inputs working before launching this.
If you have any clues as to a fix for this then please do speak up.
Greig.
Greig, one thing I noticed in the debug log file is that it shows Board Type as 0 even though the Sketch has the Board Type defined as 2. I don't know what that will affect but it was something I noticed.

SKETCH

/********************************************************
Arduino to Homeseer 3 Plugin written by Enigma Theatre.
V1.0.0.122
* *
*******Do not Change any values below*******************
*/


//Global Variables
#define ISIP 1
#define BoardType 2
const byte BoardAdd = 1;
byte Byte1, Byte2, Byte3;
unsigned int Byte4, Byte5;
char* Version = "1.0.0.122";
bool IsConnected = false;


DEBUG LOG FILE

************************************************************ ****************************
Arduino Plugin Version = 1.0.0.123

*************************************Homeseer*************** ****************************
Homeseer Version = 3.0.0.297
Homeseer IP = 192.168.1.88
OS Version = Microsoft Windows 10 Home (6.2.9200.0)

*************************************Plugins**************** ****************************
Plug-In List, Arduino Plugin: is currently enabled.

**************************************Setup***************** ****************************
Ref = 176 | Address = Arduino, Board:1 advancedeth = 1, autoconnect = 1, boardno = 1, boardtype = 0, comport = 1001, debounce = 30, index = 1, ipaddress = 192.168.1.60, macaddress = 00:AA:BB:CCE:01, port = 8900, type = Board,
Ref = 177 | Address = Arduino, Board:1, Input:1 boardno = 1, index = 1, key = I, pin = 2, pinkey = I, type = Input,
Board: 1, Board index: 176, Comport = 1001

Last edited by jim@beersman.com; September 4th, 2016 at 11:53 AM.
Reply With Quote
  #128  
Old September 8th, 2016, 09:39 AM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
CPU-usage again!

I've upgraded to .124 and I've replaced the original Arduino board with an Arduino MEGA. That helped. First of all I was able to install the sketch without problems, and it seems to be stable. The Ethernet shield is the same, though (might try to upgrade that too).


The upgrade to .124 didn't seem to do much, but the upgrade to a Mega board seem to help. The average CPU usage for the server went from 22-23% to 16-18% (when the plugin is disabled it is down to 10-12, though).



Overall much better, but it it's still far from what others experience.


Just a quick question though: How do the plugin find the devices to update? If it's looping through the entire database when updating device status, that is typically a good way slow down a plugin (I do this mistake when developing my own plugins, as it works fine on my dev computer which has a HS3 installation with only a few devices. My HS3 server has almost 900 devices.)
Reply With Quote
  #129  
Old September 8th, 2016, 11:31 AM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
Quote:
Originally Posted by Moskus View Post
CPU-usage again!

I've upgraded to .124 and I've replaced the original Arduino board with an Arduino MEGA. That helped. First of all I was able to install the sketch without problems, and it seems to be stable. The Ethernet shield is the same, though (might try to upgrade that too).


The upgrade to .124 didn't seem to do much, but the upgrade to a Mega board seem to help. The average CPU usage for the server went from 22-23% to 16-18% (when the plugin is disabled it is down to 10-12, though).



Overall much better, but it it's still far from what others experience.


Just a quick question though: How do the plugin find the devices to update? If it's looping through the entire database when updating device status, that is typically a good way slow down a plugin (I do this mistake when developing my own plugins, as it works fine on my dev computer which has a HS3 installation with only a few devices. My HS3 server has almost 900 devices.)
Moskus,

I am not seeing this and have not had reports of this but will have a look in to it. The only time the plugin looks for device info in a loop is when the plugin config page loads to get all the up to date info.

What I/O are you using and how many boards?

Greig.
Reply With Quote
  #130  
Old September 9th, 2016, 03:15 AM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
Quote:
Originally Posted by enigmatheatre View Post
What I/O are you using and how many boards?
Just one board using pins 2,3,5 and 6 as output.
Just to be sure, I've removed the board and re-added it. Same issue. I don't really notice a CPU usage drop when I disconnect the board.


What makes this really weird, is that I also see a drop in the CPU usage of my netcam server, running Netcam Studio! That one I can't explain, but I have confirmed it again, just to be sure.

Are there any broadcasting going on? (I don't think so, but I really can't explain what I'm seeing).
Reply With Quote
  #131  
Old October 18th, 2016, 08:57 AM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
As the summer is now officially over, I removed the board just to test. The Arduino plugin still behaved like it did before (and as described earlier).

This is weird!
Is the plugin doing some port scanning or anything else network related? It's the only thing I can think of.


I disabled the plugin just ot see what happened. Guess when:

Reply With Quote
  #132  
Old October 18th, 2016, 06:15 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
Quote:
Originally Posted by Moskus View Post
As the summer is now officially over, I removed the board just to test. The Arduino plugin still behaved like it did before (and as described earlier).

This is weird!
Is the plugin doing some port scanning or anything else network related? It's the only thing I can think of.


I disabled the plugin just ot see what happened. Guess when:

What Version of the plugin are you running as I did have a stab at a fix for this for you but I can not replicate it so it is hard to find.

Greig.
Reply With Quote
  #133  
Old October 19th, 2016, 02:42 PM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
Hey! I'm on .124 still! I'm not getting used to beta's not showing as updates, but I do understand why...

I'll try that, thanks!


And thanks for sticking with me. I know it's a pain trying to debug issues you can't replicate.
Reply With Quote
  #134  
Old October 19th, 2016, 03:26 PM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
Wow, I'm impressed! It's looking good so far!
Reply With Quote
  #135  
Old October 19th, 2016, 03:32 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
Quote:
Originally Posted by Moskus View Post
Wow, I'm impressed! It's looking good so far!
Good News. Fingers crossed it has fixed it for you.

Greig.
Reply With Quote
  #136  
Old October 20th, 2016, 02:49 AM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
I'm calling it. It's fixed!
I'll add back the first board and see if the trend continues (as we expect).

I cannot pinpoint where I enabled it. I know where (around 19.10.2016 21:00) , but I can't see it.

Reply With Quote
  #137  
Old October 21st, 2016, 02:29 AM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,809
Yes. Confirmed fixed!
Last night I added back the first Arduino Mega board as before, and nothing happened. CPU usage still averages around 11-12%.

So the CPU dropped from around 20% to 12% from .124 to .127. Nice work!
Reply With Quote
  #138  
Old October 21st, 2016, 06:03 AM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
Great. Another one down...

Sent from my SM-G925F using Tapatalk
Reply With Quote
  #139  
Old November 2nd, 2016, 08:09 PM
artart88 artart88 is offline
Seer
 
Join Date: May 2015
Location: La Mesa, CA
Posts: 24
Add Auto Connect Back In

Hi Greig,

Were you able to add back to the ethernet API version in the auto connect feature that got left out at some point for boards beyond board 1?

Thanks,

Art
Reply With Quote
  #140  
Old November 22nd, 2016, 04:55 AM
BeePee BeePee is offline
Seer
 
Join Date: Sep 2009
Location: Australia
Posts: 61
ESP 8266 sleep function

Hi Greig

First off ,Thank You for all your hard work in making this plugin, with the unlimited versatility of the Arduino environment this plugin offers one of the biggest steps forward to home automation. And one of the biggest head aches to the programmer.

I am new to this environment but my head is spinning with the potential.

I notice you have mentioned several times you are working on support for more boards and of special interest to me are the ESP series of boards. During your development in this area would you kindly consider adding some "Sleep" function for the ESP boards, something to put the boards to sleep for a predefined interval, then wake and send data to HS and then sleep again. Obviously the plugin would have to inhibit polling during this sleep time or it would return connection errors.

The reason for this is it would open up a range of opportunity for battery operation as the power requirements are very low during the sleep period.

Thanks

Brian
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UNO with ENC28J60 petez69 Arduino Plugin (3P) 2 August 22nd, 2014 06:56 AM
GE Concord Plugin Bug and Feature Requests piperpilot GE Concord 4 for HS2 55 April 30th, 2013 10:03 AM
Next Plugin - Feature Requests sailwhatcom CheaperRFID Plug-In (3P) 24 November 9th, 2011 12:01 PM
Feature Requests for Insteon Plugin? wntdone Insteon Plug-in (Mark Sandler) 2 June 18th, 2010 10:57 AM
*** BL Plugin Feature Requests *** Blade Blade Plug-Ins 0 March 5th, 2010 03:05 PM


All times are GMT -4. The time now is 06:58 AM.


Copyright HomeSeer Technologies, LLC