-
Notifications
You must be signed in to change notification settings - Fork 36
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
Initial support for modbus is failing #50
Comments
@cybermaus can you attach home assistant logs, so we can see the error. |
Same error for me (S1255).
|
That was a bit unexpected. Did any of you use standard modbus integration from ha against these pumps? Mainly to get some clues. |
Yes. I did stop it, (directed it to another IP) and restarted HA, and then tried again. Same result. |
@dkmh where do you find those. All I get is below, not very interesting.
|
Never mind, log had wrapped, had to redo the error:
|
@cybermaus can you read the holding register 22 using standard modbus code? Edit: meant: 21 |
Maybe not, I tried to read it as an input register, and now HA is not restarting. In the mean time, I also did a |
21 is not in my register list. Howmany bytes? What name? |
22 is likely right. There are some offset to this number that i dont know if its added in the csv export. |
Ps. Input type in hour example is wrong. Should be holding. |
tried holding as well, accepted by the startup parser, still unavailable answer. |
Can you check wireshark there too? Hopefully identical. |
Register that can both be read and written. You can test some other of the holding registers and see if you get data (look in csv file). It could be that its just rejecting this one, with wrong error code. |
Well, I am trying To be fair: Out of all the (input) registers I am trying to read in the past few weeks, most of them fail. I come to the acceptance that only a few (lucky the most important) registers work. I assumed the register list is some sort of a "hint" which registers might be available, but not a definite list. Therefore, while I did not think much about it till now, I would have assumed you wanted a full register list so you can try them all, and forget if they do not work. Ignore any read error, and move on to the next. Of course, my other though was, maybe they should all work, just the generic modbus integration of HA is not capable enough? So I am not sure. I was hoping you would read more of them, but to be honest, I was also hoping most would be automatically disabled or hidden in the integration, because I sure do not need to keep history on all of those potential registers. Especially not the ones named "id:" or "-" |
All will be hidden by default. I wonder if there is some readonly setting in the pump. |
But such a readonly setting would not explain the many input registers that I also cannot read. |
nevermind, its a discussion for later, lets first figure out why it is not working |
Not being recorded, i meant disabled. |
Did some debugging and it seems to be that the problem is an off by one error (0 or 1 based addresses) on the addresses caused by: Another problem was that setting of alarm value |
Nice!! Then i will fix those offsets and add mapping for that register. |
which file is that, I am grepping and not finding it anywhere. |
I've now updated the pull request, so you can regrab it @cybermaus |
config validation still fails for me: After changing that i fall into this error (was already a problem in last version, but forgot to mention it): |
On changing parameters I get this error: [1657699968] The value contained in the request data field is not an allowable value for the server. During handling of the above exception, another exception occurred: Traceback (most recent call last): |
@dkmh Thanks. Yea we seem to have an encoding issue for writes. Will have to figure out a solution for it. |
Different issue. If you change your manifest file where it says nibe==1.1.0 to nibe==1.1.1 and try again. |
He might need to bump version in manifest as well. |
Sorry guys, I have a real customer with an urgent issue. It may be a while. |
Latest log:
|
@cybermaus if you can hack the path mentioned in your log above, you can change |
It seems I can't. A |
Main home assistant is separate from SSH container where you are logged in. So it is not possible to edit HA container from SSH Container. |
Makes sense. Web UI terminal has the same. How to break this jail? |
The same way as you would login from one VM to an other 3rd party VM (not owned by you) on the same server. You can't. =) |
Ok. That is a hassle as I need to physically retrieve the device, but I will do so. If only because I need to get more on top of this docker stuff. But not now, another customer meeting at the top of the hour. (also I probably need to add some KMV solution, like VNC) |
you do not need any KVM or VNC. Just use regular raspbian and install docker there. You will have proper access to the host OS. HomeAssistant will run in docker. But this way you will loose opportunity to easy install hass os plugins, of course if you use them. All this requires some linux administration skills though, and maybe some more time and effort. |
You can get into hassos container too: https://community.home-assistant.io/t/protip-how-to-get-shell-in-actual-homeassistant-or-addon-container-when-using-hassio/48760 but it's trigger and you risk breaking stuff. |
I still don't understand thus. umodbus does not seem to be using numpy, so where the heck is that numpy.int16 coming from. |
@cybermaus, change the requirement line in your manifest file to this:
The 2.0.0 need to be changed anytime we make some change to nibe library. It's just a dummy version. |
Ok, so I was already busy activating port 22222 when your suggestion came in, but I did get that to work (so I guess I do now have a true root console).
Next I did the
Just for reference, this is how my manifest looks at the moment:
|
It didn't take the new requirement sadly. Not sure why. |
@cybermaus can you post your config.yaml for the SMOS40 so I can join testing ... @elupus I think i can't poll any register ... I am not running through container , just directly on Ubuntu 22.04: The output is:
My config is
Using a gui tool I managed to pool various registers successfully , so I am confident the issue is not on NIBE's end. |
@nkrepo For what elupus is doing, there is nothing in my configuration.yaml. And I am not using MQTT to the NIBE, but the home assistant MODBUS integration. I dropped my config here for you already. But to restate, that has nothing to do with either MQTT nor the work done here. You are welcome to use it though, but if you have questions about it, best put them in that other issue. And if you want to start testing the solution of this issue, best follow the instructions from the top. Which somewhat unfortunately start also in the middle of another issue. |
@cybermaus @elupus |
@nkrepo you can just checkout home-assistant/core#80557 and use that pull request, however you will need to adjust the manifest file of nibe_heatpump at the moment. I will update that pull soon:is. I just wanted to avoid a new nibe release again, but looks like we might have to do that. |
If you can tell me what modbus.py to modify in my root console, I could do that, so you may avoid unneeded versions. Or should I modify all of them?
|
I've published a new lib and updaded the pull request. @cybermaus change to |
ps. @cybermaus you should not be modifying those. You should do as in: https://community.home-assistant.io/t/protip-how-to-get-shell-in-actual-homeassistant-or-addon-container-when-using-hassio/48760 and enter the docker container. Then you can find the paths in the error logs. But.. be careful :) |
It is absolutely marvellous. Which leads me to the fact that this one seems to be missing:
|
Success for me also!
It includes the 2e4627a After that I configured the nibe integration through GUI, added some modbus registers and it seems to work |
@nkrepo nice with more confirmation! Now i just need to figure out how to handle climate objects and hot water ones with different parameter numbers compared to modbus40. |
Initial support for modbus is failing
The text was updated successfully, but these errors were encountered: