Author Topic: Analog thermostat to BLE one? Where to start?  (Read 1273 times)

0 Members and 1 Guest are viewing this topic.

Offline nardevTopic starter

  • Supporter
  • ****
  • Posts: 411
  • Country: ba
Analog thermostat to BLE one? Where to start?
« on: September 24, 2020, 02:53:55 pm »
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  is :D I 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.pdf

So, here is how it looks inside:

« Last Edit: September 24, 2020, 02:59:32 pm by nardev »
 

Offline nardevTopic starter

  • Supporter
  • ****
  • Posts: 411
  • Country: ba
Re: Analog thermostat to BLE one? Where to start?
« Reply #1 on: September 27, 2020, 11:15:56 am »
 :'( nobody nothing :(
 

Offline JoeyG

  • Regular Contributor
  • *
  • Posts: 137
  • Country: au
Re: Analog thermostat to BLE one? Where to start?
« Reply #2 on: September 27, 2020, 11:46:47 am »
BLE connections are typically  a [central]  and [peripheral]   ,  hence you need to be sure that the BLE modules so either end.

Typically a smartphone is the central.
https://embedded.fm/blog/ble-roles

Bluetooth 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 [central] and [peripheral]
Like this one https://www.microchip.com/wwwproducts/en/RN4870

http://ww1.microchip.com/downloads/en/DeviceDoc/RN4870-71-Bluetooth-Low-Energy-Module-User-Guide-DS50002466C.pdf

extract
"Interactive ASCII commands enable the RN4870/71 to be configured without complex
configuration tools. The RN4870/71 supports both peripheral and central Generic
Access Profile (GAP) roles, actively scanning for other connectable devices instead of
waiting for incoming connection requests."


Transparent UART
The 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 a
Bluetooth Low Energy connection, providing an end-to-end data pipe to another Bluetooth device such as RN4870/71 module or Smartphone.



« Last Edit: September 27, 2020, 11:48:54 am by JoeyG »
 
The following users thanked this post: nardev

Offline nardevTopic starter

  • Supporter
  • ****
  • Posts: 411
  • Country: ba
Re: Analog thermostat to BLE one? Where to start?
« Reply #3 on: October 23, 2020, 06:42:51 am »
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 script

5. 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.pdf
https://github.com/kichMan/JDY-08

p.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?
« Last Edit: October 23, 2020, 06:58:01 am by nardev »
 

Offline Genx10

  • Newbie
  • Posts: 5
  • Country: hr
Re: Analog thermostat to BLE one? Where to start?
« Reply #4 on: June 16, 2022, 06:01:45 pm »
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.
 

Offline eti

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
Re: Analog thermostat to BLE one? Where to start?
« Reply #5 on: June 17, 2022, 12:29:13 am »
Stick to the old one, it will be around when all this "smart" junk is a long-buried memory.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf