Serial MCU controlled relay/switch

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
countcobolt
Normal user
Posts: 32
Joined: 12 Jun 2017, 11:12

Re: Serial MCU controlled relay/switch

#161 Post by countcobolt » 18 Jun 2018, 08:39

enesbcs wrote: 17 Jun 2018, 20:24
countcobolt wrote: 17 Jun 2018, 16:13 sorry is this is a stupid question, but will your firmware work with the Sonoff T1 2Gang (similar to the dual?). I both 2 and want to be able to control them using ESPEasy and Domoticz.
This plugin will not work with any Sonoff T1. According to Tasmota wiki:
"When pushing a button, the touch chip lift the power high to the EFM8BB1, and the EFM8BB1 chip ties the signal line for each button low, for the full duration of the keypress. There is no serial data, that i have seen at all."
The device's operation is somewhat obscure to me, i am using my own T1 2Gang with Tasmota without problmes. :)

Hey Enesbcs

do you use the web or MQTT component for this? (On Tasmota)

Kind regards

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#162 Post by enesbcs » 18 Jun 2018, 15:15

countcobolt wrote: 18 Jun 2018, 08:39 do you use the web or MQTT component for this? (On Tasmota)
I am using the Tasmota MQTT with Sonoff T1, works perfecty with my Domoticz server.

desprueht
New user
Posts: 4
Joined: 17 Jun 2018, 15:24

Re: Serial MCU controlled relay/switch

#163 Post by desprueht » 18 Jun 2018, 17:41

enesbcs wrote: 17 Jun 2018, 22:44
desprueht wrote: 17 Jun 2018, 15:53 Hello,

Relay control instructions (hex hexadecimal):
Open the first relay: A0 01 01 A2
Turn off the first relay: A0 01 00 A1
Open the second relay: A0 02 01 A3
Close the second relay: A0 02 00 A2
Open the third relay: A0 03 01 A4
Turn off the third relay: A0 03 00 A3
Open the fourth relay: A0 04 01 A5
Turn off the fourth relay: A0 04 00 A4"

and the link:
http://www.chinalctech.com/index.php?_m ... &p_id=1288
Ok the commands seems consistent, i expanded the plugin to support 4 relay, now it can be selected in plugin options.
Download and try: v23
Hi, thank you very much for your work.
I have a problem with the webinterface. when i click on Devices and add a Serial MCU controlled switch, then I can't edit the device. The ESP-01 makes a restart.

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#164 Post by enesbcs » 18 Jun 2018, 19:05

desprueht wrote: 18 Jun 2018, 17:41 Hi, thank you very much for your work.
I have a problem with the webinterface. when i click on Devices and add a Serial MCU controlled switch, then I can't edit the device. The ESP-01 makes a restart.
You're right... i left out one index, and ESP did not honor buffer overflow. :)
Try the updated binary.

desprueht
New user
Posts: 4
Joined: 17 Jun 2018, 15:24

Re: Serial MCU controlled relay/switch

#165 Post by desprueht » 18 Jun 2018, 21:22

enesbcs wrote: 18 Jun 2018, 19:05
desprueht wrote: 18 Jun 2018, 17:41 Hi, thank you very much for your work.
I have a problem with the webinterface. when i click on Devices and add a Serial MCU controlled switch, then I can't edit the device. The ESP-01 makes a restart.
You're right... i left out one index, and ESP did not honor buffer overflow. :)
Try the updated binary.
It's so wunderfull. Thank you for all...

Whitey
New user
Posts: 7
Joined: 04 Aug 2018, 12:02

Re: Serial MCU controlled relay/switch

#166 Post by Whitey » 04 Aug 2018, 12:13

Very new to all this so forgive me.

Had one of these laying around as it was useless in its original state. Managed to flash the firmware and get it working.

I wish to use it to control a garage opener that only requires a momentary switch. Is it possible to do that with this?

Have tried the pulse command but had a feeling it wound not work and I was correct.

At the moment I have a script setup in home assistant that turns the off after 1 second but find this is more like 2 or 3 seconds. The script is a very crude way to do what I want so was hoping for a better solution.

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#167 Post by enesbcs » 04 Aug 2018, 17:15

Whitey wrote: 04 Aug 2018, 12:13 Had one of these laying around as it was useless in its original state. Managed to flash the firmware and get it working.
What device? This plugin supports some kind from Lctech, Tuya, S.Dual.. be a little more specific. I think it can be done with EspEasy rules.

Whitey
New user
Posts: 7
Joined: 04 Aug 2018, 12:02

Re: Serial MCU controlled relay/switch

#168 Post by Whitey » 04 Aug 2018, 22:01

enesbcs wrote: 04 Aug 2018, 17:15 What device? This plugin supports some kind from Lctech, Tuya, S.Dual.. be a little more specific. I think it can be done with EspEasy rules.
Sorry about that, referring to the 12v LC Tech single channel relay (same one as the post at 116)
lctech12.jpg
lctech12.jpg (34.33 KiB) Viewed 162406 times

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#169 Post by enesbcs » 05 Aug 2018, 09:52

Whitey wrote: 04 Aug 2018, 22:01 Sorry about that, referring to the 12v LC Tech single channel relay (same one as the post at 116)
I see. You have to enable rules in Espeasy advanced settings, then if the serial device name is "lc" and the first relay named as "Relay0" (default) then the code below switches off the relay one seconds after switched on. It has to work, if somehow not, then i will ty to implement it inside the plugin.

Code: Select all

on lc#Relay0>0 do
 timerset,1,1
endon

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

Whitey
New user
Posts: 7
Joined: 04 Aug 2018, 12:02

Re: Serial MCU controlled relay/switch

#170 Post by Whitey » 05 Aug 2018, 10:08

enesbcs wrote: 05 Aug 2018, 09:52
Whitey wrote: 04 Aug 2018, 22:01 Sorry about that, referring to the 12v LC Tech single channel relay (same one as the post at 116)
I see. You have to enable rules in Espeasy advanced settings, then if the serial device name is "lc" and the first relay named as "Relay0" (default) then the code below switches off the relay one seconds after switched on. It has to work, if somehow not, then i will ty to implement it inside the plugin.

Code: Select all

on lc#Relay0>0 do
 timerset,1,1
endon

on Rules#Timer=1 do
 relay,0,0
endon
Will give it a go when I get home in an hour or so.

Thanks heaps

Whitey
New user
Posts: 7
Joined: 04 Aug 2018, 12:02

Re: Serial MCU controlled relay/switch

#171 Post by Whitey » 05 Aug 2018, 11:33

Can't get it to work. Relay still just turns on or off as if there are no rules.

Will have a play with the rules and see if I can get something working tho

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#172 Post by enesbcs » 05 Aug 2018, 14:21

Whitey wrote: 05 Aug 2018, 11:33 Can't get it to work. Relay still just turns on or off as if there are no rules.

Will have a play with the rules and see if I can get something working tho
Check v2:

Code: Select all

on lc#Relay0 do
 if [lc#Relay0]>0
  timerset,1,1
 endif
endon

on Rules#Timer=1 do
 relay,0,0
endon
or v3:

Code: Select all

on lc#Relay0 do
 timerset,1,1
endon

on Rules#Timer=1 do
 if [lc#Relay0]>0
  relay,0,0
 endif
endon
And see what EspEasy logs says..

Whitey
New user
Posts: 7
Joined: 04 Aug 2018, 12:02

Re: Serial MCU controlled relay/switch

#173 Post by Whitey » 06 Aug 2018, 02:23

Will give V2 and v3 a try and watch the logs.

I assume the rules don't need to be enabled anywhere else in the settings to enable them? Just enable rules in advance settings then create the rule for them to work.

Thanks for for assistance and patience so far.

Whitey
New user
Posts: 7
Joined: 04 Aug 2018, 12:02

Re: Serial MCU controlled relay/switch

#174 Post by Whitey » 06 Aug 2018, 12:12

Update.

Managed to get it working with your first code. Appears sleep and reading instructions correctly kinda help.

I had my device named Relay and say you had it name lc. A simple change in name fixed it.

Sorry for the stuff up my end.

Thanks heap in helping me out here.

Is it possible to reduce the time to less than 1 second? I will have a read and see if I can find the answer myself but just in case I fail again.

fyi all 3 rules work and give the desired result

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#175 Post by enesbcs » 06 Aug 2018, 17:23

Whitey wrote: 06 Aug 2018, 12:12 Managed to get it working with your first code. Appears sleep and reading instructions correctly kinda help.

Is it possible to reduce the time to less than 1 second? I will have a read and see if I can find the answer myself but just in case I fail again.
Great news, you are welcome.
In rules one second is the smallest interval as i know.
I think i can implement a new command in the plugin for example "relaypulse" for smaller intervals, but due to the characteristics and speed of the serial connection the results will not be as you expect. I have an LCTech relay somewhere hidden in my shelf, will try it and publish the plugin if it can handle it.

Whitey
New user
Posts: 7
Joined: 04 Aug 2018, 12:02

Re: Serial MCU controlled relay/switch

#176 Post by Whitey » 06 Aug 2018, 23:51

enesbcs wrote: 06 Aug 2018, 17:23
Whitey wrote: 06 Aug 2018, 12:12 Managed to get it working with your first code. Appears sleep and reading instructions correctly kinda help.

Is it possible to reduce the time to less than 1 second? I will have a read and see if I can find the answer myself but just in case I fail again.
I have an LCTech relay somewhere hidden in my shelf, will try it and publish the plugin if it can handle it.
Thanks for the offer but no need to worry if it isn't currently supported. This is just a test device I had laying around while I learnt the ropes. Have ordered some sonoff low voltage boards to use as the garage control runs off 24V DC and this test board is a 12v board so I will be using a power pack while I test.

Thanks again for your help. It was very much appreciated.

oleost
New user
Posts: 1
Joined: 22 Aug 2018, 21:09

Re: Serial MCU controlled relay/switch

#177 Post by oleost » 22 Aug 2018, 21:12

Hi.

Anyone sucessfully used this on the "ESP8266 4CH 12V WiFi" found on aliexpress ?

https://www.aliexpress.com/wholesale?ca ... H+12V+WiFi+

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#178 Post by enesbcs » 16 Sep 2018, 22:10

oleost wrote: 22 Aug 2018, 21:12 Anyone sucessfully used this on the "ESP8266 4CH 12V WiFi" found on aliexpress ?
https://www.aliexpress.com/wholesale?ca ... H+12V+WiFi+
I do not own this model, but according to this description:
https://www.aliexpress.com/item/4CH-ESP ... 90810.html
it is controlled by the standard LCTech serial commands (A0 01 01 A2...) which is supported by this P165 plugin. Also the onboard ESP-01 may require the 1MB Puya safe binary.

Btje
Normal user
Posts: 11
Joined: 23 Oct 2016, 14:13

Re: Serial MCU controlled relay/switch

#179 Post by Btje » 17 Oct 2018, 07:50

Looking for the tuya dimmer in EU format but can't find a place to buy. Any tips?

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#180 Post by riker1 » 27 Oct 2018, 18:24

Hi
having this modul attached to fhem via espbridge

How can I switch the relay?

do int it at the moment via wget
but isn't there a option via esp module fhem?

Thanks

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#181 Post by enesbcs » 27 Oct 2018, 21:18

riker1 wrote: 27 Oct 2018, 18:24 Hi
having this modul attached to fhem via espbridge

How can I switch the relay?

do int it at the moment via wget
but isn't there a option via esp module fhem?

Thanks
How can you execute any ESPEasy command via fhem? You can use exactly the same way the relay command, mentioned at the first post of this thread. I am using relay command via HTTP and within RULES.
I am not familiar with FHEM, but with MQTT there are a third way:

Code: Select all

<MQTT subscribe template>/cmd with payload: <command>
I think you can do it with creating some virtual switches inside ESPEasy that can be controlled by FHEM controller and maintains the changes with specific RULES.

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#182 Post by riker1 » 28 Oct 2018, 11:34

thanks

good idea via mqtt

fahrt
New user
Posts: 4
Joined: 13 Nov 2018, 21:46

Re: Serial MCU controlled relay/switch

#183 Post by fahrt » 13 Nov 2018, 21:52

enesbcs wrote: 18 Jun 2018, 19:05
desprueht wrote: 18 Jun 2018, 17:41 Hi, thank you very much for your work.
I have a problem with the webinterface. when i click on Devices and add a Serial MCU controlled switch, then I can't edit the device. The ESP-01 makes a restart.
You're right... i left out one index, and ESP did not honor buffer overflow. :)
Try the updated binary.
Hello. I was looking for firmware to control LCTech 4ch board and I've found this forum. Unfortunetly above link is not working anymore :( . Could you attach file once again.

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#184 Post by enesbcs » 13 Nov 2018, 21:56

fahrt wrote: 13 Nov 2018, 21:52 Hello. I was looking for firmware to control LCTech 4ch board and I've found this forum. Unfortunetly above link is not working anymore :( . Could you attach file once again.
As always, you can find the compiled binaries attached to the first post in this thread. Try the PUYA safe binary if you are not sure which one is for your ESP-01.

fahrt
New user
Posts: 4
Joined: 13 Nov 2018, 21:46

Re: Serial MCU controlled relay/switch

#185 Post by fahrt » 14 Nov 2018, 21:08

enesbcs wrote: 13 Nov 2018, 21:56
fahrt wrote: 13 Nov 2018, 21:52 Hello. I was looking for firmware to control LCTech 4ch board and I've found this forum. Unfortunetly above link is not working anymore :( . Could you attach file once again.
As always, you can find the compiled binaries attached to the first post in this thread. Try the PUYA safe binary if you are not sure which one is for your ESP-01.
I've flashed with "ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA.bin" but This one works only with 2 relays

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#186 Post by enesbcs » 14 Nov 2018, 21:47

fahrt wrote: 14 Nov 2018, 21:08
enesbcs wrote: 13 Nov 2018, 21:56
fahrt wrote: 13 Nov 2018, 21:52 Hello. I was looking for firmware to control LCTech 4ch board and I've found this forum. Unfortunetly above link is not working anymore :( . Could you attach file once again.
As always, you can find the compiled binaries attached to the first post in this thread. Try the PUYA safe binary if you are not sure which one is for your ESP-01.
I've flashed with "ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA.bin" but This one works only with 2 relays
Sorry, i left out the Puya binary, i forgot that previous version is not capable to handle 4ch. :)
Try this:
Attachments
ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA.zip
ESPEasy dev with P165
(388.99 KiB) Downloaded 3944 times

fahrt
New user
Posts: 4
Joined: 13 Nov 2018, 21:46

Re: Serial MCU controlled relay/switch

#187 Post by fahrt » 15 Nov 2018, 20:07

enesbcs wrote: 14 Nov 2018, 21:47
fahrt wrote: 14 Nov 2018, 21:08
enesbcs wrote: 13 Nov 2018, 21:56
As always, you can find the compiled binaries attached to the first post in this thread. Try the PUYA safe binary if you are not sure which one is for your ESP-01.
I've flashed with "ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA.bin" but This one works only with 2 relays
Sorry, i left out the Puya binary, i forgot that previous version is not capable to handle 4ch. :)
Try this:
Thank You for the file I'll test it on weekend :)

fahrt
New user
Posts: 4
Joined: 13 Nov 2018, 21:46

Re: Serial MCU controlled relay/switch

#188 Post by fahrt » 22 Nov 2018, 19:25

fahrt wrote: 15 Nov 2018, 20:07
enesbcs wrote: 14 Nov 2018, 21:47
fahrt wrote: 14 Nov 2018, 21:08

I've flashed with "ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA.bin" but This one works only with 2 relays
Sorry, i left out the Puya binary, i forgot that previous version is not capable to handle 4ch. :)
Try this:
Thank You for the file I'll test it on weekend :)
I've tested it and works great :D, many thanks. There are little delays but probably because i use HTTP commands to control it by Domoticz.

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#189 Post by enesbcs » 22 Nov 2018, 22:03

fahrt wrote: 22 Nov 2018, 19:25 I've tested it and works great :D, many thanks. There are little delays but probably because i use HTTP commands to control it by Domoticz.
You are welcome. Maybe you can try faster serial speed, some device can be used at 115200 baud. Some can not. :)
Also disable command doubling if device works without it. Anyway, Wifi devices have some delays basically.

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#190 Post by riker1 » 04 Dec 2018, 20:37

Hi
using latest firmware,
but FHEM is not available as controller?

Could you make a version with Fhem enabled in controller list?

OpenHAB MQTT and FHEM would be perfect

Thanks T

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#191 Post by enesbcs » 04 Dec 2018, 21:23

riker1 wrote: 04 Dec 2018, 20:37 Hi
using latest firmware,
but FHEM is not available as controller?

Could you make a version with Fhem enabled in controller list?

OpenHAB MQTT and FHEM would be perfect

Thanks T
Yes i can. 4MB version will be OK?

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#192 Post by riker1 » 04 Dec 2018, 22:07

Hi
thanks

perfect,

No i would need a small version for esp01S

LC TEch with 2 relays

Thanks a lot T

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#193 Post by enesbcs » 05 Dec 2018, 19:15

riker1 wrote: 04 Dec 2018, 22:07 No i would need a small version for esp01S

LC TEch with 2 relays

Thanks a lot T
OpenHab+FHEM included

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#194 Post by riker1 » 05 Dec 2018, 19:19

Thanksgiving perfekt

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#195 Post by riker1 » 06 Dec 2018, 00:20

Hi
could you please double check.
Do not see FHEM as Controller?

Thanks Thomas


Firmware
Build 20102 - Mega
Libraries ESP82xx Core 2_4_0, NONOS SDK 2.1.0(deb1901), LWIP: 2.0.3
GIT version (custom)
Plugins 11 [Normal]
Build Md5 4d44355f4d44355f4d44355f4d44355f
Build time Dec 5 2018 18:55:03
Binary filename ThisIsTheDummyPlaceHolderForTheBinaryFilename64ByteLongFilenames

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#196 Post by enesbcs » 06 Dec 2018, 20:27

riker1 wrote: 06 Dec 2018, 00:20 Hi
could you please double check.
Do not see FHEM as Controller?
Yep, sorry i forgot, that i not just deleted the file, but removed my pluginset completely before.
Recompiled.
Attachments
ESPEasy_P165.zip
ESPEasy P165 1MB
(781.87 KiB) Downloaded 961 times

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#197 Post by riker1 » 06 Dec 2018, 22:07

thanks, perfect, working now!!

xonecell
New user
Posts: 1
Joined: 06 Jan 2019, 17:13

Re: Serial MCU controlled relay/switch

#198 Post by xonecell » 06 Jan 2019, 17:24

Hello, I have LC Tech relay x2 12v, I followed post #138 on installing ESP Easy (ESPEasy_1M_128kSPIFFS_PUYA.zip)
Everything works, MQTT, HTTP, and I can hear the switch clicking when turning it on or off, but I am not getting any output voltage from both relays, what could be the cause? This is the second board I have bought already, the first one burned(https://www.aliexpress.com/item/12V-WIF ... 34092.html) and I dont want to order another one, any ideas? Thanks

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#199 Post by enesbcs » 06 Jan 2019, 18:08

xonecell wrote: 06 Jan 2019, 17:24 Hello, I have LC Tech relay x2 12v, I followed post #138 on installing ESP Easy (ESPEasy_1M_128kSPIFFS_PUYA.zip)
Everything works, MQTT, HTTP, and I can hear the switch clicking when turning it on or off, but I am not getting any output voltage from both relays, what could be the cause? This is the second board I have bought already, the first one burned(https://www.aliexpress.com/item/12V-WIF ... 34092.html) and I dont want to order another one, any ideas? Thanks
If the relay clicks the works.. my first idea is: the 12V power supply is weak to power the relays, try with larger, 1A,2A...
Second thought: Check soldering points of the relays at the back side, resolder them if necessary - of course check NO/NC with a multimeter previously.

mikeoh90
New user
Posts: 3
Joined: 22 Feb 2019, 17:08

Re: Serial MCU controlled relay/switch

#200 Post by mikeoh90 » 23 Feb 2019, 20:36

Is there a way to use this with the 4x channel LC Tech relay? Works on my 2ch version, but the only option in 'number of relays' is 1 or 2.

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#201 Post by enesbcs » 24 Feb 2019, 00:08

mikeoh90 wrote: 23 Feb 2019, 20:36 Is there a way to use this with the 4x channel LC Tech relay? Works on my 2ch version, but the only option in 'number of relays' is 1 or 2.
Then you are using an old version. Latest plugin supports 4channel. Binaries attached in the first post if this thread, i guess you need the last Puya version...
download/file.php?id=3336&sid=622fad533 ... 869d1d3f58

mikeoh90
New user
Posts: 3
Joined: 22 Feb 2019, 17:08

Re: Serial MCU controlled relay/switch

#202 Post by mikeoh90 » 24 Feb 2019, 12:28

enesbcs wrote: 24 Feb 2019, 00:08
mikeoh90 wrote: 23 Feb 2019, 20:36 Is there a way to use this with the 4x channel LC Tech relay? Works on my 2ch version, but the only option in 'number of relays' is 1 or 2.
Then you are using an old version. Latest plugin supports 4channel. Binaries attached in the first post if this thread, i guess you need the last Puya version...
download/file.php?id=3336&sid=622fad533 ... 869d1d3f58
You're absolutely right! :oops: thanks! Working great now.

I'm using it to simulate remote control presses on a velux blind remote - soldered wires from the output of the first three relays to up, down and stop. Using MQTT commands from homeassistant to simulate the button presses on and off. Only problem I'm having is that sometimes the delay between MQTT commands is a bit long and it thinks the button has been held (on button hold, the blinds will move until the remote button is released), meaning the blind only moves minimally before stopping. Is there a way open the relay only briefly and close it automatically after a short time (100-500ms) - like a pulse on option - so I can just send one MQTT command for the relay to turn on then immediately off again?

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#203 Post by enesbcs » 24 Feb 2019, 15:35

mikeoh90 wrote: 24 Feb 2019, 12:28 Is there a way open the relay only briefly and close it automatically after a short time (100-500ms) - like a pulse on option - so I can just send one MQTT command for the relay to turn on then immediately off again?
Yes. If you read the header of the plugin, you will see that "relaypulse" command is already supported:
https://github.com/letscontrolit/ESPEas ... Switch.ino

mikeoh90
New user
Posts: 3
Joined: 22 Feb 2019, 17:08

Re: Serial MCU controlled relay/switch

#204 Post by mikeoh90 » 24 Feb 2019, 18:08

enesbcs wrote: 24 Feb 2019, 15:35
mikeoh90 wrote: 24 Feb 2019, 12:28 Is there a way open the relay only briefly and close it automatically after a short time (100-500ms) - like a pulse on option - so I can just send one MQTT command for the relay to turn on then immediately off again?
Yes. If you read the header of the plugin, you will see that "relaypulse" command is already supported:
https://github.com/letscontrolit/ESPEas ... Switch.ino
Yes!! I knew I'd read this somewhere but then couldn't find it again when I needed it. Thanks so much, works like a dream now!

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#205 Post by riker1 » 07 Mar 2019, 09:04

enesbcs wrote: 06 Dec 2018, 20:27
riker1 wrote: 06 Dec 2018, 00:20 Hi
could you please double check.
Do not see FHEM as Controller?
Yep, sorry i forgot, that i not just deleted the file, but removed my pluginset completely before.
Recompiled.
Hi

is it possible to have an updated firmware?
- required:
controller:
FHEM, MQTT,

device: of courcse MCU relais
- is it possible to add generic MQTT import?
- generic system info with 4 variables?

Thanks a lot

T

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#206 Post by enesbcs » 07 Mar 2019, 19:44

riker1 wrote: 07 Mar 2019, 09:04 is it possible to have an updated firmware?
Sorry, the latest ESPEasy version i tested with this plugin is dated 2018.08.17 with core 2.4.0 and currently i have no time for testing.
Core 2.4.1 and 2.4.2 is not working well with serial 2 way communication, and with 2.5.0 i have absolutely zero experiences. New ESPEasy versions tends to change a lot in it's core code (which requires more attention from the plugin creators), and be more complexer, even bigger than i ever needed for switching a lamp to ON. However I can compile some testing binaries to you which may work or will make your device to stop responding...

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#207 Post by riker1 » 08 Mar 2019, 07:47

enesbcs wrote: 07 Mar 2019, 19:44
riker1 wrote: 07 Mar 2019, 09:04 is it possible to have an updated firmware?
Sorry, the latest ESPEasy version i tested with this plugin is dated 2018.08.17 with core 2.4.0 and currently i have no time for testing.
Core 2.4.1 and 2.4.2 is not working well with serial 2 way communication, and with 2.5.0 i have absolutely zero experiences. New ESPEasy versions tends to change a lot in it's core code (which requires more attention from the plugin creators), and be more complexer, even bigger than i ever needed for switching a lamp to ON. However I can compile some testing binaries to you which may work or will make your device to stop responding...
ok, thanks understood.

Is there a plan to integrate this 165 plugin into the mega firmware?

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Serial MCU controlled relay/switch

#208 Post by enesbcs » 23 Mar 2019, 22:05

riker1 wrote: 07 Mar 2019, 09:04 is it possible to have an updated firmware?
- required:
controller:
FHEM, MQTT,

device: of courcse MCU relais
- is it possible to add generic MQTT import?
- generic system info with 4 variables?
New binary attached with 20190311 sources compiled against Arduino ESP core 2.5.0.
UNTESTED and totally UNSUPPORTED! Use and test only your own risk. I warned you.
Serial comm may or may not work. Puya version not mentioned so i skipped it.
(Prepare with some screwdrivers and soldering iron and serial-USB programmer, before using these binaries.)
Attachments
ESPEasy_P165_unstable.zip
ESPEasy_P165 unstable
(896.84 KiB) Downloaded 936 times

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#209 Post by riker1 » 25 Mar 2019, 06:33

ok perfect thanks will test it

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: Serial MCU controlled relay/switch

#210 Post by riker1 » 27 Mar 2019, 12:53

Hi

I checked with ESP01 and had a problem writing config data.

so setting a device destroyed the config.

Looks like it is not working.

Any idea?

thanks T

Post Reply

Who is online

Users browsing this forum: No registered users and 119 guests