fashberg / WThermostatBeca

Open Source firmware replacement for Tuya Wifi Thermostate from Beca and Moes with Home Assistant Autodiscovery
344 stars 71 forks source link

Unable to compile code #150

Closed titiviking closed 2 years ago

titiviking commented 2 years ago

Attempting to compile the code myself, the WAdapter renders errors:

Compiling .pioenvs\wthermostat\libfc6\ESPAsyncTCP-esphome\ESPAsyncTCPbuffer.cpp.o
Compiling .pioenvs\wthermostat\libfc6\ESPAsyncTCP-esphome\SyncClient.cpp.o
In file included from WThermostat\../lib/WAdapter/WAdapter/WNetwork.h:27,
                 from WThermostat\WThermostat.cpp:3:
WThermostat\../lib/WAdapter/WAdapter/WJsonParser.h: In member function 'WProperty* WJsonParser::endTrue()':
WThermostat\../lib/WAdapter/WAdapter/WJsonParser.h:500:23: error: cannot convert 'bool' to 'WProperty*' in initialization
  500 |   WProperty* result = false;
      |                       ^~~~~
WThermostat\../lib/WAdapter/WAdapter/WJsonParser.h: In member function 'WProperty* WJsonParser::endFalse()':
WThermostat\../lib/WAdapter/WAdapter/WJsonParser.h:514:23: error: cannot convert 'bool' to 'WProperty*' in initialization
  514 |   WProperty* result = false;
      |                       ^~~~~
Compiling .pioenvs\wthermostat\libfc6\ESPAsyncTCP-esphome\tcp_axtls.c.o
Compiling .pioenvs\wthermostat\lib83f\Hash\Hash.cpp.o
*** [.pioenvs\wthermostat\src\WThermostat.cpp.o] Error 1
=========================================================== [FAILED] Took 8.40 seconds ===========================================================
JuniorLogol commented 2 years ago

Same problem. Can anyone help? Thanks

jressel01 commented 2 years ago

i clone the repository and change the code on both positions.

WProperty* result = int(0);

in the moment i dont know if i do more. but you can test my clone

also i change some lines that it work with home assistant without errormassages and change the WLAN key from 32 to 64

titiviking commented 2 years ago

I have forked your repo do be able to perform some changes if necessary. Code compiles, but the Auto-Discovery does not seem to work... the MQTT message does not seem to be send out as I still see an older version of that auto-discovery message in my MQTT...

I do see the updates from the thermostat in the correct topics, but sending commands still seems to fail. Any idea why the auto-discovery is not being sent ?

UPDATE: For some strange reason, when disabling the setting to send separate MQTT messages for the properties, then it seems to work. No idea why that setting has an impact on the auto-discovery... or perhaps some issue with the in memory-settings from previous firmware... I'm clueless

jressel01 commented 2 years ago

Home assistant auto discovery works. I have 10 climate and all work fine I mod all bht002 with hardware mod

paulius2k commented 2 years ago

@jressel01 - is there a compiled fw file I could download and install? thanks.

jressel01 commented 2 years ago

@paulius2k My Firmware

paulius2k commented 2 years ago

@jressel01 thank you.