studer-innotec / xcom485i

Python library to access Studer-Innotec Xcom-485i device through Modbus RTU over a serial port
MIT License
6 stars 4 forks source link

XCOM232i support #1

Open kraeml opened 4 years ago

kraeml commented 4 years ago

Hey nice python on Studer.

Is there any support for XCOM 232i? I don't have xcom485i. Some hints will nice.

Thanks.

zocker-160 commented 3 years ago

@kraeml I know this is a very late reply, but I have been working on an implementation myself, because Studer does not seem to be interested at all.

you can check it out here: https://github.com/zocker-160/xcom-protocol

JeffersM1 commented 1 year ago

Is there any chance of adding TCP connection support to be able to access the Xcom-LAN across a local area network for systems without an Xcom-485i?

zocker-160 commented 1 year ago

@JeffersM1 I know you are probably hoping for an official response and support by Studer, but I have created an Xcom-LAN implementation for my personal use some time ago.

So if you are capable of a bit of coding in Python and are interested, I think you could adjust it to your needs.

JeffersM1 commented 1 year ago

@zocker-160

Yes, I would be interested in getting a copy of your LAN implementation, but I have only found your serial interface implementation. Can you post the LAN implementation? I would like to be able to monitor and control my Studer PV installation from within Home Assistant.

Is your implementation capable of writing to the Studer PV? I am interested in being able to change parameters 6062 SOC level for backup, and 6063 SOC level for grid feeding. I see in the examples you give for your serial port implementation that it has write capability and a choice between writing to flash or RAM. I was worried that there might not be an option to write to RAM, and am glad to see that there is.

I don't have much Python experience, but have time and am willing to learn. I also see that there are a few people that on a Czech solar forum that are working on a similar project, so I think they would also be able to help me out.

zocker-160 commented 1 year ago

@JeffersM1

The programming interface works the same as my Xcom-232i code and has a very similar feature set. (There are a few minor bugs, which I sadly have not found the time to fix yet)

I will publish everything as open source here on GitHub in the coming days and post the link here.

If anyone else (for example in the Czech solar forum) wants to contribute to the code, they are welcome to issue a Pull Request.

zocker-160 commented 1 year ago

@JeffersM1 I have actually done an almost complete rewrite on the library making it now easy to extend with other endpoints if needed.

The XcomLAN implementation was created using my very first and old code and since I personally am not using it anymore (I only use RS232), so I am not 100% sure if it will work. So please report any issues you encounter.

It is all on GitHub under a new repository:

https://github.com/zocker-160/xcom-protocol

PS: could you link said Czech forum? I would be interested if the lib will be useful for them. Contributions are obviously appreciated :).

JeffersM1 commented 1 year ago

@zocker-160 Thanks for the support. I will post a link on the forum to this repository. There are actually two forums and I have just posted a link to both. https://solarforum.cz/ and https://forum.mypower.cz/

Regarding the Xcom-LAN, do I need to setup a second client in the MOXA? If so, do you have those settings?

JeffersM1 commented 1 year ago

This is the Moxa setup screen that I was referring to. For the destinatin ip address I will put the host address that will be running the Xcom-LAN protocol. What port should I use? Any other setting?

image

zocker-160 commented 1 year ago

This is a good question actually, I sadly cannot remember 100%, but I think that I have added the IP of the device you use for the requests into Destination IP address 2 with the port 4001 and then added port 4002 to Designated local port 1. (or the other way round, I am sadly not sure about that right now)

In my lib you can specify both ports in the XcomLAN constructor, so you can pick whatever port you want.

EDIT: if you figure it out, please feel free to report so I can add it to the Readme.

zocker-160 commented 1 year ago

@JeffersM1 Ah one last thing: I took a look into the forum, ppl are trying to push data into Home Assistant it seems? I am actually doing the same, I would be willing to share that part of my code as well:

Screenshot_20230621_123421

PS: Sadly my Czech is really bad xD, so I cannot really help you directly in the forum.

JeffersM1 commented 1 year ago

Yes they would probably appreciate any integration for pushing values to Home Assistant. That is also my ultimate goal, so I would also be happy with that.

I don't speak any Czech and have been using Google translate and Deepl. I have no idea of how well the translations are going through. Probably they are scratching their heads looking at what I have written.

I will be posting all my future questions about Xcom-LAN protocol in your repository.