Closed latisen closed 2 years ago
Hi @latisen. Yes, should be enough. You can start with just couple of coils to try.
Here is example of one of the supported models I exported from Nibe Modbus
https://github.com/yozik04/nibe/blob/master/nibe/data/vvm225_vvm320_vvm325.json
You can skip entering name
I will generate it from title
and address
later.
@yozik04: Just to make sure I understand the json. In my case, the first (40004) should instead be 1 ? As the ID in the PDF?
@yozik04 : Also, can I edit it locally when testing somehow?
I'd recommend developing on computer, not a RPI. You can install everything locally and run from there.
Was just thinking if the file is located locally on the Pi I can use the storage on there to change the json. Just a few posts to see if it works at all
It is definitely located somewhere. But it would not be easy to find the path. Somewhere in a docker container, python lib's installation path...
@yozik04 But then I have to make requests for you to accept to test? No superfamiliar with GIT and team work :)
@yozik04 : And since its located in another repo (nibe), do I have to reinstall the addon after each change to make sure it downloads the updated json file?
This is why I recommend to install everything on computer.
With PyCharm CE should be quite simple
Ok, Ill see what I can do. Not used to needing a complete development environment just to change stuff like this :) But Ill see what i can do.
@yozik04 : I have cloned the repo and copied your example from the nibe repo. just to test, I edited the VVM325 json file, and changed model to 325 in the code (democode). It only outputs
File "C:\Users\dick\AppData\Local\Programs\Python\Python39\lib\site-packages\nibe\heatpump.py", line 74, in get_coil_by_address raise CoilNotFoundException(f"Coil with address {address} not found") nibe.exceptions.CoilNotFoundException: Coil with address 30009 not found
Which indicated it cant find 30009 in the json, correct? I got this in the json:
"30009": { "title": "BT7 HW Top", "info": "Hot water top temperature, BT7", "unit": "\u00b0C", "size": "s16", "factor": 10, "name": "bt7-hw-top-30009"
also tried get_coil_by_name('bt7-hw-top-30009') which resulted in the same output, but saying it could not find the name.
You need to show the code.
You can use this site https://gist.github.com/
You need to show the code.
This: [`import asyncio import logging
from nibe.coil import Coil from nibe.connection.modbus import Modbus from nibe.heatpump import HeatPump, Model
logger = logging.getLogger("nibe").getChild(name)
def on_coil_update(coil: Coil): logger.debug(f"on_coil_update: {coil.name}: {coil.value}")
async def main(): heatpump = HeatPump(Model.VVM325) heatpump.initialize()
heatpump.subscribe(HeatPump.COIL_UPDATE_EVENT, on_coil_update)
connection = Modbus(heatpump=heatpump, url="tcp://10.0.1.15:502", slave_id=1)
coil = heatpump.get_coil_by_address('30009')
await connection.read_coil(coil)
logger.debug(f"main: {coil.name}: {coil.value}")
if name == 'main': logging.basicConfig(level=logging.DEBUG)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_forever()`](https://gist.github.com/latisen/effd27bcc932743ae2fe6f5e37ff1b9e)
can it be that another nibe library is installed locally?
If you look on page 7 of the modbus manual there are instructions to download the available registers on a USB stick. Maybe that will help verify which registers are available on your heat pump.
On Mon, 11 Jul 2022, 14:36 Jevgeni Kiski, @.***> wrote:
can it be that another nibe library is installed locally?
— Reply to this email directly, view it on GitHub https://github.com/yozik04/nibe/issues/7#issuecomment-1180357323, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGZOWUWFSODOJYVES3EK2TVTQINZANCNFSM53HLGLKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Accidantaly ran the file from the wrong dir. Now the error says:
DEBUG:asyncio:Using proactor: IocpProactor
DEBUG:nibe.nibe.connection.modbus:Sending read request
DEBUG:sockio.TCP(10.0.1.15:502):open connection (#1)
Traceback (most recent call last):
File "c:\Users\dick\OneDrive - AFRISO EMA AB\Dokument\nibe\dick_test.py", line 33, in
very interesting. Have no idea what argument it tries to send
seems to be something with the modbus connection
Strange thing is that I don't get that error on the HA Addon, will try more later tonight.
I'm up and running. Installed python and all req's on another Pi. about 40% of the sensors for VVM325S is added now.
@yozik04 Just want to test writing. How do I write to a coil?
Cool! Does it read all these 40% of sensors?
Update coil value and execute: await connection.write_coil(coil)
What is the status here? Would be cool to add the modbus support to home assistant native client, but we'd need a guinea pig.
Would be great but nobody tested it yet as I know.
@latisen can you export the csv of registers from your pump and post here. I think it should be same way as this manual: https://www.nibe.eu/download/18.3db69dc1795e0d992c5722/1622634529178/Modbus%20S-series%20EN%20M12676EN-1.pdf
Ps. Switch the pump to english first.
This is supported now.
Creating this thread to solve issues and make it work with the S-model VVM325
Regular manual: https://www.nibe.eu/assets/documents/14743/331115-1.pdf Modbus manual: https://www.nibe.eu/download/18.3db69dc1795e0d992c5722/1622634529178/Modbus%20S-series%20EN%20M12676EN-1.pdf
@yozik04 : Is this sufficient? I have a contact at NIBE technical department in sweden that I can probably get more information from :)