Is there anyone who can help me to get one Arduino Shield?
Thanks
Is there a reason you cannot use a WiFi connected device instead? I have a solution that works with the old ThingShield as well as LAN connected Arduinoâs and ESP8266 boards. The LAN connected devices are much quicker to update ST and to respond to commands from ST.
Check it out at
Good Morning Dan:
Thanks for your kind attention to my request. I am not sure which device will work with ST Hub V.2. I have Raspberry Pi 3 Model B and Thinks C.H.I.P.
My plan to operate 6 relays through ST interfaced with Arduino or Raspberry or C.H.I.P. I was told that only Arduino can be interfaced with ST. So, I was looking for Arduino Shield.
I am new in this technology but capable of understanding the processes and design. Do you mind to send me few hints on how to start interfacing Raspberry or C.H.I.P as interface to ST? Any guidance with be appreciated. Thanks again for your help and kind support.
Regards
Tito
Dan: I have read your posting. Excellent and admirable !!!.Could you please advise me from where I can buy Arduino MEGA 2560 and W5100 wired Ethernet Shield? As per your advise LAN wire option is the best. If you could specify specific vendor or supplierâs name that will be appreciated. I found there are many suppliers with many models, not sure which one is best. Many thanks
Dan: Thanks for the detailed information and instruction on this project. I was able to successfully test the whole system with Arduino MEGA + LAN. it is excellent. After testing, I removed all the devices except switches and I added 6 more switches as I need total 8 relays to be controlled. I am planning to test with ESP8226 this weekend and I have all the items needed for the test. Thanks again for your kind support. Regards, Tito
Good morning
Dan:
I have completed the testing of Standalone NodeMCU v1.0 ESP8266â12e with ST_Anything v2.6. last night. Like my previous testing with Arduino with W5100 Ethernet shield, this assembly and test went well with one minor issue as follows:
- ⢠When I turn on Switch1 in my mobile, refer to digital pin D0, the serial monitor indicates that Switch1 is turned on but both the indicator light in the ESP8266 board got turned off and my relay also got turned off.
- ⢠When I click for turning off in my mobile , the serial monitor indicates also it is turned off but both the indicator light in the ESP8266 board turned on (lit) and my relay also turned on.
- ⢠Same issue with Switch2
- ⢠It seems to me that digital out logic is inverted.
- ⢠I am using JBtek 8 channel optically isolated relay board with separate power supply for the relay board
- ⢠Apart from the relay board, should not the led indicator in the ESP8266 board follow the same state of the command? This is refer to D0 pin
Do you know what the D0 output is when the program sent âONâ? Refer to ground, high? Or low?
Please help. I can provide you more information as needed. Thanks for your help. Regards, Tito
Different relay modules require either positive or negative logic to actuate them. ST_Anything is designed to handle these differences via simple changes to your Arduino Sketch file.
It sounds to me like you have a similar relay board to mine. In order to make sure the relay stays âoffâ during a power cycle of the NodeMCU board, and activate correctly, I recommend the following configuration in your setup() routine of your sketch. This works correctly for my SainSmart 2 channel, optically isolated relay board. As you can see, the INVERTED LOGIC is set to true. Thus, when the switch is âonâ the pin outputs Gnd. When the switch is âoffâ the pin outputs 3.3v.
//Executors
static st::EX_Switch executor1(F("switch1"), PIN_SWITCH_1, LOW, true);
static st::EX_Switch executor2(F("switch2"), PIN_SWITCH_2, LOW, true);
In the .cpp or .h file of each ST_Anything device class, you will find detailed documentation regarding the various constructor arguments when defining a device in the Arduino sketch. Here is the information for an EX_Switch device:
// st::EX_Switch() constructor requires the following arguments
// - String &name - REQUIRED - the name of the object - must match the Groovy ST_Anything DeviceType tile name
// - byte pin - REQUIRED - the Arduino Pin to be used as a digital output
// - bool startingState - OPTIONAL - the value desired for the initial state of the switch. LOW = "off", HIGH = "on"
// - bool invertLogic - OPTIONAL - determines whether the Arduino Digital Output should use inverted logic
One more thing to be aware of⌠You may or may not be able to get 8 GPIO pins working properly on the NodeMCU ESP8266 board. Some of the pins are used during the boot and flash process. Usually digital outputs are safer than digital inputs, so you may get lucky.
I find this articale to be helpful in understanding some of the GPIO limitations of the NodeMCU ESP8266-12e boards.
Thanks Dan for your guidance. I will work on this suggestion very soon and update you.
Good Evening Dan:
Thanks for the tips. I have updated the sketch with INVERTED LOGIC as set to true, and now working fine as expected. Many thanks. Now my relay project is done, now focusing on IR devices. Any guidance and advise from you?
I havenât worked with IR hardly at all. ST_Anything does not have any device classes that support IR, but you could add one!
Good Evening Dan:
So far, I have completed my 8 lines sprinkler project with your project ST_Anything v2.8 along with Standalone NodeMCU v1.0 ESP8266â12e. System is working well with very excellent performance and interfacing with ST Hub, Alexa, Google Assistant and Fossil smart watch with no know issue. Thank you, again!!!
Now, I am trying to add IR to your project by including available IR libraries. To start with the simple concept, I am wondering whether it possible to call status ( like on or off) for a specific device within the ESP6822 received from ST or not. If so, this status can be used to transmit IR signals by using IR libraries. Is there any function other than callback() can be utilized?
Any suggestion and advise will be very helpful.
Thanks
Regards
Tito
I would recommend you take a look at the old RCSwitch class, which receives an On or Off command, and the sends a RF signal out to a device. This seems to be very similar to what youâre trying to do, but utilizing IR instead of RF.
ST_Anything is based on C++ Object Oriented Classes. As such, it is very easy to add a new class definition which can then be instantiated from within your sketchâs setup() routine. Hopefully youâre familiar with C/C++.
Hereâs a link to the specific library files that you could use as a starting point for your IR class.
Thanks Dan for the guidance. I will work on your suggestion and update you when there is progress. Regards, Tito