Hi.
I have a Samsung ducted AC, with it's indoor unit installed in the roof void of house.
Then there is a wired controller on my wall that sends signals to the AC indoor unit over two wires (F3,F4).
I want to replace this wired controller and use ESP32 to send wired signals to the AC indoor unit using digital outputs.
So, I want to have an app in my android phone that will tell ESP32 (over wi-fi) how to control the AC (over the wired cables).
Phone ----------(wifi)------> ESP32 ----------(wired)--------->AC indoor unit.
However before that can be done, I will have to know what binary signals the existing wired controller sends to the AC.
Is there any way to first use ESP32 to sniff the signals sent by wired controller? (may be by connecting ESP32 Digital inputs to existing wired controller F3,F4 wires and sniff various binary codes (e.g. for temperature decrease, increase, On, Off, Fan On, Fan Off etc.)?
Is that possible, or did I got it all wrong?
Thanks.
Samsung Duct S Air conditioner details:
Indoor unit: AC120HBHFKH/SA
Outdoor unit: AC120HCAFKH/SA
Wired Remote Control: MWR-WE10
How to Sniff binary data using ESP32
-
- Posts: 1
- Joined: Thu Apr 08, 2021 12:16 pm
Re: How to Sniff binary data using ESP32
It sounds doable.
But IMHO the best way to "sniff" this will be using a logic analyzer and connect it directly to the USB of your computer.
I've sniffed some time ago SPI using ESP32 as an slave: https://github.com/martinberlin/esp32-spi-slave
Bu I'm not sure if that will help. I would get a 10 $ logic analyzer and go the safe road. Another thing will be to get what is the protocol for that device and also to check if there is some existing library to control it.
But IMHO the best way to "sniff" this will be using a logic analyzer and connect it directly to the USB of your computer.
I've sniffed some time ago SPI using ESP32 as an slave: https://github.com/martinberlin/esp32-spi-slave
Bu I'm not sure if that will help. I would get a 10 $ logic analyzer and go the safe road. Another thing will be to get what is the protocol for that device and also to check if there is some existing library to control it.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: How to Sniff binary data using ESP32
Note that these signals tend to be 'something' superimposed on the 12VDC that feeds the remote controller, so connecting it directly to an ESP will make things go boom quick-fast-in-a-hurry. I've happened to do some research into aircos (I have an old Mitsubishi here) and what I've seen is 12V with pulses going up and down layered on top (HomeBus, same as Daikin uses), 12V with a superimposed 50KHz OOK-modulated serial signal, as well as 12V with a superimposed 41KHz remote-control like (1/4th on + 3/4th off = 0, 3/4th on + 1/4th off = 1) signal. All these mean you need to have some kind of interface before you feed things into your ESP: either a specialized interface chip or a simple analog signal to demodulate OOK signals.
Re: How to Sniff binary data using ESP32
dumprec4@gmail.com wrote: ↑Thu Apr 08, 2021 12:28 pmI will have to know what binary signals the existing wired controller sends to the AC.
Samsung Duct S Air conditioner details:
Indoor unit: AC120HBHFKH/SA
Outdoor unit: AC120HCAFKH/SA
Wired Remote Control: MWR-WE10
Wired Remote Control: MWR-WE10 ?
Command Tables...
The wired remote control is the master, the indoor units are the slaves.
The wired remote control send commands as a message of 14 bytes.
The units respond with a similar message with the same length.
The protocol can be described as follows:
In an example case the address of the wired remote control is 0x84, the address of example 2 indoor units are 0x20 and 0x21.<start> <src> <dst> <cmd> <data: 8 bytes> <chksum> <end>
With:
Byte Identifier Comments
----------------------------
1 Start : start of message (0x32)
2 Src : Source address
3 Dst : Destination address
4 Cmd : Command byte
5-12 Data : Data is always 8 bytes in length, unused bytes will be zero
13 Chksum : Checksum of message which is the XOR of bytes 2-12
14 End : end of message (0x34)
The master sends a command to a slave, the slave responds to the master.
An example communication can look like this (all values are hex and xx represent any value):
That's the easy part of the communication sniffing.Command:
32 84 20 53 xx xx xx xx xx xx xx xx xx 34
Reply:
32 20 84 53 xx xx xx xx xx xx xx xx xx 34
The difficult part is to find out the meaning of all commands and the meaning of al bytes for each command/response.
Perhabs this helps
back to your question:
yes you can -
Danny makes it with Raspberry Pi and a RS485 -> TTL convertor
You can use ESP32 same way - check the 5V lines - cause esp is not 5V line tolerant
you can use an voltage divider in rx line ( esp side ) example but not the only possible - TTL RS485 Adapter 485 UART Seriell 3.3V 5 Volt Level Konverter Modul Arduino
hope this helps
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: How to Sniff binary data using ESP32
Hidumprec4@gmail.com wrote: ↑Thu Apr 08, 2021 12:28 pm
However before that can be done, I will have to know what binary signals the existing wired controller sends to the AC.
Is there any way to first use ESP32 to sniff the signals sent by wired controller? (may be by connecting ESP32 Digital inputs to existing wired controller F3,F4 wires and sniff various binary codes (e.g. for temperature decrease, increase, On, Off, Fan On, Fan Off etc.)?
Is that possible, or did I got it all wrong?
Samsung Duct S Air conditioner details:
Indoor unit: AC120HBHFKH/SA
Outdoor unit: AC120HCAFKH/SA
Wired Remote Control: MWR-WE10
Back to your Question.
firstly you should check what power supply the lines are, so g**g*e bring many things to the MWR-WE10
Handbooks divers language
Service Manual with Errorcodes, PCB, Wiring Diagram, Shematics..
you see on PCB S.34 the protocoll type 485 on F3, F4
on the PCB S.35, you can see the 485 TTL to the F3, F4
From the PCB ( VCC 5V 485 ) should F3,F4 Modbus be 5V.
All what you have to do is
-first check this V5 right?
-use 5V TTL Modbus Converter to ESP32
- sniff the Data with it
( How to make MODBUS work with ESP32 - Arduino - RS485 - Part 1)
use Logic Analyzer for 10 USD for the protokoll on USB / PC and you can listen to the commands and make your own data sniff protokoll which you then use for the communciation between ESP32 and Modbus 485 F3, F4 over 5V-3.3V Level Shifter ..
Hope this helps.
Try by self -you learn more at this point
best wishes
and happy coding
rudi
- Attachments
-
- SAMSUNG-MWR-WE10-BACKLIT-CONTROLLER-DUCTED.pdf
- Service Manual
with PCB,Wiring Diagram,Shematic - (10.68 MiB) Downloaded 470 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: How to Sniff binary data using ESP32
Wow Rudi, what a good detailed answer (takes his hat off)
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design
Re: How to Sniff binary data using ESP32
..i did forget the TOQ ( thread-opener-question )
possible to use esp32 as an Logic Analyzer it self:How to Sniff binary data using ESP32?
https://www.esp32.com/viewtopic.php?t=3995#p18041
viewtopic.php?t=14135
https://github.com/EUA/ESP32_LogicAnalyzer
https://specific.solutions.limited/proj ... c-analyzer
https://www.pschatzmann.ch/home/2021/04 ... the-esp32/
nice weekend!
(g'sund bleib'n)
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Who is online
Users browsing this forum: No registered users and 13 guests