-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Least Home assistant doesn't like MQTT format #205
Comments
I've got round this by flashing with esphome |
Any chance you could share a configuration for this? |
esphome: Make sure logging is not using the serial portlogger: Enable Home Assistant APIapi: ota: wifi: Enable fallback hotspot (captive portal) in case wifi connection failsap: captive_portal: uart: Getting time from HAtime:
Register the Tuya MCU connectiontuya: climate:
Create a sensorsensor:
switch:
|
this should be enough to get you started |
Wow, interesting... i found this topic because i got the same message in Home Assistant now after updating to 2023.8. I'm not pretty sure if i understand right what you described here, ardenking. I'm also using ESPhome addon in Home Assistant, but with other devices not with my thermostat (BHT-002 with WThermostat 1.18-fas at the moment). In the past i didn't ever thought about the possibility with ESPhome - i just flashed the described file and configured the thermostat via webinterface... But this could be a possible solution, if 2024.2 will come bevor an fix of the described error is available. |
Yep I put the yaml in esphome addon downloaded the bin file and updated via the web interface on this firmware |
Thanks, that's really good to know. After that, the device should be able to get updates via ESPhome OTA? Maybe I will test this, just for fun. In comparison to the actual used software i just would miss the possibility of the time schedule: Changing the integrated schedule via webinterface is very comfortable. If using your yaml via ESPhome i need to change the time schedule directly at every device or let HA doing all the changes, right? |
Im using the scheduler from HACs to set timers directly in Lovelace Its made things better because its all in one place |
Hope I am not hijacking the thread here but thought I would pop in my 2cents worth Been using ESPHome on mine from day 1 and use a scheduler to run them. I have 3 for separate underfloor heating and since its ESPHome it uses the esphome integration and not mqtt As I get the floor temp into home assistant it manages them based on time of day, year, who's home etc etc along with all my other heating as I use schedy via Appdaemon to control all my heating All you should need to change in my code for these devices to appear in home assistant is install the ESPHome addon and then change the "substitutions" with your device name, set up the sections in your esphome secrets file for wifi, ha API key etc, and generate the .bin and upload to your thermostat There are many other little tweaks you can add like turning off the relay/switch when power is restored etc comes on etc One thing I like is the restart if API connection is lost which if your HA goes down, it will reboot and automatically "power off" so no need to worry if Here is my ESPHome code: `substitutions: esphome: logger: wifi: captive_portal: api: ota: uart: web_server: time:
text_sensor:
binary_sensor:
tuya: climate:
sensor:
switch:
Sorry, code does not format correctly on here too well |
Thanks for the input hopefully between my yaml and yours should be enough for others to roll their own for their environment |
Thank you both, that's really awesome... I have one test device to play around, maybe i will test this. "schedy via Appdaemon" was also new for me. That sounds great if HA should control the schedule. But for me, in case of an error in my home automation, the self-sufficent function including schedule of my thermostat is the preferred way. According your code, MJP-76, i have a few questions:
Your yaml-code would be better formatted if you use the "code" button above this textfield! Example:
Thank you! |
Used the code button plenty of times, not sure why it just keeps formatting as it does Esphome has a nice add-on that creates a dashboard where you can edit and update you config / firmware easily without leaving home assistant Red devices are offline, grey are up to date and then a blue update if there is a new firmware ready to go and a nice button that says "Update All" which i nice when you have lots of esphome devices as it will build and update for you one at a time I think esphome you can set home assistant to do a ping of the devices but cant remember, this will shows the online/offline state For each device, you can manually update, check logs etc or click the visit button which takes you to the web interface of the device where you can control it, see logs and run updates etc as below I found that if you have an "internal" domain name on your router setup then its easier to get to the devices if HA is down by just typing the device name.domain.name etc but if not, just the device name should service on a normal ISP router I would highly recommend the settings I have for wifi, api, captive_portal and web_server as a bare minimum That way if you ever lose connectivity to HA or even the wifi SSID they are configured for, they restart with their own AP Hope that answers your questions And just a bit on my heating: My heating is 373 lines of code, it controls 13 radiators, 5 ceiling fans, 2 air cons and monitors about 14 room temperatures and 1 external temperature. It switches to different schedules based on the external temp i.e Summer/winter If I am away the wife generally migrates to the bedroom when I am, so why heat the house or if we are both away it effectively shuts it down so it only protects against condensation etc (In the UK) My son works shifts so why heat his room when not there All done with Home Assistant, a few sonoff TH16 on my heaters, and some aqua sensors :) |
Oh, One thing I forget, Sometimes when you have "other" firmware like tasmota on the devices, there is not enough memory to load the esphome I have even had it with an old device with a much older esphome on it that you need to load the sonoff_mini firmware I think it is or as you can see, i have a very, very basic esphome config that fits and once its running you can upload the new config So, best go with a minimal firmware, the put your full one on it if you are changing over |
Thanks for your very detailed report. I am also using the ESPhome addon in HA, but just played around a bit... I build an own counter on my gas meter with this, very simple! But didn't ever thought about the possibility of changing my thermostat to ESPhome platform. In my home, i'm having 8 thermostate running underfloor heatings (water, not electric). Because of that, heating is very slow... Heating must start for example 2 hours before somebody comes home and can stop 2h before the last one leaves. Because of that, i'm having an minimum time schedule directly in every thermostat. In additional to that, HA controls all the exceptions: School holidays, holidays of me or my wife, ... Presence would be detected also, but not to start the heating. It's just for the decision to stop heating or not! Because of that, for me it's usefull to use an time schedule instead of a presence detection. And if my raspberry (running HA) will stop working (and i'm maybe not at home and my wife don't like to freeze) it's better to put this "minimal time schedule" directly in the thermostat. So, in the worst case, heating is independent from HA. I saw that with the firmware from klaus ahrenberg it should be possible to change the integrated schedule via MQTT-command ( https://github.com/klausahrenberg/WThermostatBeca ). Do you know about the possibility? That should be also possible to integrate in ESPhome, if you have the knowledge... |
i made some changes to naming of the Climate Entity in the code. HA does not show this error message anymore. |
Thank you! The binary in you repo is the final version? Can I upload and update from the web in 1.22? |
it is based on latest FAS version. |
for my thermostat it worked, when i was flashing over FAS 1.22. Can you descride your configuration? |
@MJP-76 Thanks a lot for your ESPHome example - I am trying to use it with a "Moes WHT-NV-GB-WH-M" thermostat and at first I thought it is all working fine. What's strange, however, is that activating the heading mode does not work reliably. Is it possible that the thermostat only heats the floor if the target temperature is above the room temperature? I essentially can switch on the thermostat (power switch) but it doesn't start heating - although HA shows it to be in heating mode. I saw it once in "idle" mode but no idea how/why that was. I can't reproduce it so far. That's what the Tuya component outputs:
(103 is the unit of temperature) |
@ardenking I have also tried your code (which is similar to the one from @MJP-76 but I thought I'd give it a try anyway. The thermostat is working in principle. What's strange though is that when the target temperature is 20 degrees (the eco temp in my case) and the floor has a temperature of, say, 16 degrees, then the thermostat will only switch the relay once I set the target to 24 degrees - below it'd wouldn't start heating. Is that also true for you/do you observe the same behaviour? Or do you have any idea why that is? |
I think I found a solution. It seems the thermostat heats with respect to the room temperature (why? no idea - doesn't make sense in my opinion). But the thermostat luckily offers a "system function" menu through which internal settings can be accessed. One setting is about the internal and external temperature sensor. I've set that to "external only" and this seems to do the trick. |
Message to comment on stale issues. If none provided, will not mark issues stale |
Hello, maybe you have answer for question above? Device BH-002, default value is ON after reboot. Ed |
Message to comment on stale issues. If none provided, will not mark issues stale |
After updating to latest HA get this following warning about the MQTT formatting
any advice on resolving
The text was updated successfully, but these errors were encountered: