Page 8 of 10

Re: Serial MCU controlled relay/switch

Posted: 31 Dec 2019, 12:52
by HarpieC
Hello,

I just flashed the plugin on a Tuya wall dimmer (1 gang dimmer Board labeled with YDM_WIFI_SV4). Which was very painful because i had to cut the RX trace on the PCB to make it work. Sending command work but after every command the MQTT connection is lost.
Working (somehow) with tuya / dimmer#2
I`m using the homie controller. When I send commands via SYSTEM/cmd/set I get this

Code: Select all

10008544: SerSW : SetDim 255
10008559: SerSW : Dimmer d1:255
10008844: MQTT : Connection lost, state: Connection lost
10008869: MQTT : Connected to broker with client ID: ESPClient_80:7D:3A:3E:70:FA
10008872: Subscribed to: homie/Wanddimmer-01/+/+/set
10008975: SerSW : ReadState
Using The homie receiver plugin & trigger the command form there (aka via rules) works perfectly, so perhaps there is a timing problem in my homie controler plugin:


Here are the rules you need. Configure the homie receiver in (my case index 2) with an integer (1) and a boolean (2) parameter

Code: Select all

on Walldimmer#dimmer do
 ydim,%eventvalue1%
 let,1,%eventvalue1% // store to restore last dimmer state on switch=1
 HomieValueSet,2,1,%eventvalue1% // acknowledge dimmer
endon

on Walldimmer#switch do
 if [Walldimmer#switch]=0 
  relay,0,%eventvalue1%
 else
  ydim,[var#1]
  HomieValueSet,2,1,[var#1] // acknowledge dimmer optional
 endif
 HomieValueSet,2,2,%eventvalue1% // acknowledge switch
endon
But manual changes (button presses) are not read by the plugin or sent back to the broker. That`s a pity because I loose consistency between the homie state and the actual state. Homie has the ability to restore the last state after reboot and it works perfectly if the state is set via mqtt but if the state was done manually than this mechanism fails (restoring the last state on the mqtt broker)

I can live with it for now but if somebody has an idea to fix the update problem I would be thankful. Or anybody has a tip to flash the dimmer without cutting the RX trace. Now writing this I think I have to check if I repaired the RX line correctly.

Thank you for this plugin!

Chris

Re: Serial MCU controlled relay/switch

Posted: 31 Dec 2019, 16:26
by HarpieC
I checked TX and RX and it all seams fine. But still no readings from the tuya mcu.

Re: Serial MCU controlled relay/switch

Posted: 09 Jan 2020, 17:49
by HarpieC
Finally I got it working. The dimmer readings are still inconstant in example set to 185 read 85 or other values but the "relay" state (Relay0) works and the last state is restored after reboot or restart if the last command origin was the touch button too.
Here is the rules if somebody is interested:

Code: Select all

on Walldimmer#dimmer do
 ydim,%eventvalue1%
 let,1,%eventvalue1%
 HomieValueSet,2,1,%eventvalue1% // acknowledge dimmer
endon

on Walldimmer#switch do
 if [Walldimmer#switch]=0 
  relay,0,%eventvalue1%
 else
  ydim,[var#1]
  HomieValueSet,2,1,[var#1] // acknowledge dimmer state
 endif
 HomieValueSet,2,2,%eventvalue1% // acknowledge switch state
endon

on Dimmer#Relay0 do
 if [Dimmer#Relay0]!=[var#2] // only update on state change
  let,2,[Dimmer#Relay0]
  if [Dimmer#Relay0]=1
   HomieValueSet,2,4,true // acknowledge switch /set
  else
   HomieValueSet,2,4,false // acknowledge switch /set
  endif
 endif
endon

Re: Serial MCU controlled relay/switch

Posted: 13 Jan 2020, 13:45
by mix
enesbcs wrote: 03 Aug 2019, 21:10
fiets wrote: 03 Aug 2019, 18:58 Can you give me an example?
Examples given at the first post viewtopic.php?p=16998#p16998
The following command switches the second relay on the panel, if it has a second relay and you set the correct number of relays on the plugin settings page:

Code: Select all

relay,1,1
The following command switches the first relay on the panel.

Code: Select all

relay,0,1
If it is not working, there are several other possibilities, from unstable power supply to not correct baud rates which render this device unusable. (for example: some units has misprogrammed MCU firmware which will not work without IPD setting, and some of them has absolutely no firmware...)
Quite by accident I came across the cause of the problem with LCTech Relay 4X (I was close to a nervous breakdown;)) why, despite the fact that the status of the relay in Hardware changes, the relay remains in an unchanging state. Pay attention to which of the LEDs on the relay board is lit after the EspEasy start. If BLUE is shining you will not work. The solution is to connect the module to the power supply while holding the Reset Switch (S2). Then the RED led will light up and the GREEN led will blink longer - then the module is really ready for work. It is enough to do it once or until the state changes.

In my LC Tech Relay 4X original AT Firmware in AP client mode the blue is lit, while the red one is in AP mode, which is misleading because it is usually not used in this mode.

Ps. maybe someone has already described a similar situation here and I haven't read (although I searched ... for 4 days) if it was so and now I repeat myself after someone, forgive me :)

Re: Serial MCU controlled relay/switch

Posted: 24 Jan 2020, 18:42
by Cosimo
Hello.
I don't know how to declare my lctech 4ch in Hassio. I wrote this in the configuration.yaml mo but it doesn't work what am I wrong?

- platform: mqtt
name: "LCtech"
command_topic: "cmnd/lctech/Relay0/power"
state_topic: "stat/lctech/Relay0/POWER"
# availability_topic: "tele/lctech/LWT"
qos: 1
payload_on: "relay,0,1 "
payload_off: "relay,0,0 "
payload_available: "Online"
payload_not_available: "Offline"
retain: false

Re: Serial MCU controlled relay/switch

Posted: 24 Jan 2020, 18:49
by enesbcs
Cosimo wrote: 24 Jan 2020, 18:42 I don't know how to declare my lctech 4ch in Hassio. I wrote this in the configuration.yaml mo but it doesn't work what am I wrong?

- platform: mqtt
name: "LCtech"
command_topic: "cmnd/lctech/Relay0/power"
state_topic: "stat/lctech/Relay0/POWER"
I do not know neither HA nor Hassio. Command topic is "<MQTT subscribe template>/cmd" in ESPEasy so i guess it is "LCtech/cmd" for you.
State topic may be "LCtech/Relay0/POWER".. depends on your device and value names. I am a Domoticz only user.

Re: Serial MCU controlled relay/switch

Posted: 25 Jan 2020, 23:59
by Cosimo
- platform: mqtt
name: lctech
command_topic: "lctech/cmd"
state_topic: "lctech/Relay0/POWER"
payload_on: "relay,0,1"
payload_off: "relay,0,0"


Not work ,my friend....WHY???

Re: Serial MCU controlled relay/switch

Posted: 26 Jan 2020, 09:53
by enesbcs
Cosimo wrote: 25 Jan 2020, 23:59 - platform: mqtt

Not work ,my friend....WHY???
Maybe you did not add the necessary mqtt controller to espeasy.
Mosquitto_pub and Mosquitto_sub is a great tool in case of mqtt debuggin:
http://www.steves-internet-guide.com/mo ... b-clients/

Re: Serial MCU controlled relay/switch

Posted: 30 Jan 2020, 21:59
by vince59
Hey all.
My first post after a quite long reading. I am playing with IoT and had some successes....quite simple tests.
I would like to use a lctech 4 relay channell with ESP8266 over the internet and my understanding is I must flash a new firmware.
The one that could apply to my device seems to be the "ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA" that can be flashed with ESPEasyflasher.
Am I right? Should I use Arduino instead?....if so which file to be used? I tried the file found on gitHUB but no success in compiling.
Any help would be greatly appreciated.

Re: Serial MCU controlled relay/switch

Posted: 31 Jan 2020, 17:37
by enesbcs
vince59 wrote: 30 Jan 2020, 21:59 Hey all.
My first post after a quite long reading. I am playing with IoT and had some successes....quite simple tests.
I would like to use a lctech 4 relay channell with ESP8266 over the internet and my understanding is I must flash a new firmware.
The one that could apply to my device seems to be the "ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA" that can be flashed with ESPEasyflasher.
Am I right? Should I use Arduino instead?....if so which file to be used? I tried the file found on gitHUB but no success in compiling.
Any help would be greatly appreciated.
You could use the last 1M beta binary from this post:
viewtopic.php?p=41547#p41547
You could compile this plugin with 2018 december or earlier ESPEasy releases. Newer releases changed serial usage, and i stopped developing this plugin, so unless you are a skilled Arduino programmer, it will not compile.

Re: Serial MCU controlled relay/switch

Posted: 02 Feb 2020, 15:01
by vince59
Thanks for your answer. I need to study the subject as I am not quite confident how to proceed and then what software to use.
In the meantime I was able to reprogram the ESP8266-1 and make it work again with wifi direct and through the router.
BTW I have a question. I am using two ESP modules flashed with same firmware. Both of them work good with wifi direct but ONLY one works with router.
I wonder if this is normal or not. I mean...I suppose there is something linked to the router or wifi IP assignment.
The IP address is correctly seen but something happens with the router.
I checked AT command and tried to set parameters with AT command but no success.
Am I right?...any hint about this issue?

Re: Serial MCU controlled relay/switch

Posted: 04 Feb 2020, 23:48
by vince59
I feel somehow discouraged. I am not expert but a selfmade hobbyst.
I was able to flash the ESPEasy (right now I am working with ESP8266-1 as this is installed on the relay module).
I flashed release 120 to test and the PUYA version. Apparently the mega firmware does not work as I do not see the ESP_0 wifi network. I will try again.
Connection works and I can go into ESPEssy gui...other than this I ma quite lost.
I navigated through the different pages but I could not understand. I watched a video but I got lost into Node Red compilation.
I sent command through IP and the device works but I can activate two of four relay.
What do I miss?

Re: Serial MCU controlled relay/switch

Posted: 05 Feb 2020, 17:59
by enesbcs
vince59 wrote: 04 Feb 2020, 23:48 I sent command through IP and the device works but I can activate two of four relay.
What do I miss?
If you flashed the device with the binary that i proposed: ESPEasy_P165.BETA.1M_128k.bin (2019.12.20)
then it has to be a "Number of relays" settings on the Serial MCU controlled switch plugin settings page...or your device is simply faulty.

Re: Serial MCU controlled relay/switch

Posted: 05 Feb 2020, 20:20
by vince59
Dear friend, I have 2 devices (different version old ESP 01 and ESP 1s) and I tried 3 firmwares. I got the device properly connected and working with PUYA and 120 release as well as with stock firmware.
When flashed with these fw the ESPs work correctly when connected to the USB adapter as well when installed to the LCtech relay module
No network when using both files you told me: P165 BETA1M 128 as well as BETA4M 1M.
I am looking forward to flash the nodeMCU but I would like to understand why not working with ESP8266

Re: Serial MCU controlled relay/switch

Posted: 05 Feb 2020, 21:11
by enesbcs
vince59 wrote: 05 Feb 2020, 20:20 No network when using both files you told me: P165 BETA1M 128 as well as BETA4M 1M.
Just a hint: when you flash the same device with different ESPEasy main versions after each other, do a "full erase" when uploading with serial, they use different data format in flash SPIFF. Could help a lot.

For other users this last beta works well:
download/file.php?id=4247

Altough you can try the previous one:
download/file.php?id=3976

Or there are some compiled for 3 different core versions:
download/file.php?id=3785

And this is the first one which supports 4relay LCTECH: (oldest)
download/file.php?id=3336&sid=622fad533 ... 869d1d3f58

Re: Serial MCU controlled relay/switch

Posted: 05 Feb 2020, 23:04
by vince59
köszönöm my friend :mrgreen:
I tried the last PUYA file. It works, I have wifi network and connection as well.Actually one of the ESP is not getting wifi when inserted in the relay module, the other one works good.
So I was able to setup ESPEasy and even control the relay through the "tools" section of the ESP Easy panel.
Now, if you don't mind, I kindly ask guidance for the next steps.
I watched the video over the web by Csongor Vaga but I get lost when he explains about procedure with NodeRed and swhitching back to ESP Easy.
My understanding is that it is necessary to connect/link the ESP to the web via MQTT but I can not follow the steps.
Am I right?....do I absolutely need MQTT broker?
I tried something with openHAB but was able to control a TV in my wifi network and I found the software quite complicated with GUI and CLI.
So I would appreciate guidance to complete the steps.
Thanks for any help.

Re: Serial MCU controlled relay/switch

Posted: 06 Feb 2020, 17:37
by enesbcs
vince59 wrote: 05 Feb 2020, 23:04 Am I right?....do I absolutely need MQTT broker?
Controlling a relay is available either by URL or MQTT, with the standard ESPEasy methods:
https://www.letscontrolit.com/wiki/inde ... _Reference

nygma wrote a complete guide at 2018:
viewtopic.php?f=6&t=3245&p=28044&hilit= ... cmd#p28044

Re: Serial MCU controlled relay/switch

Posted: 07 Feb 2020, 00:10
by vince59
Definitely there is something I do not understand...I do not know what I am doing wron or not doing.
I can control relay via http with ESPEasy as well as wih Domoticz but I did not manage to gain control over the web.
I am trying to install Mosquitto to be used with openHab but so far no success. Mosquitto does not work (OS Win 10 pro).
It is not yet clear to me wht is necessary to control the device over internet.

Re: Serial MCU controlled relay/switch

Posted: 07 Feb 2020, 14:09
by guschtl
Hi all,
exist there a Version, or is it possible for the 1M ESP-01 that the LcTech Relays working together with DS18B20 Temp Sensors?
With all tried Versions I had not found this in combination
Cheers Alex

Re: Serial MCU controlled relay/switch

Posted: 07 Feb 2020, 18:43
by enesbcs
guschtl wrote: 07 Feb 2020, 14:09 exist there a Version, or is it possible for the 1M ESP-01 that the LcTech Relays working together with DS18B20 Temp Sensors?
The ESP-01 only has GPIO-0 and GPIO-2 neither of them are optimal for an input pin, but can be done.

The plugin source is available from github and there are several hints in this forum about compiling it against an ESPEasy '2018 source:
viewtopic.php?p=36579#p36579
viewtopic.php?p=36186#p36186
viewtopic.php?p=40201#p40201

This is the generic Arduino compiling method:
https://www.letscontrolit.com/wiki/inde ... are_Upload

In case you are unable to compile you can ask a binary in exchange a Coffee... :D https://ko-fi.com/rpieasy
(Necessary informations: Flash size: 1M/4M, PUYA or not PUYA?, ESP core version 2.4.0/2.4.1/2.4.2/2.50, Controllers included, Plugins included)

Re: Serial MCU controlled relay/switch

Posted: 09 Feb 2020, 14:55
by enesbcs
ESPEasy with P165 + Ds18b20
compiled with core 2.5.2

Re: Serial MCU controlled relay/switch

Posted: 22 Feb 2020, 10:05
by moamo67
hello all, *

thank you for you development and integration of the P165 module !!!!!!!!

i flashed le last post esp8266 firmware ( v147, 1MB 64kb) ,its ok serial mcu is good my relay shuting down good !

no im trying to get the (v200 1MB ,128K ), when i flashed i have a probleme with config dat writing ( at wifi register page ) , and "PID" bug , and after a boot loop , what is the pronbleme ?

because the first have 64kb and the last 128k ?

Re: Serial MCU controlled relay/switch

Posted: 22 Feb 2020, 10:06
by moamo67
enesbcs wrote: 09 Feb 2020, 14:55 ESPEasy with P165 + Ds18b20
compiled with core 2.5.2
thank you !!!!!!

Re: Serial MCU controlled relay/switch

Posted: 22 Feb 2020, 10:24
by enesbcs
moamo67 wrote: 22 Feb 2020, 10:05 i flashed le last post esp8266 firmware ( v147, 1MB 64kb) ,its ok serial mcu is good my relay shuting down good !

no im trying to get the (v200 1MB ,128K ), when i flashed i have a probleme with config dat writing ( at wifi register page ) , and "PID" bug , and after a boot loop , what is the pronbleme ?

because the first have 64kb and the last 128k ?
Ye, when you upgrade from v147 to v200, or to alternative SPIFFS size binary, always do a complete flash erase before upload. In case of bootloop use PUYA binary.

Re: Serial MCU controlled relay/switch

Posted: 28 Feb 2020, 09:51
by Micha_he
enesbcs wrote: 09 Feb 2020, 14:55 ESPEasy with P165 + Ds18b20
compiled with core 2.5.2
Still with the 2018 source code, right?

Because I've a delay-problem with the plugin (viewtopic.php?f=6&t=7460) at my MOES-WIFI-Dimmer, it's interest me, if it's possible to compile the plugin with the current sourcecode. Preferably with Platformio. Where's the main problem ?

Can anyone guide me on the way there?

Re: Serial MCU controlled relay/switch

Posted: 29 Feb 2020, 08:35
by enesbcs
Micha_he wrote: 28 Feb 2020, 09:51 if it's possible to compile the plugin with the current sourcecode. Preferably with Platformio. Where's the main problem ?
The main problem is, that the ESPEasy source code evolved much with the controllers&plugins handling, and replaced the full serial library at 2018.12.31. So the current P165 will never compile.. unless someone spent some weeks to adapt this changes to the plugin.

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 08:57
by Micha_he
enesbcs wrote: 24 Oct 2019, 14:01 Mravko wrote some instructions for platformio: viewtopic.php?p=36756#p36756
Hi. This instructions doesn't seem to match with the current source-code. Can someone explain, how I integrate a experimental plugin with a suitable build environment into the current ESPEasy code with Platformio ?

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 09:10
by TD-er

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 09:29
by Micha_he
Yes, I want try to compile a image with the _P165_SerSwitch-plugin, based on the current ESPEasy-source. If necessary, see if I can modify the plugin to work with current source.

Is there a manual/wiki somewhere, how to add my own build (with a additional plugin) to the Platformio-IDE. The system/integration is somewhat unclear and complicated for a beginner :(

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 09:32
by TD-er
I just moved it to the mega branch for test build on my computer and there doesn't seem to be anything difficult in merging it.
I will make a test build for you.
What size flash do you need? (and what CPU, ESP8266 or 8285?)

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 09:49
by Micha_he
1MB.

But better: Can you explain the integration steps?

1. copy plugin.ino to /src
2. add '#ifdef USES_P165' and endif to the plugin-source
3. in '/src/define_plugin_sets.h' I've found the plugin only in the experimental section

Here I stopped yesterday...

What are the next steps to a special P165-build? And, if I was able to build with a 'experimantal'-base, the image doesn't get too big with all experimental-plugins ? Wouldn't it be better if I created my own plugin-set ?

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 10:00
by TD-er
You can see the changes here: https://github.com/letscontrolit/ESPEasy/pull/2913
What I mainly did was this:
- Copy file from Playground to main repo
- Add #ifdef USES_Pxxx at the begin and /endif at the end (only when the plugin does not already have those.
- Add the reference to the plugin to the define_plugin_defs.h file in the right scope ("PLUGIN_SET_TESTING" for now)

For the integration into the main repo, I also renamed all references to "165" to "090" (note that you need to make sure no number (<space><number>) starts with a 0, or else it will be interpreted as an octal number, not a decimal one.
This is mostly the only exception; #define PLUGIN_ID_091 91

If you need to build a custom build, please use the Custom.h file and define your set of used plugins, by adding "#define USES_P165" or whatever number you need and use the PlatformIO selector to build a custom build with the right flash size.

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 10:18
by Micha_he
I'll try to implement your instructions in my build environment. But only today evening.

Can I also have two custom.h files, if I need two special builds ?

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 10:40
by TD-er
Not at this point, but you can create a sub section for yourself wrapped in #ifdef ... #endif sections and then add a section in the platformio.ini file where you add a special define.

See platformio_esp8266_envs.ini file:

Code: Select all

; Custom: 1M version --------------------------
[env:custom_ESP8266_1M]
extends                   = esp8266_1M
platform                  = ${regular_platform.platform}
platform_packages         = ${regular_platform.platform_packages}
build_flags               = ${regular_platform.build_flags} 
                            ${esp8266_1M.build_flags} 
                            -DPLUGIN_BUILD_CUSTOM
lib_ignore                = ESP32_ping, ESP32WebServer, ESP8266WiFiMesh
extra_scripts             = pre:pre_custom_esp82xx.py
Duplicate this section and rename the section name (env:custom_ESP8266_1M) and add an extra line to the build_flags where you define your extra build define (start with -D)

For example:

Code: Select all

; Custom: 1M version --------------------------
[env:custom_misha_ESP8266_1M]
extends                   = esp8266_1M
platform                  = ${regular_platform.platform}
platform_packages         = ${regular_platform.platform_packages}
build_flags               = ${regular_platform.build_flags} 
                            ${esp8266_1M.build_flags} 
                            -DPLUGIN_BUILD_CUSTOM
                            -DPLUGIN_BUILD_MISHA
lib_ignore                = ESP32_ping, ESP32WebServer, ESP8266WiFiMesh
extra_scripts             = pre:pre_custom_esp82xx.py

Then in your Custom.h you make a section based on your newly added define like this:

Code: Select all

#ifdef PLUGIN_BUILD_MISHA
  #define USES_P001


#else
  #define USES_P002

#endif
This can be done with everything you need to define in your Custom.h, as long as you only define things once.
By using these #ifdef ... #else ... #endif sections, you can define different values based on a single define you set in your platformio.ini section.

You can also add multiple configs like this (e.g. PLUGIN_BUILD_MISHA2, PLUGIN_BUILD_MISHA3, etc) and then you must make sure to use a slightly more complex #ifdef schema:

Code: Select all

#ifdef PLUGIN_BUILD_MISHA
...
#elif defined(PLUGIN_BUILD_MISHA2)
...
#elif defined(PLUGIN_BUILD_MISHA3)
...
#else
...
#endif

Re: Serial MCU controlled relay/switch

Posted: 02 Mar 2020, 20:43
by Micha_he
Top, works :D With custom build and custom plugin-set.
Thank you very much...

But the Wifi-settings from the custom.h, have caused me some problems. Can I delete the all network-/wifi-/IP-/name-settings in the custom.h (lines 33-133), so the default setup wizard is starting in first boot?

Or is it necessary that some of the definitions have to be present in my custom.h?

Re: Serial MCU controlled relay/switch

Posted: 03 Mar 2020, 08:38
by TD-er
If you do not set default parameters for the WiFi credentials, the setup mode will be started.
If there are credentials present, it will try to use those and if it cannot connect to an AP, it will be starting an AP on its own as normal.
However, this is not as user friendly as it could have been.

So either fill in your own credentials, or place those lines in comments or use an empty string "" for those.

Re: Serial MCU controlled relay/switch

Posted: 03 Mar 2020, 10:26
by Micha_he
Ok, I'll try a new attempt tomorrow.

Re: Serial MCU controlled relay/switch

Posted: 06 Mar 2020, 13:58
by Micha_he
TD-er has build a test-image with current source here https://github.com/letscontrolit/ESPEas ... -595455760.
Maybe someone can test the reverse data transmission from the switch/dimmer. My MOES-WIFI-D01 have no real state feedback.

Re: Serial MCU controlled relay/switch

Posted: 08 Apr 2020, 13:43
by enesbcs
Now, after three years, i have decomissioned my last _Tuya based serial device_ from my home, replaced by Sonoff and Shelly devices. They are unnecessarily complicated by design and the firmware replacement process is also complex, so i will not buy any of them in the future.
FYI: Further support of this plugin is stopped.

Re: Serial MCU controlled relay/switch

Posted: 08 Apr 2020, 13:56
by _Cyber_
damn - now it is merged into espeasy mega mega and you throw them away? o_O
mine is still working flawless, have a punch of them lying around and waiting for them to get a job in my environments. :D

before I bought the 4-relay thing I took a look at the shelly. sadly they were not appliciable for me as they cannot simulate a 4-way-switch (https://en.wikipedia.org/wiki/Multiway_ ... _locations ) and I do not want to exchange all hardware-switches with push-button-switches of the lamps ...

hopefully your plugin will be maintained enough in the public repository, otherwise I have your custom firmware. :-)

thanks for your work enesbcs

best regards
Alois

Re: Serial MCU controlled relay/switch

Posted: 01 May 2020, 12:21
by riker1
Hi

anyone knows how to identify if :LC Tech has:
LC Technology WiFi Relay X2 with Nuvoton N76E003AT20

build on?

Thanks

Re: Serial MCU controlled relay/switch

Posted: 09 Jul 2020, 01:57
by fensoft
I have a lc 2relay and need to add the last write to make it work:

Code: Select all

          if (Plugin_165_ipd) {
            Serial.write(0x0D);
            Serial.write(0x0A);
            Serial.write(0x2B);
            Serial.write(0x49);
            Serial.write(0x50);
            Serial.write(0x44);
            Serial.write(0x2C);
            Serial.write(0x30);
            Serial.write(0x2C);
            Serial.write(0x34);
            Serial.write(0x3A);
            Serial.write("\nWIFI CONNECTED\nWIFI GOT IP\nAT+CIPMUX=1\nAT+CIPSERVER=1,8080\nAT+CIPSTO=360\n");
          }
i've also added this as rules:

Code: Select all

On System#Boot do
  relay,0,0
  timerSet,1,10
endon

On Rules#Timer=1 do
  relay,0,0
endon

Re: Serial MCU controlled relay/switch

Posted: 10 Jul 2020, 12:14
by elsalior
hi all,
i'struggling with a password for the AP mode which seem to be different for the bin image ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA.bin
does anyone knows that password ?

thx

Re: Serial MCU controlled relay/switch

Posted: 10 Jul 2020, 13:26
by TD-er
You can change it via serial.

Run

Code: Select all

WifiAPKey,<password>
save

Re: Serial MCU controlled relay/switch

Posted: 10 Jul 2020, 17:13
by enesbcs
elsalior wrote: 10 Jul 2020, 12:14 i'struggling with a password for the AP mode which seem to be different for the bin image ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA.bin
does anyone knows that password ?

Code: Select all

#define DEFAULT_AP_KEY      "configesp"

Re: Serial MCU controlled relay/switch

Posted: 01 Sep 2020, 22:41
by fresnoboy
Hi. I am running ESPEasy_Mega_P165_4M_1MS_lwip20.bin on my lctech 4 relay switches, but the openhab MQTT broker in that version seems to lose contact with the MQTT broker occasionally (after a week or so). I am wondering if there is a more up to date mega version that has the serial port support for the Nuvotron part in the lc tech relays that people find works reliably.

It's a little hard to tell from the github repository which version will run on the the LC Tech relays...

thx!
mike

Re: Serial MCU controlled relay/switch

Posted: 01 Sep 2020, 22:58
by enesbcs
fresnoboy wrote: 01 Sep 2020, 22:41 It's a little hard to tell from the github repository which version will run on the the LC Tech relays...
Serial MCU plugin is now included in ESPEasy TESTING releases.
https://github.com/letscontrolit/ESPEasy/releases

Re: Serial MCU controlled relay/switch

Posted: 01 Sep 2020, 23:38
by fresnoboy
enesbcs wrote: 01 Sep 2020, 22:58
fresnoboy wrote: 01 Sep 2020, 22:41 It's a little hard to tell from the github repository which version will run on the the LC Tech relays...
Serial MCU plugin is now included in ESPEasy TESTING releases.
https://github.com/letscontrolit/ESPEasy/releases
Thats great to know. So any of the normal ESP8266 4M1M images will work then?

thx
mike

Re: Serial MCU controlled relay/switch

Posted: 01 Sep 2020, 23:58
by TD-er
Not the "normal" but the "test" named builds.

Re: Serial MCU controlled relay/switch

Posted: 02 Sep 2020, 03:20
by fresnoboy
TD-er wrote: 01 Sep 2020, 23:58 Not the "normal" but the "test" named builds.
Well, I just tried flashing the ESP_Easy_mega_20200829_test_beta_ESP8266_4M1M.bin file to the LC Tech 8266, and it doesn't seem to come up. Sorry if I am missing something obvious...

Do I flash it with the same parameters as I did the older one:

esptool --port /dev/ttyUSB0 write_flash -fs 32m 0x00000 ESP_Easy_mega_20200829_test_beta_ESP8266_4M1M.bin

Thx
mike