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

Add system name as parsed argument on startup #5

Open
Phi2k opened this issue Jan 24, 2024 · 9 comments
Open

Add system name as parsed argument on startup #5

Phi2k opened this issue Jan 24, 2024 · 9 comments
Assignees

Comments

@Phi2k
Copy link

Phi2k commented Jan 24, 2024

I will go "all in" and install another 5 fans which means I need a second controller for the 2nd floor of the building.
I now run into the issue that both instances will post the same mqtt topics "comfospot40".
therefore the feature request to parse the system name as argument of server.py e.g. --name.

If I read the code right it would just be changing line 10 in "mqtt.py" ?!

Workarround would be a second mqtt adapter in IOBROKER reachable under a different port. However, last time I checked I was not able to pass a port to the mqtt IP in the form xxx.xxx.xxx.xxx:port and only the standard port was working.

Thanks for the support.

@rubenbe rubenbe self-assigned this Jan 24, 2024
@rubenbe
Copy link
Owner

rubenbe commented Jan 24, 2024

Hi!
Wow, nice, that would be a nice testcase.
Unfortunately, it is not supported currently, and it is a bit harder than only changing the line 10. (mainly because I didn't take it in to account when writing the software). But I can quite easily do the modification.

In return I might ask some raw dumped data of your setup, since it is much more complex than mine ;)

I'll also add the option to use a non-default mqtt port

@Phi2k
Copy link
Author

Phi2k commented Jan 24, 2024

cool thanks! This would help me a lot and avoid a nasty IT setup...
I will send dumps from the bus as soon as available.
Setup will be:
Two seperate busses with 4 and 5 fans installed. One sensor per bus (as more are currently not supported and also not neccessary)

the two systems would run completely seperated but should both report to the same IOBroker installation.
Therefore the issue with the same naming scheme.
If changing the port would work I would just run a second mqtt adapter and the same naming would not be an issue.

by the way: in case you do not find some time:
perhaps I can just create a fork and replace every "comfospot40" string by "comfospot41"
not elegant but probably a solution :-)

P.S. I read somewhere that the protocol would in general support even more fans using the jumper number 4... this is also something I coud try but would require changes in the code....

@Phi2k
Copy link
Author

Phi2k commented Jan 25, 2024

I tested once more handing over a different port. It does not work. According to documentation of the aiomqtt package the port is a seperate variable which has to be handed over. So this is probably the fastest way to do it. Fallback in case no port is assigned is 1883.

@rubenbe
Copy link
Owner

rubenbe commented Jan 25, 2024

The protocol indeed supports more than 3 zones. This actual limitation is only there because there are only 3 dip switches on the fans. The 4th switch inverts the fan direction. This is a bit a simplification since on protocol level there are 6 zones used, to implement the fan direction using dip switch four.

@rubenbe
Copy link
Owner

rubenbe commented Jan 26, 2024

Hi, I pushed some modifications.
Can you test them?

@Phi2k
Copy link
Author

Phi2k commented Jan 26, 2024

Thank you very much. I can confirm that both changing the port and changing the mqtt-prefix is working.
Tested with a docker container without hardware installed.
Test with hardware in about a week.

@rubenbe
Copy link
Owner

rubenbe commented Jan 27, 2024

Great! Let's close the ticket when it's confirmed to be working with the real hardware.

@Phi2k
Copy link
Author

Phi2k commented Feb 10, 2024

I now have two separate installations running on two docker containers on a raspberry Pi 5.

I was not able to run both installations on the same MQTT Broker. I got errors with "Pending messages". This might be an error of my IOBroker MQTT setup, though.

I now run two MGTT-Brokers on different ports.

@rubenbe
Copy link
Owner

rubenbe commented Feb 14, 2024

That is weird, since I did the same to test, but I'm using mosquitto as MQTT broker.
Pending messages is indeed due to the application sending quite a large amount of messages on startup (for the hass autoconfig)

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

2 participants