micolous / cbus

Use Python to communicate with a Clipsal C-Bus PCI or CNI! Includes MQTT bridge (for Home Assistant), PCI simulator, and reverse engineering notes.
http://cbus.readthedocs.org/
GNU Lesser General Public License v3.0
49 stars 27 forks source link

cmqttd closing without error message, network related. #24

Open ChrisAgile opened 3 years ago

ChrisAgile commented 3 years ago

Hi,

Great work on the open source CBUS integration!

I am running the new Wiser 3 (5500SHAC/NAC) as a CNI, with all default settings eg Port 10001. This is a new CBUS test network so not much activity. After a few mins (3-5 mins) the program would exit without a message.

I ran across this issue in docker, then also in a new Ubuntu 18.04.5 VM. Still no error message when enabling DEBUG messages.

Using Wireshark I could see that the SHAC was closing the connection after about 260 seconds of no activity, eg no packets being sent either way.

After changing '--timesync' to 120s, to force packet activity, the connection would stay alive and has not crashed yet (5h so far).

Is there someway to force python to keep the connection open without the time sync? I am happy to run some test code if you don't have access to hardware for testing.

Also a couple of improvement ideas:

Really appreciate the effort you've put in.

Cheers, Chris

ziogref commented 3 years ago

Hi,

This isn't a solution to your problem, but I don't know where else to ask. I'm trying to get Home Assistant (Mosquito) to talk to my 5500SHAC aswell, but getting no luck. (Via the IP, not serial)

I'm a little new to linux so where my problem is a limit in my knowledge, but would you be able to do a video or text guide on how you got your system setup? I have tried in a Ubuntu 20.10 with only the connection to mosquito working, not cbus. (My Server is unraid so I can do a VM or Docker)

I know its a big ask but I struggled to follow the documentation.