rjdekker / MHI2MQTT

Arduino-based WiFi/MQTT controller for wireless operation of a Mitsubishi Heavy Industries air conditioner through its serial CNS port
MIT License
134 stars 27 forks source link

MQTT not responding #7

Open marcosacchetti opened 5 years ago

marcosacchetti commented 5 years ago

When I subscribe to debug channel the ESP send me, I suppose, the help message, but I don't receive anything on all status channels and when I send something to set values nothing happens. Even the service channel seems dead. I've tried with different brokers but nothing. Any idea?

marcosacchetti commented 5 years ago

I solved.

gamblor999 commented 5 years ago

how did you solve I have the same thing?

Stephan296 commented 5 years ago

I have the same problem....

marcosacchetti commented 5 years ago

I’ve tried different brokers and now it works. I'm using this one: https://www.beebotte.com/

Stephan296 commented 5 years ago

Thx @marcosacchetti . How did you set it up?

Stephan296 commented 5 years ago

@marcosacchetti Do you know this error when compiling MHI-SPI2ESP:

`C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino: In function 'void SPI_sync()':

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:152:49: warning: invalid conversion from 'volatile void' to 'void' [-fpermissive]

memcpy(&tx_SPIframe[9], &frameVariant[0][0], 9); //Copy (part of) the next frame to the current frame for sending on the upcoming bitfield 18 clock cycle

                                             ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

             from C:\Users\steph\AppData\Local\Temp\arduino_build_956662\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note: initializing argument 1 of 'void memcpy(void, const void*, size_t)'

extern void memcpy(void , const void *, size_t);

          ^

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino: In function 'void loop()':

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:275:67: warning: invalid conversion from 'volatile void' to 'const void' [-fpermissive]

                   memcpy(&toESP.currentMHI, &rx_SPIframe[3], 7);                                               //Copy bitfields 4-10 from the most recent MHI SPI frame to new array for sending to ESP

                                                               ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

             from C:\Users\steph\AppData\Local\Temp\arduino_build_956662\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note: initializing argument 2 of 'void memcpy(void, const void*, size_t)'

extern void memcpy(void , const void *, size_t);

          ^

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:308:62: warning: invalid conversion from 'volatile void' to 'const void' [-fpermissive]

               memcpy(&rx_bitfield4_10, &rx_SPIframe[3], 7);                                                    //Get bitfields 4-10 from the last MHI SPI frame to use for the upcoming tx_SPIframe update

                                                          ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

             from C:\Users\steph\AppData\Local\Temp\arduino_build_956662\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note: initializing argument 2 of 'void memcpy(void, const void*, size_t)'

extern void memcpy(void , const void *, size_t);

          ^

C:\Users\steph\Downloads\rjdekker-MHI2MQTT-v1.0.0-14-ge737f6e\rjdekker-MHI2MQTT-e737f6e\src\MHI-SPI2ESP\MHI-SPI2ESP.ino:330:73: warning: invalid conversion from 'volatile void' to 'void' [-fpermissive]

           memcpy(&tx_SPIframe[9], &frameVariant[variantnumber][0], 9);                                         //Copy (part of) the next frame to the current frame for sending on the upcoming bitfield 18 clock cycle

                                                                     ^

In file included from C:\Users\steph\Downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\arduino\avr\cores\arduino/Arduino.h:25:0,

             from C:\Users\steph\AppData\Local\Temp\arduino_build_956662\sketch\MHI-SPI2ESP.ino.cpp:1:

c:\users\steph\downloads\arduino-1.8.7-windows\arduino-1.8.7\hardware\tools\avr\avr\include\string.h:191:14: note: initializing argument 1 of 'void memcpy(void, const void*, size_t)'

extern void memcpy(void , const void *, size_t);`

marcosacchetti commented 5 years ago

my configuration: char mqtt_server[25] = "mqtt.beebotte.com"; char mqtt_port[9] = "1883"; char mqtt_user[40] = "[YOUR_BEEBOTTE_SECRET_KEY]"; char mqtt_pass[20] = ""; char wifiTimeout[3] = "5"; //Timeout in minutes (max. 99) before WiFi configuration portal is turned off and the ESP tries to connect again to the previously configured AP (if any) char Room[20] = "Roomname"; char Thing[20] = "Aircon"; char Setpoint[60] = "Setpoint"; char statusSetpoint[60] = "statusSetpoint"; char State[60] = "State"; char statusState[60] = "statusState"; char statusRoomtemp[60] = "statusRoomtemp"; char Vanes[60] = "Vanes"; char statusVanes[60] = "statusVanes"; char Fanspeed[60] = "Fanspeed"; char statusFanspeed[60] = "statusFanspeed"; char debug[60] = "debug"; //Send only char service[60] = "service";

marcosacchetti commented 5 years ago

I've never found that error compiling... I'm sorry, I can't help you.

Stephan296 commented 5 years ago

I looks like there something wrong with the script. Also with beebotte i don't get any updates.... it looks like that the spi doesn't work right.

marcosacchetti commented 5 years ago

But I remember that I had a problem with the last version of ArduinoJson library and I needed to do download an old one.

Stephan296 commented 5 years ago

I know that problem, i have used a 5.1 version, can try to download another older one...

marcosacchetti commented 5 years ago

sometimes it disconnects from the broker but I have a bad connection to the internet, so in my case, the cause could be this

marcosacchetti commented 5 years ago

I'm trying to do the same with an esp32 without Arduino; if I will succeed, I will let you know.

Stephan296 commented 5 years ago

that would be perfect!!

Stephan296 commented 5 years ago

@marcosacchetti could you only compile the file for me please? To see where the problem is....