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
  #161  
Old February 15th, 2017, 12:41 PM
nl_user nl_user is offline
Seer
 
Join Date: May 2012
Location: Utrecht
Posts: 69
Any thoughts on this? Thanks,

Wiechert

Quote:
Originally Posted by nl_user View Post
Hi, after reading amongst others this topic about esp8266 I became enthusiast and ordered some parts to get things going (arriving soon I hope).
One of the things I would like to try, is reading my smart meters p1 port. That might be achieved in a way like they did with these solutions?:

https://hermanbanken.nl/2016/06/24/ener ... h-esp8266/
http://www.esp8266thingies.nl/wp/


The major advantage for will be how to get the "remote" data into Hs3 on my RPi2,
preferably using the P1 Smart Meter Plugin (linux) ? The Plug-in reads the data from a selected com port, which can be set in the config.

How would one achieve this best? Anyone using this combination already and willing to share? Any other solutions which can work as well?
I have seen some posts somewhere mentioning using virtual com ports . But I have no idea how to achieve that with a esp8266 (or an arduino)?
The samples I found are using Domotics as there controller. So it should be possible using Hs3?

Your advise is appreciated. Thanks.

Wiechert
Reply With Quote
  #162  
Old February 15th, 2017, 01:08 PM
jim@beersman.com jim@beersman.com is offline
Seer
 
Join Date: Jul 2013
Location: Missouri
Posts: 19
Quote:
Originally Posted by enigmatheatre View Post
Yes I do have them working in the plugin and they are under test by a user. I have also fixed the 9 board limit and in the next build it will need 30 boards.
As I said if you want to test this then drip me an email and I will send you the build when I get a moment.

Greig.

Greig.

Sent from my SM-G925F using Tapatalk
Greig would it be possible to get a copy of this. I have 3 Nodemcu's I would like to start using with HomeSeer.

Thanks

Love your program currently using it with an Arduino Mega and it works great on that.
Reply With Quote
  #163  
Old February 15th, 2017, 04:23 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,667
Quote:
Originally Posted by nl_user View Post
Any thoughts on this? Thanks,

Wiechert
I guess you could do it but you will need to wait until I update the API to work on the esp8266 boards.

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
  #164  
Old February 15th, 2017, 07:13 PM
cowsr4eating cowsr4eating is offline
Seer
 
Join Date: May 2013
Location: USA
Posts: 71
@Luisr320

I downloaded the HomeseerBoard1 sketch, added the ESP8266 sketch you linked, and wired the ESP8266 to my UNOr3 as per the attached.
I have the ESP connected to an external 3.3v power supply, with a common ground between the UNO and the ESP.

I changed the IP, gateway, netmask and MAC int he sketch. Also changed version of sketch.

In the serial monitor I can communicate with the ESP and even used AT commands to connected to my AP, set IP, and can ping from my PC.

The sketch compiles, but when I try to upload to my UNO I get a series of error messages:
avrdude: stk500_getsybc() attempt 1 of 19: not in sync: resp=0x30

Then alternates between resp 0x20 and 0x30.

Googling the problem looks like a device connected to the UNO pin 0 and 1 can cause this problem. I disconnect from pins 0 and 1 on the UNO, but now has programmer not responding errors.

I suspect the new plugin with wifi support will address, but hoping the pin 0, and pin 1 wiring might be the issue and you would have a tip to get around.

Thanks,

Guy
Attached Images
 
Reply With Quote
  #165  
Old February 15th, 2017, 09:48 PM
cowsr4eating cowsr4eating is offline
Seer
 
Join Date: May 2013
Location: USA
Posts: 71
I removed all connections to the UNO and the sketch did upload. Not sure why the connection to UNO reset and GND, but I had to disconnect it as well to upload.
Reply With Quote
  #166  
Old February 16th, 2017, 12:54 PM
doppiaemme doppiaemme is offline
Seer
 
Join Date: Nov 2014
Location: Como
Posts: 45
Quote:
Originally Posted by luisr320 View Post
Just wanted to give some feedback on my attempts go get a ESP8266-01 connected to Homeseer with the Arduino Plug-in.

It took me a couple of days to figure it out but I've finally managed to have an LED attached to GPIO2 of the ESP8826-01 board to turn ON and OFF with Homeseer.



I'm using this resources:
- Arduino Plugin created by Greig DempsterEnigmatheatre). V1.0.0.131, Beta
- Arduino IDE 1.8.1
- The changed sketch posted on the beguinning of this post with the version changed to 1.0.0.127
- I installed the ESP8826 board into the Arduino IDE using this link: http://arduino.esp8266.com/staging/p...com_index.json

However, I can't make the GPIO pin work as a PWM, nor use the BLINK or the ONE FLASH.

It is imperative to change the version on the sketch.

Also, the LiquidCristal library had to be downgraded to a previous version.

If anyone want more info about what I had to do to make it work just let me know.

I have your same experience but with a NodeMCU dev kit.
I had to comment out all the reference to LiquidCrystal (I didn't need it anyway) to avoid the errors during compilation, but then yes it connects and I'm able to switch on/off or toggle the LED. It doesn't blink though.

Did you get the new sketch, is it working?
Reply With Quote
  #167  
Old February 16th, 2017, 01:27 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,667
Quote:
Originally Posted by doppiaemme View Post

Is it working?
Yes it works but no I have not sent it to anyone as I found a bug I wish to fix before then. I have so many people wanting this that I have updates the main plugin version and will make the new Beta the version that supports the NodeMcu boards.
Please hold tight while I get the bug fixed and I will update you all when it is in the updater.

Greig.
Reply With Quote
  #168  
Old February 16th, 2017, 02:36 PM
luisr320 luisr320 is offline
Seer Plus
 
Join Date: Dec 2010
Location: Portugal
Posts: 77
Quote:
Originally Posted by cowsr4eating View Post
@Luisr320

I downloaded the HomeseerBoard1 sketch, added the ESP8266 sketch you linked, and wired the ESP8266 to my UNOr3 as per the attached.
I have the ESP connected to an external 3.3v power supply, with a common ground between the UNO and the ESP.

I changed the IP, gateway, netmask and MAC int he sketch. Also changed version of sketch.

In the serial monitor I can communicate with the ESP and even used AT commands to connected to my AP, set IP, and can ping from my PC.

The sketch compiles, but when I try to upload to my UNO I get a series of error messages:
avrdude: stk500_getsybc() attempt 1 of 19: not in sync: resp=0x30

Then alternates between resp 0x20 and 0x30.

Googling the problem looks like a device connected to the UNO pin 0 and 1 can cause this problem. I disconnect from pins 0 and 1 on the UNO, but now has programmer not responding errors.

I suspect the new plugin with wifi support will address, but hoping the pin 0, and pin 1 wiring might be the issue and you would have a tip to get around.

Thanks,

Guy
Guy, that ESP8266-01 board is 3.3v all the way. By that I mean that you have to level shift the TX from your arduino to 3.3V before it gets to the RX pin of the ESP8266 as it is normally at 5.0v and the ESP8266 does not tolerate 5V. Only 3.3V.
Here is a way of doing it:

The resistors create a voltage divider to lower the level from 5.0v to 3.3v. You must remove the Arduino Atmel chip from its socket before you are able to upload a new sketch on the ESP8266.

Also, you have to load the new ESP8266 core to the arduino IDE. Have you done that? This is the location of the new core: http://arduino.esp8266.com/staging/p...com_index.json. Go to your arduino IDE menu "File/Preferences", and add that line to the "Additional Boards Manager URL:". If you already have an address there, separate both addresses with a comma.



Then go to the Tools menu and choose the Generic ESP8266 module.

Last edited by luisr320; February 16th, 2017 at 08:31 PM.
Reply With Quote
  #169  
Old February 16th, 2017, 05:58 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,667
V1.0.0.136 is in the Beta section of the updater and has NodeMCU I/O and LCD Support.

Greig.
Reply With Quote
  #170  
Old February 17th, 2017, 04:29 AM
doppiaemme doppiaemme is offline
Seer
 
Join Date: Nov 2014
Location: Como
Posts: 45
Quote:
Originally Posted by enigmatheatre View Post
V1.0.0.136 is in the Beta section of the updater and has NodeMCU I/O and LCD Support.

Greig.
Hi Greig,
this is great!
some feedabck: I tried it, it compiles fine and NodeMCU connects fine.
I've tried only an output so far: On, Off, and Toggle work fine.
Blink still doesn't work
One flash works 70% of times but not always.
Reply With Quote
  #171  
Old February 17th, 2017, 06:01 AM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,667
Quote:
Originally Posted by doppiaemme View Post
Hi Greig,
this is great!
some feedabck: I tried it, it compiles fine and NodeMCU connects fine.
I've tried only an output so far: On, Off, and Toggle work fine.
Blink still doesn't work
One flash works 70% of times but not always.
Have you set a blink time on the output time device?

Greig.

Sent from my SM-G925F using Tapatalk
Reply With Quote
  #172  
Old February 17th, 2017, 11:39 AM
doppiaemme doppiaemme is offline
Seer
 
Join Date: Nov 2014
Location: Como
Posts: 45
Quote:
Originally Posted by enigmatheatre View Post
Have you set a blink time on the output time device?

Greig.

Sent from my SM-G925F using Tapatalk
Ah ok, the output time device was hidden, once removed the filter I found it.
And yes it works! Once set the time both the blinking and the flash-once work.

Very awesome job, this is getting really interesting... Are you planning to release the API version for NodeMCU as well?
Reply With Quote
  #173  
Old February 17th, 2017, 02:33 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,667
Quote:
Originally Posted by doppiaemme View Post
Ah ok, the output time device was hidden, once removed the filter I found it.
And yes it works! Once set the time both the blinking and the flash-once work.

Very awesome job, this is getting really interesting... Are you planning to release the API version for NodeMCU as well?
Yes I plan to do a API for the NodeMCU but this will take a little time to sort out.

Greig.
Reply With Quote
  #174  
Old February 17th, 2017, 02:47 PM
luisr320 luisr320 is offline
Seer Plus
 
Join Date: Dec 2010
Location: Portugal
Posts: 77
Greig, thank you for the update.
Some feedback of the new version of the plugin.

I updated the plugin on Homeseer/Windows and after restarting homeseer I got the following error on the startup log:
PHP Code:
17-02-2017 12:41:33 ~!~Arduino Plugin~!~ Error Versions are not compatiblePlease update the Board Firmware version.
17-02-2017 12:41:34 ~!~Arduino Plugin~!~ Error Disconnected due to Version Mis-MatchStartup Complete2 errors detectedcheck the log for more information
This means that the sketch that is currently loaded in my Arduino UNO R3 board has the wrong version installed.
So I created a new sketch and after uploading it to the UNO all is well now.

For the NodeMCU I used an Adafruit HUZZAH board, which has a ESP8266-12. Not the cheapest bord you can get, bur this one was available for tests and worked well.





I had some problems initially but after some googling I found out that the juice coming from the USB/TTL adapter wasn't enough to make it run so I connected a small Lipo with 4,2V to the board and it started running. I connected a Lipo battery with about 4.2V directly to the pins GND and VBat and it started running . This board accepts 5V so it will be running fine like this. Only the digital output/inputs must be 3.3V. Of course this is not ideal and a power supply is necessary to run this specific board.

At this time I have managed to create an output on pin D2 in Homeseer plugin. Not all pins show up on the selecting list. I can create pins D2, D3, D4, D5, D6, D7, D9, D10.

For this board, this is the pin assignment:

PHP Code:
HOMESEER BOARD
---------|---------
   
D1    |  D5
   D2    
|  D4
   D3    
|  D0 (RED LED)
   
D4    |  D2 (BLUE LED)
   
D5    |  D14
   D6    
|  D12
   D7    
|  D13
   D9    
|  -
   
D10   |  - 
Note from Adafruit: "Rev A of this board has GPIO #4 and #5 swapped (the modules changed pinouts on us) so if #4/#5 aren't working for you, try swapping! We'll fix in the next PCB run"

According to Adafruit Pinout description (https://learn.adafruit.com/adafruit-...eakout/pinouts), there are 9 GPIO pins (#0, #2, #4, #5, #12, #13, #14, #15, #16). So the plugin is wasting 2 GPIOs on the board, #15 and # 16, and the plugin itself does not assign anything to D9 and D10 and D8 is missing on the list of available pins in the plugin.

Homeseer plugin D3 makes the onboard RED LED come on and OFF, and D4 does the same to the onboard BLUE LED but they are inverted. Activating the output turns the LEDs OFF. And turning the output OFF activate the LEDs.

All functions of the created outputs work, like blink, on, off and toggle. When you first create an output, the time slider has no value. By clicking on the slider at least once, 200ms become the pausing time for the Blink and the toggle. If you slide the time up you can go up to 5000ms.

The digital inputs work well also. Connecting a button between an GPIO and GND is all it takes to create an input. With the button released, all inputs show OPEN, and when pressed the show CLOSE. Connecting the button to GPIOs D0 and D2 makes the onboard LEDs turn ON and they go OFF when the button is released. A nice touch that gives some immediate feedback of your input.

There are no Analog Inputs to be set up on the plugin. I could only create Digital inputs. It would be nice to have some, since the board has an analog pin named "A", which can measure voltages from 0.0V to 1.0V that could be converted to a number from 0 to 1024


Check here for details about the ADC:
http://internetofhomethings.com/homethings/?tag=esp8266

The LCD display also works fine with this board. I'm using a regular 2X16 lines LCD, with a IC2 backpack, like this one:


It is connected to the LCD like this:


It is connected to pins #4 -> SDA, and #5 -> SCL.
The message displayed on the LCD may be fired by an event and is sent by Homeseer.

My test rig:

Will give more feedback as soon as any new development comes along.

Last edited by luisr320; February 17th, 2017 at 05:46 PM.
Reply With Quote
  #175  
Old February 17th, 2017, 11:01 PM
cowsr4eating cowsr4eating is offline
Seer
 
Join Date: May 2013
Location: USA
Posts: 71
@luisr320

Thank you for the info. I did not realize the signals to the ESP needed to also be 3.3V. I literally received Arduino this week, wrote a basic sketch to test the unit before my ESP8266 arrived,and I did not have any of the ESP core loaded. Not since college (many decades ago) did I program CPUs without some console for feedback, so I appreciate the patience and tips. I'll look at this over the long weekend and see if I can't get it running with the guidance you provided.

Thanks again!

Guy
Reply With Quote
  #176  
Old February 18th, 2017, 08:32 AM
AllanMar AllanMar is offline
Seer Deluxe
 
Join Date: Sep 2011
Location: Canada
Posts: 175
If people are interested in the ESP8266 they should keep an eye on it's newer bigger brother as well (ESP32). It is alot more "arduino-like" in it's features (more analog/etc). Support is still coming along and they arent as plentiful currently though but i've had pretty good luck with them in the little bit i've done with them.

If you want analog-io with a esp8266 though I would strongly suggest getting an external i2c ADC like ADS1115 (~$2 on ebay) as the built in one is not very good. You'd have to use the API sketch with the plugin though as there isn't support in the base sketch.
Reply With Quote
  #177  
Old February 18th, 2017, 08:39 AM
luisr320 luisr320 is offline
Seer Plus
 
Join Date: Dec 2010
Location: Portugal
Posts: 77
@cowsr4eating,
no problem. I'll keep an eye on the thread to check how you are doing.

Just a note regarding my setup: at this time, if I disconnect the power to the board and reconnect it back on, I loose all the input capability as well as the blink function on the output and the status of the output is not updated (but I can turn the LED ON and OFF) until I do a "Disconnect"/"Reconnect" on the Device Management Page (or the plugin config page) in Homeseer. A "Reset" won't do it, though. After that, all works back again.

I've sent a bug report to Greig about this.
Can anyone please confirm if they are having the same issues?
Reply With Quote
  #178  
Old February 18th, 2017, 08:44 AM
luisr320 luisr320 is offline
Seer Plus
 
Join Date: Dec 2010
Location: Portugal
Posts: 77
Quote:
Originally Posted by AllanMar View Post
If people are interested in the ESP8266 they should keep an eye on it's newer bigger brother as well (ESP32). It is alot more "arduino-like" in it's features (more analog/etc). Support is still coming along and they arent as plentiful currently though but i've had pretty good luck with them in the little bit i've done with them.

If you want analog-io with a esp8266 though I would strongly suggest getting an external i2c ADC like ADS1115 (~$2 on ebay) as the built in one is not very good. You'd have to use the API sketch with the plugin though as there isn't support in the base sketch.
The ESP32 is really interesting, with wifi and Bluetooth capability. It may well be an Arduino killer. And they have it running with the Arduino IDE. Maybe a ESP32 Arduino in in the works.
Reply With Quote
  #179  
Old February 18th, 2017, 05:29 PM
jim@beersman.com jim@beersman.com is offline
Seer
 
Join Date: Jul 2013
Location: Missouri
Posts: 19
Quote:
Originally Posted by enigmatheatre View Post
Yes I plan to do a API for the NodeMCU but this will take a little time to sort out.

Greig.
Are you going to add the Dallas 1-Wire to your NodeMcu capabilities?
Reply With Quote
  #180  
Old February 18th, 2017, 07:45 PM
enigmatheatre's Avatar
enigmatheatre enigmatheatre is offline
Super Seer
 
Join Date: Oct 2009
Location: Aberdeen Scotland UK
Posts: 1,667
Quote:
Originally Posted by jim@beersman.com View Post
Are you going to add the Dallas 1-Wire to your NodeMcu capabilities?
Yes this is also on the list as the next thing to look at.

Sent from my SM-G925F using Tapatalk
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
Concept question. jackreilly HomeSeer General Discussion Area 4 March 2nd, 2009 10:12 AM
Water proof sensor peterpc Midon Design Temp05/08 8 February 26th, 2006 10:40 AM
Baby Proof dhanford HomeSeer General Discussion Area 6 January 28th, 2005 07:43 PM
Microsoft's Concept Home mike@clarkonline.net HomeSeer General Discussion Area 9 April 2nd, 2004 06:57 AM
Anyone know how to weather proof a TM751? Rupp Weather Discussion 2 February 10th, 2004 06:46 PM


All times are GMT -4. The time now is 04:50 PM.


Copyright HomeSeer Technologies, LLC