Moes BHT-002 Thermostat local control (Tuya based)

Hello to all.

I ended up adding the Moes BHT-002 thermostat to Home Assistant with local control.
The instruction is available at: https://blog.iothouse.online/2019/12/tuya-based-thermostat-home-assistant.html
At the moment, only in Russian, please use the translator in the browser.

6 Likes

you are great!
it works perfectly
thanks

1 Like

this looks great, ive been tempted to buy one of these myself.
thanks for sharing your work!

1 Like

Hi, any idea if the tuya local integration will work with this version of Moeā€™s thermostat? (Good old Moe!)

https://m.aliexpress.com/item/4000419115420.html?pid=808_0000_0101&spm=a2g0n.search-amp.list.4000419115420&aff_trace_key=&aff_platform=msite&m_page_id=6875amp-7s-MN7t1DnlrzJPR_tq4Bg1580584011382&browser_id=169e9a25f6034dc28cdaaa2291a892bb&is_c=Y

I donā€™t know. But you can try.

Hi, in your blog you show a photo of the stat you have. Can you explain the function of the wire and the probe please?

Thanks

Hi. Its external temp sensor. Thermostat can work with internal integrated temp sensor, with external temp sensor, or both.

I have ordered this:

https://m.aliexpress.com/item/4000419115420.html

I will report my success or not!

Iā€™m still waiting for this to arrive. I think issue in China is slowing down ali-express.

Hi. Ooo now its problem. My parcel with ā€œgoogle coral tpuā€ also wait to be send.
And i think your ordered thermostat will work with placed me component.

@mariogor You say it works perfectly so could you brief me on what information you can get and can set.
I have one using the main tuya code in cloud mode which wonā€™t let me see the floor temp, just the room temp. This does the job for me for now.

I want to install another where I need to read the floor sensor temp cos the BHT-002 is going to be outside the room. Then I need to be able to set the target temp to achieve my desired floor temp regardless of what the room temp says.

Will the current local version code let me do this?

  1. Have you tried in the current switch in the tuya application the sensor by which it works?
  2. Yes BHT-002 work with two sensors: external and internal. And after correct setup fine show and work with ha.

well renat, I donā€™t know I have not an external sensor. I had thought of trying to put a Xiaomi Mi Temperature on the floor and with an automation control the boiler with the renat lucaltuya saying that if the sensor temperature is low it raises the thermostat temperature and when you get to the targhet temperature it lowers the thermostat temperature but if it can be done with BHT-002 it is better

Well, my device has finally arrived, but I am having issues at this point:

tuya-cli link --api-key xxxxxxxxxxxxxxxxx --api-secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxx --schema johnrad --ssid xxxxxxxxxxx --password xxxxxxxxxxxxx --region eu
āœ– Device(s) failed to be registered!
Error: Timed out waiting for devices to connect.
    at TuyaLinkWizard.linkDevice (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/link/index.js:117:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async link (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/lib/link.js:47:19)

I am running from my ubuntu laptop, on the same network as the therm is connected. It has 2.4 and 5 accessā€¦

I think my tuya account is successfully registered as per this:

This is the device I am trying to use:
https://m.aliexpress.com/item/4000419115420.html

Many thanks

John

Iā€™ve now got a new error

tuya-cli link --api-key xxxd --api-secret 8xxxxe --schema johnrad --ssid It xxx IP --password xxxxxx --region us
ā ¹ Registering devices(s)...events.js:292
      throw er; // Unhandled 'error' event
      ^

Error [ERR_SOCKET_CANNOT_SEND]: Unable to send data
    at Socket.onListenError (dgram.js:511:22)
    at Object.onceWrapper (events.js:422:26)
    at Socket.emit (events.js:315:20)
    at dgram.js:340:14
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
Emitted 'error' event on Socket instance at:
    at Socket.onListenError (dgram.js:511:8)
    at Object.onceWrapper (events.js:422:26)
    [... lines matching original stack trace ...]
    at processTicksAndRejections (internal/process/task_queues.js:85:21) {
  code: 'ERR_SOCKET_CANNOT_SEND'
}

And if I set the location to China, a different error again:

āœ– Device(s) failed to be registered!
Error: country code not support this area
    at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:68:31)
    at EventEmitter.<anonymous> (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Iā€™m stuckā€¦

John

if you want to use the Tuya app you must first connect the thermostat to the tuya app on your smartphone and then in the configuration.yaml enter this:
tuya:
username: ā€˜your account tuyaā€™
password: ā€˜password account tuyaā€™
country_code: ā€˜see https://www.countrycode.orgā€™
if you want better local control you have to follow renatā€™s instructions

Hi,
Iā€™m getting error saying "Platform error climate.localtuya - Integration 'localtuya' not found." (Rpi3)

Path to the folder is

/config/custom_components/localtuya

This is in my configuration.yaml

climate moes:
  platform: localtuya
  host: 192.168.1.124
  local_key: 'xxx'
  device_id: 'xxx'
  name: 'moes'
  scan_interval: 5
  min_temp: 15
  max_temp: 25
  target_temp: 22
  protocol_version: 3.3

Iā€™ve already tried rebooting the device a few times, still the same error.
Thanks for your help.

Delete moes in climate
Your config climate moes: change to climate:

Didnā€™t help, still the same error

Platform error climate.localtuya - Integration 'localtuya' not found.

Helloā€¦ Nice Project. I ahave a question: I have Xiaomi IR blaster to send commands to my AC via IR. Therefore I use a custom component. I saw Thereā€™s something like a bridge look here:

I now wanna somehow sync the thermostat with my actual climate component. any idea how I could ā€œbridgeā€ this? Your component has no mqtt afaik.

Thanks in advance .) Nice project anyway!