lumapu / ahoy

Various tools, examples, and documentation for communicating with Hoymiles microinverters
https://ahoydtu.de
Other
948 stars 222 forks source link

[Bug]MQTT not working, interruptpin "false" and no connection to HM-800 #1476

Closed americanium closed 6 months ago

americanium commented 6 months ago

Platform

ESP8266

Assembly

the DTU was already assembled

nRF24L01+ Module

No response

Antenna

circuit board

Power Stabilization

nothing

Connection picture

Version

0.7.36 and 0.8.83

Github Hash

Whats that?

Build & Flash Method

AhoyDTU Webinstaller

Setup

Darkmode selected Fixed IP Adress: 192.168.1.8 Subnetmask: 255.255.255.0 SSID and Password entered.

Inverter serial added and Max Module Power 500 both + Modulname added

MQTT server information added.

All settings were automatically applied from the working Firmwareversion 0.5.66 before! (Unfortunately I can't find the old firmware to flash it back)

Debug Serial Log output

13:02:18 I: (#0) resetPayload
13:02:18 I: (#0) enqueCommand: 0x01
13:02:18 I: (#0) enqueCommand: 0x0b
13:02:18 I: (#0) prepareDevInformCmd 0x01
13:02:18 I: TX 27B Ch40 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b8 4a 00 00 00 00 00 00 00 00 dd a8 d7 
13:02:48 I: (#0) resetPayload
13:02:48 I: (#0) prepareDevInformCmd 0x0b
13:02:48 I: TX 27B Ch61 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 b8 68 00 00 00 00 00 00 00 00 76 22 de 
13:03:18 I: (#0) resetPayload
13:03:18 I: (#0) enqueCommand: 0x01
13:03:18 I: (#0) enqueCommand: 0x0b
13:03:18 I: (#0) prepareDevInformCmd 0x01
13:03:18 I: TX 27B Ch75 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b8 86 00 00 00 00 00 00 00 00 d8 ad 1b 
13:03:48 I: (#0) resetPayload
13:03:48 I: (#0) prepareDevInformCmd 0x0b
13:03:48 I: TX 27B Ch3 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 b8 a4 00 00 00 00 00 00 00 00 73 27 12 
13:04:18 I: (#0) resetPayload
13:04:18 I: (#0) enqueCommand: 0x01
13:04:18 I: (#0) enqueCommand: 0x0b
13:04:18 I: (#0) prepareDevInformCmd 0x01
13:04:18 I: TX 27B Ch23 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b8 c2 00 00 00 00 00 00 00 00 db ae 5f 
13:04:48 I: (#0) resetPayload
13:04:48 I: (#0) prepareDevInformCmd 0x0b
13:04:48 I: TX 27B Ch40 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 b8 e0 00 00 00 00 00 00 00 00 70 24 56 
13:05:18 I: (#0) resetPayload
13:05:18 I: (#0) enqueCommand: 0x01
13:05:18 I: (#0) enqueCommand: 0x0b
13:05:18 I: (#0) prepareDevInformCmd 0x01
13:05:18 I: TX 27B Ch61 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b8 fe 00 00 00 00 00 00 00 00 da af 63 
13:05:48 I: (#0) resetPayload
13:05:48 I: (#0) prepareDevInformCmd 0x0b
13:05:48 I: TX 27B Ch75 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 b9 1c 00 00 00 00 00 00 00 00 b1 24 6a 
13:06:18 I: (#0) resetPayload
13:06:18 I: (#0) enqueCommand: 0x01
13:06:18 I: (#0) enqueCommand: 0x0b
13:06:18 I: (#0) prepareDevInformCmd 0x01
13:06:18 I: TX 27B Ch3 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b9 3a 00 00 00 00 00 00 00 00 da 9c 95 
13:06:48 I: (#0) resetPayload
13:06:48 I: (#0) prepareDevInformCmd 0x0b
13:06:48 I: TX 27B Ch23 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 b9 58 00 00 00 00 00 00 00 00 b2 27 2e 
13:07:18 I: (#0) resetPayload
13:07:18 I: (#0) enqueCommand: 0x01
13:07:18 I: (#0) enqueCommand: 0x0b
13:07:18 I: (#0) prepareDevInformCmd 0x01
13:07:18 I: TX 27B Ch40 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b9 76 00 00 00 00 00 00 00 00 19 f8 7e 
13:07:48 I: (#0) resetPayload
13:07:48 I: (#0) prepareDevInformCmd 0x0b
13:07:48 I: TX 27B Ch61 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 b9 94 00 00 00 00 00 00 00 00 b7 22 e2 
13:08:18 I: (#0) resetPayload
13:08:18 I: (#0) enqueCommand: 0x01
13:08:18 I: (#0) enqueCommand: 0x0b
13:08:18 I: (#0) prepareDevInformCmd 0x01
13:08:18 I: TX 27B Ch75 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b9 b2 00 00 00 00 00 00 00 00 dc 9a 1d 
13:08:48 I: (#0) resetPayload
13:08:48 I: (#0) prepareDevInformCmd 0x0b
13:08:48 I: TX 27B Ch3 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 b9 d0 00 00 00 00 00 00 00 00 b4 21 a6 
13:09:18 I: (#0) resetPayload
13:09:18 I: (#0) enqueCommand: 0x01
13:09:18 I: (#0) enqueCommand: 0x0b
13:09:18 I: (#0) prepareDevInformCmd 0x01
13:09:18 I: TX 27B Ch23 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 b9 ee 00 00 00 00 00 00 00 00 df 33 eb 
13:09:48 I: (#0) resetPayload
13:09:48 I: (#0) prepareDevInformCmd 0x0b
13:09:48 I: TX 27B Ch40 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 ba 0c 00 00 00 00 00 00 00 00 7e 19 8b 
13:10:18 I: (#0) resetPayload
13:10:18 I: (#0) enqueCommand: 0x01
13:10:18 I: (#0) enqueCommand: 0x0b
13:10:18 I: (#0) prepareDevInformCmd 0x01
13:10:18 I: TX 27B Ch61 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 ba 2a 00 00 00 00 00 00 00 00 15 a1 74 
13:10:48 I: (#0) resetPayload
13:10:48 I: (#0) prepareDevInformCmd 0x0b
13:10:48 I: TX 27B Ch75 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 ba 48 00 00 00 00 00 00 00 00 7d 1a cf 
13:11:18 I: (#0) resetPayload
13:11:18 I: (#0) enqueCommand: 0x01
13:11:18 I: (#0) enqueCommand: 0x0b
13:11:18 I: (#0) prepareDevInformCmd 0x01
13:11:18 I: TX 27B Ch3 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 ba 66 00 00 00 00 00 00 00 00 d6 c5 9f 
13:11:48 I: (#0) resetPayload
13:11:48 I: (#0) prepareDevInformCmd 0x0b
13:11:48 I: TX 27B Ch23 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 ba 84 00 00 00 00 00 00 00 00 78 1f 03 
13:12:18 I: (#0) resetPayload
13:12:18 I: (#0) enqueCommand: 0x01
13:12:18 I: (#0) enqueCommand: 0x0b
13:12:18 I: (#0) prepareDevInformCmd 0x01
13:12:18 I: TX 27B Ch40 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 ba a2 00 00 00 00 00 00 00 00 13 a7 fc 
13:12:48 I: (#0) resetPayload
13:12:48 I: (#0) prepareDevInformCmd 0x0b
13:12:48 I: TX 27B Ch61 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 ba c0 00 00 00 00 00 00 00 00 7b 1c 47 
13:13:18 I: (#0) resetPayload
13:13:18 I: (#0) enqueCommand: 0x01
13:13:18 I: (#0) enqueCommand: 0x0b
13:13:18 I: (#0) prepareDevInformCmd 0x01
13:13:18 I: TX 27B Ch75 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 ba de 00 00 00 00 00 00 00 00 d1 97 72 
13:13:48 I: (#0) resetPayload
13:13:48 I: (#0) prepareDevInformCmd 0x0b
13:13:48 I: TX 27B Ch3 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 ba fc 00 00 00 00 00 00 00 00 7a 1d 7b 
13:14:18 I: (#0) resetPayload
13:14:18 I: (#0) enqueCommand: 0x01
13:14:18 I: (#0) enqueCommand: 0x0b
13:14:18 I: (#0) prepareDevInformCmd 0x01
13:14:18 I: TX 27B Ch23 | 15 80 11 40 17 81 54 27 70 80 01 00 65 e5 bb 1a 00 00 00 00 00 00 00 00 d1 a4 84 
13:14:48 I: (#0) resetPayload
13:14:48 I: (#0) prepareDevInformCmd 0x0b
13:14:48 I: TX 27B Ch40 | 15 80 11 40 17 81 54 27 70 80 0b 00 65 e5 bb 38 00 00 00 00 00 00 00 00 7a 2e 8d 

Error description

1.) First of all I used the 0.5.66 version for about 1 year without any problems, after that time i wanted to get the newest firmware 2.) When installing 0.7.36 MQTT works but connection to inverter fails 3.) When installing 0.8.83 (or one of the developer files) neither MQTT works nor connection to HM-800. Interrupt pin "false". 4.) With 0.5.66 the Send/Receive LED was blinking, now it doesn't blink any more.

americanium commented 6 months ago

Additional information: Webserial Output with 0.8.89:

13:29:42.352 ----- 13:29:42.353 I: com loop duration: 353ms 13:29:42.353 ----- 13:29:57.352 ----- 13:29:57.353 I: com loop duration: 353ms 13:29:57.353 ----- 13:30:12.352 ----- 13:30:12.353 I: com loop duration: 353ms 13:30:12.353 ----- 13:30:27.352 ----- 13:30:27.353 I: com loop duration: 353ms 13:30:27.353 ----- 13:30:42.352 ----- 13:30:42.353 I: com loop duration: 353ms 13:30:42.353 ----- 13:30:57.352 ----- 13:30:57.353 I: com loop duration: 353ms 13:30:57.353 ----- 13:31:12.352 ----- 13:31:12.353 I: com loop duration: 353ms 13:31:12.353 -----

MetaChuh commented 6 months ago

@americanium

please check your nrf24+ pin settings.

as you came from v0.5.66, your nrf24+ module settings for CE and IRQ have to be set to: CE D4 IRQ D3

info about why: since v0.7.36 those pins were swapped within the default settings.

Peertje-62 commented 6 months ago

Hi, if you want to go back 5.66 stil exist to download https://github.com/lumapu/ahoy/releases ahoy

americanium commented 6 months ago

Thank you very much! Connection to HM-800 works now - then the MQTT problem still remains ...

There's no kind of FAQ where this "change" is described for other people who change to the newest firmware ?

Thanks @Peertje-62 : Now the connection works so i would like to stay with the newest firmware as long as I can fix the MQTT issue.

Peertje-62 commented 6 months ago

Yes there is a change log (Rather Big) https://github.com/lumapu/ahoy/blob/development03/src/CHANGES.md release RELEASE 0.5.66 - 2022-12-30

americanium commented 6 months ago

Thanks - I know the changelog but i honestly didn't ready the information of EVERY change since 0.5.66 :-) but it seems that I'm the only one with this issue until now or most other didn't upgrade :D

Peertje-62 commented 6 months ago
Peertje-62 commented 6 months ago

and, I would advise to upgrade your hardware to an ESP 32 runs smoother & better with the current release

MetaChuh commented 6 months ago

@americanium

regarding mqtt: please download and update to the latest developer firmware v0.8.89 for esp8266 from here: ahoy_v0.8.89

the mqtt issues you encounter will most likely dissapear. if not, post all your findings here, before you revert to v0.5.66 with the link given by @Peertje-62

good luck and keep us informed.

americanium commented 6 months ago

So just did the update to 0.8.89 (again, already tried this version) and also deleted all configuration settings to reconfigure it.

When using the newest dev version NRF24L01 = connected Interrupt Pin working = true MqTT connected = false

No more connection to HM-800

CS = D8 CE= D4 IRQ = D3

WebSerial Output: 15:06:28.352 ----- 15:06:28.353 I: com loop duration: 353ms 15:06:28.353 ----- 15:06:43.352 ----- 15:06:43.353 I: com loop duration: 353ms 15:06:43.353 -----

EDIT: MqTT now works after adding DNS1 and DNS2 the same IP as Gateway.... imho that makes no sense ...

But connection to HM-800 still not working with this FW

EDIT2: OK - now all works with experimental FW. Also HM-800 connection but I had to change Radio Power Level to HIGH. That was not necessary with previous versions.

MetaChuh commented 6 months ago

at least you got it half ways working for now ... big step from 0.5.66 to 0.8.83/89 with nothing in between👍

i guess many do not notice all the ammount of major changes in between, as they either update and adapt regularly, or don't update at all.

nice if you could help us out with a how to of all steps necessary to get your specific setup working after the leap update. might help others. please keep us informed.

thx & greetings

americanium commented 6 months ago

Sure.

So due to the "try and error" situation I think the final solutions were: 1.) To get MQTT working: Define a DNS1 and DNS2, but maybe that's depending on your network situation. So I have only a standard 5G router with DHCP - nothing special. 2.) To get connection to Hoymiles working: Set the Radio Power Level to "high". All other settings didn't work. Also swap pinout CE to D4 and IRQ to D3.

You're right, when I did my initial setup of ahoy-dtu 1.5years ago it worked for me, not 100% stable but it was "ok". Now I saw the there are many many updates and new revisions so I wanted to upgrade and also just for interest what's new or for finding new future projects ^^.

Overall - thank you very much - hope others who get into the same situation will have a benefit of this thread :-)

lumapu commented 6 months ago

I really appreciate how fast and good the answers were to resolve this issue / questions. 😊 I'm really happy to have such a good team here.

Yesterday I started creating a documentation, for the beginning in German only: https://ahoydtu.readthedocs.io

cassidea commented 6 months ago

Thanks - I know the changelog but i honestly didn't ready the information of EVERY change since 0.5.66 :-) but it seems that I'm the only one with this issue until now or most other didn't upgrade :D

You are not the only one. I am still on 0.6.9 because I am not able to get newer versions running.

For example I just* learned, that connection to D3 (GPIO0) changes the mode on reset on ESP8266 NodeMCU. In my case this leads to a bootloop. I need to disconnect D3 to be able to configure everything.

*https://github.com/espressif/esptool/issues/719#issuecomment-1032309752

MetaChuh commented 6 months ago

@americanium

if this issue has been solved for you, please close it.

thx and greetings, metachuh

JanesH64 commented 5 months ago

Sure.

So due to the "try and error" situation I think the final solutions were:

**1.) To get MQTT working: Define a DNS1 and DNS2, but maybe that's depending on your network situation. So I have only a standard 5G router with DHCP - nothing special.

2.) To get connection to Hoymiles working: Set the Radio Power Level to "high". All other settings didn't work. Also swap pinout CE to D4 and IRQ to D3.**

You're right, when I did my initial setup of ahoy-dtu 1.5years ago it worked for me, not 100% stable but it was "ok". Now I saw the there are many many updates and new revisions so I wanted to upgrade and also just for interest what's new or for finding new future projects ^^.

Overall - thank you very much - hope others who get into the same situation will have a benefit of this thread :-)

Thank you for this post. After changing the pin configuration I was able to get my connection working.