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

Addon throws time-errors on one meter suddenly after month of successful opertion #11

Closed
MichiW1 opened this issue Sep 11, 2022 · 10 comments

Comments

@MichiW1
Copy link

MichiW1 commented Sep 11, 2022

Hi all,
I like this addon very much and am a big fan using energy monitoring since months now.
I have two SML smart-Meters connected on /dev/ttyUSB0 and /dev/ttyUSB1. All of a sudden, the meter on USB0 refuses working now, whereas the one on USB1 is working well at the same time.

The add-on logfile says:
[Sep 11 23:23:17][mtr0] meter returned readings with a timestamp before 1990, IGNORING.
[Sep 11 23:23:17][mtr0] most likely your meter is misconfigured,
[Sep 11 23:23:17][mtr0] for sml meters, set "use_local_time": true in vzlogger.conf (meter section),
[Sep 11 23:23:17][mtr0] to override this check, set "i_have_a_time_machine": true in vzlogger.conf.

But In have really not changed anything at all.
I wanted to try the above workaround but I do not even find the file "vzlogger.conf" in my filesystem. Neither in /conf/ folder nor anywhere else. Where do I find this conf-file?
Can you please help me? It is such a pitty since I am the biggest fan of it :-(

Thanks,
Michael

@m-reuter
Copy link
Owner

Hi MichiW1, since one meter still works, it has probably nothing to do with our recent update. You could try switching the readers, also double check if (e.g. after a reboot) it has a different ttyUSB number now. This can happen and then you will not see anything. Also you can install vzlogger directly and play around with the conf file. For that I would temporarily deactivate the HA-Addon.
There is no way to directly change the vzlogger.conf in the HA-Addon (as that runs inside a docker container). So best idea is to debug this using vzlogger directly and once you found a solution that requires additional parameters we can add them here. But more likely (as it has worked before and still works on the other meter) it is a problem with your setup (broken dongle, changes in the meter, cable, reboot with swapped usb etc). Good luck.

@dAjaY85
Copy link

dAjaY85 commented Sep 12, 2022

Hello MichiW1,
you can set verbosity to 15 and look at the log, this helped me some months ago.

@MichiW1
Copy link
Author

MichiW1 commented Sep 12, 2022

Thank you both for your hints and the support. I did already do the loglevel test set to 15 for the meter. Interestingly, the vzlogger does read exactly the correct values for power and energy. But it still throws the initially mentioned error and does not send the values via MQTT. Therefore, I do not think that there is any issue with hardware, USB-port or anything else. I even checked the raw HEX SML messages on PC and they are ok. I need to debug further, but I have no clue how to run vzlogger directly on Raspi without the addon docker image.

@m-reuter
Copy link
Owner

m-reuter commented Sep 12, 2022

https://wiki.volkszaehler.org/software/controller/vzlogger/installation_cpp-version explains the installation. Also our Dockerfile https://github.com/m-reuter/ha-addons/blob/master/vzlogger2mqtt/Dockerfile can be an example (however, here the library dependencies may have different names as the image uses a different distribution as base image).

@MichiW1
Copy link
Author

MichiW1 commented Sep 15, 2022

Hi @m-reuter and @dAjaY85,
Thanks for your perfect support here. I realized from some forum search that wrong timestamps is a typical problem for vzlogger installations. I do not know why my meter lost valid timestamp, but that happens to other users as well.
Ich have done several tries with vzlogger and configuration. Indeed, when I add the parameter
"use_local_time": true
within each SML meter configuration, the vzlogger is working well again. Do you see a chance to also add this parameter within your HASSIO-addin? That would be a big help for me.
Thanks a lot, Michael

@dAjaY85
Copy link

dAjaY85 commented Sep 15, 2022

Hello MichiW1,

you can add additional commands, when you switch to yaml mode, this can be done over the 3 dots in the upper right corner.

@MichiW1
Copy link
Author

MichiW1 commented Sep 15, 2022

Hi @dAjaY85,
yes, I tried that already but it does not help and work like directly configuring vzlogger.conf. I do not know how the yaml-editor is working in detail, but it seems that it does not configure additional parameters in vzlogger.conf or just append them not at the right position (sml-meter section in this case).
Best,
Michael

@m-reuter
Copy link
Owner

Hi, yes if you edit the yaml it will not automatically add those things to the vzlogger.conf. I just pushed an update a51be27 that adds the use_local_time option. Hope it works for you. Will take a while to build the containers on travis, but then it should be available for update.

@MichiW1
Copy link
Author

MichiW1 commented Sep 16, 2022

Hi @m-reuter, thanks a lot for this great support and quick change. Indeed, that parameter resolves my issue and it is working well again. No errors anymore and both meters provide readings regularly via MQTT.

@MichiW1
Copy link
Author

MichiW1 commented Sep 16, 2022

Issue is resolved by adding the new parameter. Thanks again

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