Closed RomeHein closed 1 year ago
I just went through this with an ESP32 (specifically an adafruit Huzzah32) and found quite a few patches were necessary which I did locally.
Serial1
to the heatpump initialization code (since the default goes to USB on my board)WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
My local hacks now work, but I think a significant code refactoring is needed in order to cleanly support multiple boards (assuming each has its own quirks).
@sir-buckyball can you upload your file so I can see it all? I have a spare esp32 whilst waiting for more D1 minis, I ran into similar problems last night and wouldnt mind getting it going
@sir-buckyball could you make a PR to this repo so that we can see your changes? Also, can you explain the first and last bullet point modifications?
needed to pass
Serial1
to the heatpump initialization code (since the default goes to USB on my board)
This was specifically changing hp.connect(&Serial);
to hp.connect(&Serial1);
.
I'll admit I'm not 100% positive this was needed, because I made a hardware change as well (I had been using a logic-level shifting circuit with no luck, and switched to using pullup resistors [despite documentation warnings that the board was not 5v tolerant]). https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/pinouts#logic-pins-2816347-7
needed to comment out
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
With this line in the code, I found that my board connected to my wifi network, but reported an ip address of 255.255.255.255 (clearly wrong). When I removed the line, the board started connecting to wifi as expected.
re: my source, I can do that, but not right now; later today.
Nice, thanks for the precision. I've tried Serial1 and even Serial2 but wasn't able to get a connection with my units (they are MSZ-AP15). Do you have an idea how I could debug that?
I've uploaded code that compiles for the adafruit esp32 feather (huzzah32) to https://github.com/sir-buckyball/mitsubishi2MQTT/tree/huzzah32/src/mitsubishi2mqtt. The code is not something I consider clean enough for a pull request.
@RomeHein re:Serial1 vs. Serial2, my understanding is that the esp32 is pretty flexible in its hardware serial support. Ultimately you just need to pass a reference to a HardwareSerial object which has been initialized to pins that match your board. Typically, Serial1, Serial2, ... are defined with the board definitions and map to the various pins that have been labeled for serial communication. I recommend you read the datasheet for the board you are using to ensure the mapping is right. If you have a second board or a protocol analyzer, you could try to confirm that the board is outputting data.
no worries, thanks for the precisions. I've tried both Serial1 and 2 (and of course changed the pin connection accordingly) but can't get any packets from the unit. I've read somewhere that some people had success by using a different baudrate (2000 to be precise). Anyway thanks again, I'll post an update here if I found something relevant to this issue that could make the esp32 work.
Anyone know if there is a fork with a more active owner? This seems to be where all the activity is happening but the repo owner seems absent.
yeah, i would like to know if there is a fork of this elsewhere?
i am having issues getting it to compile to my WemosD1, but fixing the issues is WELL outside the scope of my knowledge. I have opened a github issue on it back on Dec 29 2020. Github issue #123 but it has had no responses as of yet.
Jason
Old issue. Try new version and open a new one if the issue is still there.
I have this issue when compiling the project for a d1 mini esp32:
I would have wrote a pull request to address this by adding this line:
in the config.h file but as I'm not able to make this project work properly with an esp32 i'm not sure this would actually work. I've also noticed this line:
which is not being called anywhere in the code and seems to replace the
unit_conf
variable. Any idea on what's happening here?Edit: Ok after checking closed issues, apparently this fix is just not merged yet. Which mean this project never worked for esp32 boards. Did someone tested a heat pump with an ESP32? After applying the fix described, everything works properly, I'm just not able to get a connection between the unit and the esp32:
status disconnected
. needs further investigations (might come from poor soldering)