Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

ERROR mpqtt > InvalidDeviceMode #1

Open
Andries21 opened this issue Apr 8, 2021 · 7 comments
Open

ERROR mpqtt > InvalidDeviceMode #1

Andries21 opened this issue Apr 8, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@Andries21
Copy link

Hi,

Thanks for MPQTT, it's small and works on Pi Zero. I have one problem, the service randomly stops with error InvalidDeviceMode.
I played around with systemd start/restart but that only helped a little. It use to stop after 40 minutes now I got it to work for a few hours at a time. I saw today that it stops when the inverter changed from mains charging to solar. I know way to little of linux to fix it. Hope you can help.

@lluiscab
Copy link
Owner

lluiscab commented Apr 8, 2021

Hi,

Could you enable debug mode on the settings file and then send the output when the error occurs?
My guess is that there's an error somewhere reading the inverter mode and the debug information would be very helphul :)

@lluiscab lluiscab added the bug Something isn't working label Apr 8, 2021
@lluiscab lluiscab self-assigned this Apr 8, 2021
@Andries21
Copy link
Author

Andries21 commented Apr 8, 2021 via email

@lluiscab
Copy link
Owner

lluiscab commented Apr 8, 2021

Hi,

If you are running this program as a service (from the deb download for example), you should be able to see the logs using the following command:

$ journalctl -u mpqtt.service

@Andries21
Copy link
Author

Andries21 commented Apr 8, 2021 via email

@Andries21
Copy link
Author

Andries21 commented Apr 8, 2021 via email

@lluiscab
Copy link
Owner

lluiscab commented Apr 8, 2021

TRACE masterpower_api::codec    > Decoding response (DeviceModeInquiry): [40, 78, 65, 75, 115, 115].
ERROR mpqtt                     > InvalidDeviceMode

Okay, so it seems to get stuck on a loop trying to query the device mode. The response if gets is (NAKss which basically means invalid command, I don't remember right now but I don't believe there's any recovery logic implemented in case this happens.

Does this error go away if you manually restart the service? Everytime I have seen it happen it always seems to be fixed by restarting the communication. If so, I could look into adding some delay and retry logic to try and prevent the infinite loop

@Andries21
Copy link
Author

Andries21 commented Apr 8, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants