custom-components / climate.programmable_thermostat

Programmable thermostat that let you have a smart thermostat on budget.
The Unlicense
113 stars 35 forks source link

Add a way to write to a TuyaMCU dp to control a wood stove with your AWESOME Thermostat #59

Closed jazzmonger closed 8 months ago

jazzmonger commented 1 year ago

Im out of options right now. my Tuya based wood stove has so many bugs in it I flashed ESPHome to the TYWE1S esp8266 that reads and writes to the stove's MCU.

The stove turns off all the time by itself, throws constant errors, and worst of all, all temperature data points spit out temp values in degrees F, not C so all my attempts at using other climate entities fail bc my HOME ASSISTANT is using imperial units.

59F submitted as 59C converts to 138F.

image

ONLY your thermostat lets me use template sensors, convert the incorrect values and it display correctly.

image

MY PROBLEM: Setting your target temp doesn't work bc it fights with my stove's internal "set temp" that is set thru the front panel. when the room temp sensor reaches the user set value it shuts off to stove - a self contained system. there is no manual way to get around it and convert it to a manual operation. too many sensors, blowers, igniters, relays and safety issues to etc to deal with.

MY ASK:

allow me to use and write to a TuyaMCU data point to write to the set temp value in the MCU.

I've opened both a PR and Feature request on ESPHOME. But, the devs discount my requests bc I have a defective stove. Asking the Vendor to fix their code when it works fine with their Tuya-base APP is a giant black hole.

C to F conversion PR: https://github.com/esphome/issues/issues/3784

Read and Write to Tuya MCU data points like Tasmota and Tuya iOT servers can https://github.com/esphome/feature-requests/issues/1956

image
ssieb commented 1 year ago

No one "discounted" your requests. @jesserockz made a fix to handle the F values and I explained multiple times how you can access the datapoints. You definitely can't access them directly from HA or this component.

jazzmonger commented 1 year ago

And his fix works. Perfectly. Pls close this request. And thanks guys. It was driving me nuts that I couldnt find a way around the problem.

And just for the record or anyone else searching this problem, here is the way you get info from data points. Thanks to jesserockz for finally pointing me to this resource. I don't know why it never came up in my hundreds of searches on this topic... probably because I always included TuyMCU in all my queries. This is just part of the standard Tuya stuff.

https://esphome.io/components/sensor/tuya.html

My final config file for the other guys out there looking for this info

...
external_components:
  - source: github://pr#4032
    components: tuya
    refresh: 0s
uart:
  rx_pin: GPIO13
  tx_pin: GPIO15
  baud_rate: 9600

# Register the Tuya MCU connection
tuya:
# 1 - Power on (Heat)
#4 - Mode P1/P2/P3P4
#101 - ECO1/ECO2
#104 - Error Code
#106 Set Temp
#107 - Current Temp
#108 - Pipe Temp
#109 - Protect Temp

sensor:
  - platform: "tuya"
    name: "House Wood Stove Error Code"
    sensor_datapoint: 4

climate:
  - platform: tuya
    reports_fahrenheit: true
    name: " Shop Test Stove ESPHome"
    switch_datapoint: 1
    target_temperature_datapoint: 106
    current_temperature_datapoint: 107
    eco_datapoint: 101
    eco_temperature: 62 °F