Skip to content
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

Upgrading from 2.2.28 to 2.3.0, 2.3.9 or 2.4.0 breaks HAN-port config. POW-K #903

Open
bardahlm opened this issue Jan 16, 2025 · 9 comments

Comments

@bardahlm
Copy link

bardahlm commented Jan 16, 2025

Describe the bug
I have a POW-K that have been running 2.2.15 stable for a long time. I upgraded to 2.4.0. After that I get no data on HAN-port.
I tried a few other versions, the highest version I found working was 2.2.28, the lowest non-working was 2.3.0.

Hardware information:

  • Country: Norway
  • Meter: Kamstrup Model: 6841131BN243101040
  • Encryption enabled: No
  • AMS reader: POW-K
  • M-bus adapter (if applicable):

Relevant firmware information:

  • Version: >2.3.0
  • HAN GPIO: Unsure, GUI does not show after initial setup.
  • HAN baud and parity: 2400 8E1

Additional context

I found the following difference in config save:

2.2.x:

gpioHanPin 12

2.3.0:

gpioHanPin 3

@ArnieO
Copy link
Contributor

ArnieO commented Jan 17, 2025

This must be some issue with the GPIO setting, as you seem to suspect.
I believe you have an early model with ESP8266 Wi-Fi module - right?
The silkscreen on your board indicates the correct GPIO, it is either GPIO3 (UART0) or GPIO12.

Did you make a backup of the configuration before attempting the upgrade?
Restoring that backup after upgrade should get it up and running.

If that for some reason does not work:

  • Add "/vendor" to the URL, it should give you this:
    Image
  • Check the silk screen on your board, there is an indication showing which GPIO is correct. It is either GPIO12 or UART0.
  • Select the right board in the dropdown menu:

Image

  • Press Save

@bardahlm
Copy link
Author

HAN to GPIO12 is soldered on the board.

@ArnieO
Copy link
Contributor

ArnieO commented Jan 17, 2025

HAN to GPIO12 is soldered on the board.

OK, then selecting "Pow-U (GPIO12)" is the right choice.
Did you try that?

@bardahlm
Copy link
Author

I selected Generic ESP8266 and GPIO12 and got it to work on 2.4.0.

Image

From config screen:

Image

Will this survive future upgrades?

I bought the pow-k in november 2021.

@ArnieO
Copy link
Contributor

ArnieO commented Jan 17, 2025

I bought the pow-k in november 2021.

I know. Your full name is shown in the Github notification email. 😉 (Maybe due to your Github setup.)

I selected Generic ESP8266 and GPIO12 and got it to work on 2.4.0.

That will also work, but you need to do some more manual configuration, add this:

Image

We should also check that the Vcc reading is correct - as the ESP8266 might need some manual calibration (using the "Vcc offset" value). One of the advantages with the ESP32 is that the ADC is factory calibrated.

BUT when I am checking this here with an old ESP8266 board, I do not see Vcc in the gauge on the top bar, I only see "ESP" indicated. Not sure why. The board voltage should be shown here.
Image

Ping @gskjold : Is this an error?

@gskjold
Copy link
Member

gskjold commented Jan 18, 2025

I found the following difference in config save:

2.2.x:

gpioHanPin 12

2.3.0:

gpioHanPin 3

And what did boardType say? should be boardType 5 in your case, which is Pow-K GPIO12.

Ping @gskjold : Is this an error?

Must be, although I cannot see the reason at first glance. Minor bug though.

OTA should still work.

@bardahlm
Copy link
Author

bardahlm commented Jan 18, 2025

boardType is as follows in my save files:

version v2.2.15
boardType 1
version v2.3.0
boardType 1
version v2.4.0
boardType 100

I guess this last one is due to my manual override.

@gskjold
Copy link
Member

gskjold commented Jan 20, 2025

boardtype 1 is an old board design and is a misconfiguration for your setup, so this is the reason why this broke on upgrade. From v2.3.0 we force GPIO config for specific board types.

If yours is indeed a Pow-K as stated in your original post, you should use profile Pow-K (GPIO12) which is boardType 5.

I consider this issue solved, except for maybe finding out why the voltage is not present. Any thoughts @ArnieO ?

@ArnieO
Copy link
Contributor

ArnieO commented Jan 20, 2025

I consider this issue solved, except for maybe finding out why the voltage is not present. Any thoughts @ArnieO ?

No, not really. The ESP8266 reads voltage internally, so not influenced by GPIO configuration.
And I see the same on an old Pow-U with ESP8266 where "Pow-U (GPIO12)" is the selected configuration:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants