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
  #21  
Old April 22nd, 2016, 08:05 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 dhalsall View Post
Hi Greig,

I'm just starting to build a PI Linux install of HS3 and am planning to use a Mega Arduino for Analogue inputs.

I thought I had read up enough before purchasing bits... but I'm now just cluing in that Ethernet would be the only supported method of connection.

Curious if you're planning to eventually have USB connectivity supported?

Also, I had also just ordered the YUN Shield, but I'm gathering this will probably not work either?

thanks!
Dave
Hi Dave,

Sorry to hear you want to use usb but I did attempt to get this going when I first ported the plugin to Linux but there are to many limitations to make this work reliably and it would involve people manually changing files depending on there set-up. I also found the ports change on every restart so this is a big problem.
The Yun is not a standard Arduino board that will not run on the standard library's so again would take so much to change just to get one other board in there plugin that it is not worth the time and as I hope you can understand I can not support everything.

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
  #22  
Old April 22nd, 2016, 10:09 AM
dhalsall dhalsall is offline
Seer Plus
 
Join Date: Nov 2015
Location: Ontario
Posts: 122
Quote:
Originally Posted by enigmatheatre View Post
Hi Dave,

Sorry to hear you want to use usb but I did attempt to get this going when I first ported the plugin to Linux but there are to many limitations to make this work reliably and it would involve people manually changing files depending on there set-up. I also found the ports change on every restart so this is a big problem.
The Yun is not a standard Arduino board that will not run on the standard library's so again would take so much to change just to get one other board in there plugin that it is not worth the time and as I hope you can understand I can not support everything.

Greig.
Absolutely, I totally understand.

Thanks for the quick reply Greig, have a great day!

Dave

Sent from my SGH-I337M using Tapatalk
Reply With Quote
  #23  
Old May 5th, 2016, 12:57 AM
dhalsall dhalsall is offline
Seer Plus
 
Join Date: Nov 2015
Location: Ontario
Posts: 122
Hello again...

I ended up purchasing a W5100 ethernet shield (Itead).

Starting playing with the plugin - and for the life of me, I couldn't get this to work.

After burning a couple of nights on this, I just discovered the issue and thought I should post here in case there's other poor sods like me poking away at such silliness....

It turns out, this shield I purchased from Robotshop.com is V1.0, and won't work directly with a Mega2650. (Even though there is no notice of this on their site, or really anywhere clearly). Also, FYI; V1.1 has one ICSP socket added, which will be compatible with more boards.

Jumpers are required to mod this to operate on the Mega... clue found in the Wiki for this particular sheild:

Quote:
Iteaduino communicates with both the W5100 and SD card using the SPI bus. This is on digital pins 11, 12, and 13 on the UNO/Duemilanove and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the W5100 and pin 4 for the SD card. These pins cannot be used for general I/O. On the Mega, the hardware SS pin, 53, is not used to select either the W5100 or the SD card, but it must be kept as an output.

Note that because the W5100 and SD card share the SPI bus, only one can be active at a time. If you are using both peripherals in your program, this should be taken care of by the corresponding libraries. If you're not using one of the peripherals in your program, however, you'll need to explicitly deselect it. To do this with the SD card, set pin 4 as an output and write a high to it. For the W5100, set digital pin 10 as a high output.
So, my next question is... assuming someone else has this combination... do I need to worry about setting Digital pin 4 to an output and writing it high to avoid the SD card reader from causing issues on the SPI bus?

I have now successfully got the plugin to see the board and have one Analogue sensor sending successful values.
Reply With Quote
  #24  
Old May 30th, 2016, 07:03 PM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Pins 10 - 13 missing

I'm trialing the plugin. It looks very powerful. It's connecting well after having installed an ethernet shield and downloaded the sketch.
Pins 10-13 are not selectable from the config screen. Is there any reason for this?

Last edited by chimera; May 30th, 2016 at 09:31 PM.
Reply With Quote
  #25  
Old May 30th, 2016, 07:14 PM
AllanMar AllanMar is offline
Seer Deluxe
 
Join Date: Sep 2011
Location: Canada
Posts: 183
Quote:
Originally Posted by chimera View Post
I'm trialing the plugin. I looks very powerful. It's connecting well after having installed an ethernet shield and downloaded the sketch.
Pins 10-13 are not selectable from the config screen. Is there any reason for this?
They're used to communicate with the Ethernet shield (assuming this is not a mega).
Reply With Quote
  #26  
Old May 30th, 2016, 10:05 PM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Yes I'm using the Uno. Thanks for that.
Reply With Quote
  #27  
Old March 16th, 2017, 06:41 AM
ZoRaC ZoRaC is offline
Seer Deluxe
 
Join Date: Jul 2016
Location: Trondheim, Norway
Posts: 139
Does the latest beta work with NodeMCU over wifi on Linux?
Reply With Quote
  #28  
Old March 16th, 2017, 06:46 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 ZoRaC View Post
Does the latest beta work with NodeMCU over wifi on Linux?
Yes this should work on Linux. I have not personally tested it but I see no reson for it not to.

Greig.

Sent from my SM-G925F using Tapatalk
Reply With Quote
  #29  
Old March 18th, 2018, 12:02 PM
dsieg61 dsieg61 is offline
Seer
 
Join Date: Nov 2013
Location: USA
Posts: 38
Ardunio Compile and Upload Problems

Hello,
I am running a Raspberry Pi (Jessie Rasbian) with HomeSeer 368 (Linux). I have downloaded the Linux Arduino plugin (147), with the associated libraries and Sketch. I am using the Arduino utility 1.8.1 (although all the same stuff happens with 1.8.5). All I am trying to do is to use the plugin (not API), to configure an output pin to turn a lead on and off.
When compiling and verifying the sketch I get this, see attached "arduino-problems.txt" file. So fine, they are warnings. I go to upload the sketch to the Arduino Uno, it takes forever to get done uploading, then I find out it never really uploaded. I get "Version mismatch" errors because version 1.0.0.127 is loaded, and it is expecting 1.0.0.147. I know that the cause of this is due to I had the Arduino Uno connected and programmed to my Windows HS3 machine (version 127 sketch), and had it all working fine over the network. If anyone can shed some light on this I would appreciate it. I seem to be going backwards trying to get this plugin to work.
Thanks,
David
Attached Files
File Type: txt arduino-problems.txt (4.2 KB, 4 views)
Reply With Quote
  #30  
Old March 18th, 2018, 01:17 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
Did you transfer your setup or are you starting from scratch?
Did you download the sketch from the plugin page on your Linux system and not use the old one?

Greig.

Sent from my SM-G950F using Tapatalk
Reply With Quote
  #31  
Old March 18th, 2018, 03:06 PM
dsieg61 dsieg61 is offline
Seer
 
Join Date: Nov 2013
Location: USA
Posts: 38
I started from scratch. Attached is the sketch file I am using (basic default sketch). I got rid of the compiler warning messages (except for the memory usage) by rebooting the Pi HS3 server (which is what I am using to compile and upload the Arduino). It still is not updating the Arduino. Seems similar to the above post about pins on the WS5100 EtherShield pins, but it is not clear what you need to do to fix it. I tried to tie D4 high with a resistor to 5v, but that didn't do anything.
David
Attached Files
File Type: txt HomeseerBoard1-v6.txt (24.8 KB, 3 views)
Reply With Quote
  #32  
Old March 18th, 2018, 04:05 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,815
The sketch looks fine to me.
The board is not being updated with this sketch so this is a problem with the upload process.
I have never used the Arduino IDE on Linux so not sure where to go with this.
Maby some other users will be able to help if they have used it but if you have a windows system available just use that to update the board the connect it to the PI with the Ethernet.

Greig.

Sent from my SM-G950F using Tapatalk
Reply With Quote
  #33  
Old March 18th, 2018, 04:51 PM
dsieg61 dsieg61 is offline
Seer
 
Join Date: Nov 2013
Location: USA
Posts: 38
Thanks for the quick replies!
OK, so I have a windoze10 box. I am trying these two versions of the Sketch file:
HomeseerBoard1-v1: This is a sketch(version 127) created from the Arduino plugin on the windows box. This is the one that has worked in the past.

HomeseerBoard1-v6: This is a sketch (version 145) created from the Arduino plugin on the Raspberry Pi, and copied over to the windows box. The one I can't get to upload to the Arduino from Linux IDE

Taking your advice above, I figure I would be able to take the Pi Sketch and upload it with Arduino IDE on the windows box, remove it from the Windows box, plug it into the network and all would be good.

Using either Arduino IDE 1.6.8, or 1.8.5 on the windows box, via connection through the com3 port, with either Genuine Ardunio, or Arduino Ethernet selected, I can upload both sketches to the Arduino (via com3). When done uploading, ping will only respond to the V1 sketch file. There is no network connection using the V6 version.
Can I really copy over a Linux sketch to the windows box to do the upload to the Arduino?
Thanks,
David
Attached Files
File Type: txt HomeseerBoard1-v1.txt (18.7 KB, 1 views)
File Type: txt HomeseerBoard1-v6.txt (24.8 KB, 1 views)
Reply With Quote
  #34  
Old March 18th, 2018, 05:28 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 dsieg61 View Post
Thanks for the quick replies!
OK, so I have a windoze10 box. I am trying these two versions of the Sketch file:
HomeseerBoard1-v1: This is a sketch(version 127) created from the Arduino plugin on the windows box. This is the one that has worked in the past.

HomeseerBoard1-v6: This is a sketch (version 145) created from the Arduino plugin on the Raspberry Pi, and copied over to the windows box. The one I can't get to upload to the Arduino from Linux IDE

Taking your advice above, I figure I would be able to take the Pi Sketch and upload it with Arduino IDE on the windows box, remove it from the Windows box, plug it into the network and all would be good.

Using either Arduino IDE 1.6.8, or 1.8.5 on the windows box, via connection through the com3 port, with either Genuine Ardunio, or Arduino Ethernet selected, I can upload both sketches to the Arduino (via com3). When done uploading, ping will only respond to the V1 sketch file. There is no network connection using the V6 version.
Can I really copy over a Linux sketch to the windows box to do the upload to the Arduino?
Thanks,
David
David,

The plugin uses the same sketch for windows and Linux so it should not matter where it is from. The best way to get it is to browse to the Linux HS system from the windows system then go to the config page and download the sketch.
The plugin is also the same but checks the OS and makes changes when required.

Both sketches look fine to me. I see no reason for it not to work.

Can you please enable debug logging on the plugin config page then try and connect the board again then wait 5min. You can then disable debug logging and click on the link to download it and send it to me to have a look at.

It looks to me like the board is not updating to the new version but I cant work out why!

I am off to bed and working tomorrow so it might be a couple of days before I can get back to you.

Greig.
Reply With Quote
  #35  
Old March 18th, 2018, 06:55 PM
dsieg61 dsieg61 is offline
Seer
 
Join Date: Nov 2013
Location: USA
Posts: 38
Thanks Greig,
I actually am beginning to think that this is an issue with the W5100 Network Shield. There are a number of posts (on other sites) of people with the same issue as myself (not being able to upload a sketch with the W5100 shield attached). So, for now I will update and upload the sketch from the windows box. Once uploaded, I can disconnect from the serial and connect to the network, and it is fine. Kind of a pain though.
Regards,
David
Reply With Quote
  #36  
Old March 18th, 2018, 07:02 PM
dhalsall dhalsall is offline
Seer Plus
 
Join Date: Nov 2015
Location: Ontario
Posts: 122
Hi David,

I haven't experienced your issue exactly, but I did run into issues when moving to a newer version some time ago.

For my only Linux install, I'm having success on a Mega with:

Sketch Ver. 1.0.0.101
Plugin Ver. 1.0.103

I realize it may not be possible to go back to those versions, but just FYI.

Is it a Mega 2560 you're using also?
Reply With Quote
  #37  
Old March 19th, 2018, 12:28 PM
dsieg61 dsieg61 is offline
Seer
 
Join Date: Nov 2013
Location: USA
Posts: 38
dhalsall,
Thanks for the info. It is actually a knockoff Arduino Uno. I have seen posts that indicate that there is an issue around the W5100 reset times conflicting with the bootloader. Holding the reset button during the time it says "Compiling", and release when it says "Uploading", removing resistors on the W5100 next to the reset switch, etc. The reset button thing did not work, and there appear to be differences on my W5100 board than others (the beauty of knockoffs ;( ). So, I will do some more research to see if I can find a path forward. Probably should just bite the bullet and get genuine Arduino stuff. In the meantime, I have a way to experiment with what was the original intention:

To create a inexpensive remote unit that can provide temp, motion, light levels, etc. back to my HS3 app.
Regards,
David
Reply With Quote
  #38  
Old March 19th, 2018, 11:50 PM
dsieg61 dsieg61 is offline
Seer
 
Join Date: Nov 2013
Location: USA
Posts: 38
Well, I think that I have been way off base the whole time. I assumed that in the Arduino IDE environment, that selecting the "Arduino Ethernet" as the board, and com port "/dev/ttyAMA0" (on Linux), that it would just upload to the Arduino Uno. Obviously, it doesn't work that way. Running the Arduino IDE from the Windoze box, it only has a selection for "Com 3". Nothing about the network. Reading some ardunio posts, you can program the unit over the network, but you need to set up a tftpboot environment. After enabling the verbose logging on the windows IDE and uploading via com 3, I saw that it logged a bunch of stuff including the upload status. I never got anything like this on the Linux side. So, basically, it never connects to the arduino and therefore does not know where to upload the sketch file. Even though it never logs it, it must just timeout after a while.
In summary, you can have the Arduino work over the network, but it has to have the sketch uploaded via a windows serial port connected to the arduino, then removed from the serial port and connected to the network. Works fine then.
If anyone has a different view-point on this, let me know. I am still new to the Arduino, and am no expert.
Regards,
David
Reply With Quote
  #39  
Old March 20th, 2018, 08:42 AM
Searider's Avatar
Searider Searider is offline
Seer
 
Join Date: Dec 2010
Location: USA
Posts: 62
Quote:
Originally Posted by dsieg61 View Post
In summary, you can have the Arduino work over the network, but it has to have the sketch uploaded via a windows serial port connected to the arduino, then removed from the serial port and connected to the network. Works fine then.

David
I only use Windows but this is how I have done it using the Node-MCU board.
Reply With Quote
  #40  
Old March 20th, 2018, 08:53 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 dsieg61 View Post
Well, I think that I have been way off base the whole time. I assumed that in the Arduino IDE environment, that selecting the "Arduino Ethernet" as the board, and com port "/dev/ttyAMA0" (on Linux), that it would just upload to the Arduino Uno. Obviously, it doesn't work that way. Running the Arduino IDE from the Windoze box, it only has a selection for "Com 3". Nothing about the network. Reading some ardunio posts, you can program the unit over the network, but you need to set up a tftpboot environment. After enabling the verbose logging on the windows IDE and uploading via com 3, I saw that it logged a bunch of stuff including the upload status. I never got anything like this on the Linux side. So, basically, it never connects to the arduino and therefore does not know where to upload the sketch file. Even though it never logs it, it must just timeout after a while.
In summary, you can have the Arduino work over the network, but it has to have the sketch uploaded via a windows serial port connected to the arduino, then removed from the serial port and connected to the network. Works fine then.
If anyone has a different view-point on this, let me know. I am still new to the Arduino, and am no expert.
Regards,
David
OK this would be the problem. If you are selecting "Arduino Ethernet" as the board then it will not upload on to the Uno with an ethernet shield as the "Arduino Ethernet" board is a different product and not an Uno. You need to select Uno as your board as that is what you are using and the Sketch tells the board it has the Ethernet shield on it and the Arduino IDE.

Greig.
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
Arduino Plugin Beta Version Info. enigmatheatre Arduino Plugin (3P) 9 October 29th, 2016 10:38 AM
Raspberry PI that works with the Arduino Plugin is in beta. Jakob.Sand Arduino Plugin (3P) 11 August 9th, 2016 06:01 PM
hstouch server plugin linux 3.0.0.94 beta stefxx HS3Touch Server Plug-in 1 April 13th, 2016 06:57 PM
Arduino Plugin and Linux mihaium Arduino Plugin (3P) 2 April 18th, 2015 11:04 AM
HS3 MNSandler Insteon plugin v3.0.4.10 Beta for Linux mnsandler Insteon Plug-in (Mark Sandler) 15 July 13th, 2014 09:33 PM


All times are GMT -4. The time now is 07:52 AM.


Copyright HomeSeer Technologies, LLC