Yeah man (though I'm going to use a pn532), is itlossi lie to set a device string in Json?
Announcement
Collapse
No announcement yet.
ESP8266 - Proof of Concept
Collapse
X
-
Very easy to send to HS..
To Send Data to Homeseer use SendToHS(Device,Value)
The device is one that you have defined in the plugin on your homeseer system, its value can be the "long" which is the KEYFOB ID.
I rebuilt my arduino system and darn lost the Board API that I'm using for the wiegand. I have a new reader that should be here shortly and I'll build some different code and post...
PeteHS 2.2.0.11
Comment
-
Originally posted by AllanMar View PostFor those not aware the ESP8266 is a small, quite powerful Wifi microcontroller. It is now able to be programmed via Arduino and has replaced Arduinos in most of my projects (even ones not requiring Wifi).
There are alot of impressive features that make it ideal for use with the plugin:- Wifi!
- Cheap! ~$5US for dev kit
- Possible to reload firmware wirelessly.
- 4M Flash memory
- Can run a webserver/MQTT/etc.
- 1 Analog In (poor)
- PWM support on all pins.
- I2C, OneWire, 2 UART, SPI
- 12 GPIO on NodeMCU Dev kit.
Attached is the plugin sketch i hacked up a bit to run on the ESP8266. To program it via arduino you'll have to add the board/follow the instructions here:
https://github.com/esp8266/Arduino#i...boards-manager
There's alot of different ESP8266 products out there, but for something Arduino like I'd suggest the NodeMCU dev kit (V1.0).
Keep in mind the ESP8266 is 3.3V I/O, where as most Arduinos are 5V.
The ESP8266 Analog input is pretty poor (and only 1CH). I'm going to look at using an external ADC instead...
In the attached sketch OW pin is NOT configurable and hardcoded to 10 (SD3).
So far I've only tested Digital Input/Output, LCD and OneWire but it seems to work well.
I thought i'd share this see if there's much interest and possible consideration for official support in the plugin. (I'd be happy to help clean up the Arduino code).
How's the tinkering going ? Have you found the units to stay reliably connected to wifi and HS ?
Mine haven't arrived as yet :-(
Pete
Sent from my Nexus 7 using TapatalkHS 2.2.0.11
Comment
-
Originally posted by AllanMar View PostI haven't been using this with the arduino plugin currently (I have no actual real use yet). I use ESP8266's for other things though and I've found them stable in general.
I don't really use actually Arduino's for anything anymore, i prefer these for pretty much every use.
Are you accepting interrupts on these and sending to HS or sending commands to it ?HS 2.2.0.11
Comment
-
Hi Allan
What onewire library are you using ? I keep getting compile errors
OneWire.h:77:2: error: #error "Please define I/O register types here"
I've put the arduino onewire library folder into the sketch folder and keep getting the same errors, bit of googling suggests its a library issue ?
Ta Pete
Board option for compile is generic ESP8266HS 2.2.0.11
Comment
-
Originally posted by petez69 View PostHi Allan
What onewire library are you using ? I keep getting compile errors
OneWire.h:77:2: error: #error "Please define I/O register types here"
I've put the arduino onewire library folder into the sketch folder and keep getting the same errors, bit of googling suggests its a library issue ?
Ta Pete
Board option for compile is generic ESP8266
Comment
-
Originally posted by petez69 View PostHi Allan
That I think has fixed it, suspect I updated the LiquidCrystal library by accident and now its having a spit...
Could you please have a look at what LiquidCrystal_I2C library and version you have installed....
Thanks..Pete
Comment
-
Hi Guys,
This looks interesting. Are you saying my code compiles and runs on the boards or are you running different code. I would add support to the plugin if it is easy enough and there is not to many changes to the code.
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
Comment
-
Originally posted by enigmatheatre View PostHi Guys,
This looks interesting. Are you saying my code compiles and runs on the boards or are you running different code. I would add support to the plugin if it is easy enough and there is not to many changes to the code.
Greig.
Have to do some changes for SoftPWM (ESP8266 is already softpwm on all pins). EEPROM is also slightly different so I couldn't get the OneWire to read the pin from EEPROM (possibly use a custom OneWire lib that allows setting pins at runtime).
This was meant just to be an example, if you are interested in supporting i'll have another look and try to clean it up and test the remaining (Servo, PWM).
The pin assignment is a bit different, and ideally the plugin should allow for setting SSID/PSK.
Comment
-
Originally posted by AllanMar View PostWith some small modifications, see my first post. I don't think it would be very hard to make one file that compiles for both AVR/ESP8266.
Have to do some changes for SoftPWM (ESP8266 is already softpwm on all pins). EEPROM is also slightly different so I couldn't get the OneWire to read the pin from EEPROM (possibly use a custom OneWire lib that allows setting pins at runtime).
This was meant just to be an example, if you are interested in supporting i'll have another look and try to clean it up and test the remaining (Servo, PWM).
The pin assignment is a bit different, and ideally the plugin should allow for setting SSID/PSK.
I have a couple on the way but I can not get the code to compile in the IDE at the moment so will have to look in to this further.
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
Comment
-
Originally posted by enigmatheatre View PostOk this sounds like we could put something together. Adding the SSID/PSK should be fine and I guess I could include the new sketch just for the ESP8266 if I add a board selection option.
I have a couple on the way but I can not get the code to compile in the IDE at the moment so will have to look in to this further.
Greig.
Comment
-
Originally posted by AllanMar View PostNot even with the modified sketch in my first post?
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
Comment
Comment