Analog thermostat to BLE one? Where to start? - Page 1
Forum section: electronics / general

author: nardev
author_rank: Unknown
timestamp: September 24, 2020, 02:53:55 pm
content: In my home i have pretty simple analog Herz thermostat for central heating. Essentially, it just "connects" two wires when the templ drops below certain point.I'm looking to replace it but without additional wires. No SONOFF, shellies etc. I would have to dig the wall for all of that ot to have hanging wires on the wall.My initial thought is to "extend" it to a BLE device as i already have some "BLE-EY-08" BLE modules and i can easily put additional batteries to power the BLE module and at the same time preserve the analog functionalities to a point.Any better ideas? I'm also wondering why there is no BLE relay modules that are battery powered and capable of only making cold contacts like this thermostat isI couldn't find any. That would solve my problem too.p.s. the controller used there is:https://www.renesas.com/cn/zh/doc/products/mpumcu/doc/rl78/r01ds0168ej0210-rl78l13.pdfSo, here is how it looks inside:

author: nardev
author_rank: Unknown
timestamp: September 27, 2020, 11:15:56 am
content: nobody nothing

author: JoeyG
author_rank: Regular Contributor
timestamp: September 27, 2020, 11:46:47 am
content: BLE connections are typically a  and  , hence you need to be sure that the BLE modules so either end.Typically a smartphone is the central.https://embedded.fm/blog/ble-rolesBluetooth Classic has/had SPP (serial port profile), also known as [wire cable replacement].Some BLE modules have [transparent UART] similar to SPP , but you still need to make sure the BLE can do  and Like this onehttps://www.microchip.com/wwwproducts/en/RN4870http://ww1.microchip.com/downloads/en/DeviceDoc/RN4870-71-Bluetooth-Low-Energy-Module-User-Guide-DS50002466C.pdfextract"Interactive ASCII commands enable the RN4870/71 to be configured without complexconfiguration tools. The RN4870/71 supports both peripheral and central GenericAccess Profile (GAP) roles, actively scanning for other connectable devices instead ofwaiting for incoming connection requests."Transparent UARTThe RN4870/71 introduces a private GATT service named as “Transparent UART”.This service simplifies serial data transfers over Bluetooth Low Energy (BTLE) devices.RN4870/71 Transparent UART seamlessly transfer serial data from its UART over aBluetooth Low Energy connection, providing an end-to-end data pipe to another Bluetooth device such as RN4870/71 module or Smartphone.

author: nardev
author_rank: Unknown
timestamp: October 23, 2020, 06:42:51 am
content: Ok, here is what i made and it works this way but there is a HUGE problem.1. I was not able to determine the serial communication with the controller on the thermostat. (Tried detecting the tx/rx traffic, but there was nothing, maybe something enables it, i couldn't figure out)2. Although it's obvious that this PCB is prepared for some sort of wireless module, i was not able to determine which one or how the main MCU is communicating with it.3. Great thing is that the thermostat is using bistable/latching relay so it only requires one short pulse from the right side to change the state!3. I was able to trace two lines which are setting the relay, the plan was just to override the thermostat there, and set it to basically never turn ot itself. Even if it does, it will never cause any issues.4. I have several JDY-08 BLE modules and i was able to set pins at GPIO 01 and GPIO 02 to HIGH/LOW via mobile app/python script5. BIG PROBLEM IS that by default the wiring at the thermostat controls the relay by setting the certain "side" to LOW and by default both GPIO's that i'm using are set to LOW as the BLE powers up. So the relay starts changing the state very fast.6. For now, i overcome the issue by turning the BLE module on first, setting the GPIOs to HIGH and than putting the batteries for thermostat separately. But i'm worried that the BLE will restart at some point and than i'll have a problem.7. By looking at this, what would you do in my situation? Is there any other way to change the circuit and control the relay but not damaging the thermostat. I really want to keep it capable of working without BLE module too.Here is also the docs that i have for the module:https://amperkot.ru/static/3236/uploads/datasheets/JDY-08.pdfhttps://github.com/kichMan/JDY-08p.s. Since it would probably not be able to do much about the BLE module, should i try some "signal inverting" with a transistors? Is that my only option?

author: Genx10
author_rank: Newbie
timestamp: June 16, 2022, 06:01:45 pm
content: You may take a look at SimpleBLE module because it is simple to use and easy to configure it for your project. It doesn't have a platform specific code.

author: eti
author_rank: Super Contributor
timestamp: June 17, 2022, 12:29:13 am
content: Stick to the old one, it will be around when all this "smart" junk is a long-buried memory.