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
48 stars 26 forks source link

CBus "lights" detected but turning them on/off does nothing #45

Open rollsch opened 7 months ago

rollsch commented 7 months ago

image

Everything detects as the above. I also get the binary sensor equivalent as well. However nothing actually turns on or off.

Any assistance? I managed to get a log stream somehow (cannot find it again and found this

2023-12-27 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT device name is equal to entity name in your config {'name': 'C-Bus Light 254', 'unique_id': 'cbus_light_254', 'command_topic': 'homeassistant/light/cbus_254/set', 'state_topic': 'homeassistant/light/cbus_254/state', 'schema': 'json', 'brightness': True, 'device': {'identifiers': ['cbus_light_254'], 'connections': [['cbus_group_address', '254']], 'sw_version': 'cmqttd https://github.com/micolous/cbus', 'name': 'C-Bus Light 254', 'manufacturer': 'Clipsal', 'model': 'C-Bus Lighting Application', 'via_device': 'cmqttd'}, 'brightness_scale': 255, 'flash_time_long': 10, 'payload_not_available': 'offline', 'payload_available': 'online', 'encoding': 'utf-8', 'enabled_by_default': True, 'qos': 0, 'color_temp': False, 'xy': False, 'retain': False, 'optimistic': False, 'hs': False, 'rgb': False, 'effect': False, 'availability_mode': 'latest', 'white_scale': 255, 'color_mode': False, 'flash_time_short': 2}, this is not expected. Please correct your configuration. The entity name will be set tonull``

Nik19792000 commented 7 months ago

I don't think this log is the culprit. I'd suggest to install MQTT Explorer and check what's happening when you turn on lights via cbus switch VS turning them on via home assistant.

rollsch commented 6 months ago

Great suggestions, I was looking for a sniffer of some sort. I'll try that and report back. Thank you,.

rollsch commented 6 months ago

Ok I install MQTT explorer and I see nothing when I switch the lights via the CBUS panel switches. I tried sending commands to various groups etc, but nothing happens.

Any ideas how I can log the CBUS switches and see what they are sending, then implement them manually in MQTT

rollsch commented 6 months ago

Interestingly in C-Bus Toolkit it shows everything as "Off" regardless of whether its off or not, however the CBUS system is working perfectly.

Any ideas what is going on here? We have soft start on most of the lights, but at least half are just relay on off.

Problem may be that the network says "closed" and it thinks it needs serial, however Ive managed to connect to everything via ethernet.

rollsch commented 6 months ago

WhatsApp Image 2023-12-31 at 16 34 19_cd0539e2 WhatsApp Image 2023-12-31 at 16 34 19_e85e523c WhatsApp Image 2023-12-31 at 16 34 20_2ace84d9 WhatsApp Image 2023-12-31 at 16 34 20_a5bf3071 WhatsApp Image 2023-12-31 at 16 34 21_4a79ad2b

This is the controller we have, maybe it doesn't actually support what I need ?

It looks like the project is just the default project.

NMAP shows the following ports open on the IP

Nmap scan report for 192-168-68-110.tpgi.com.au (192.168.68.110) Host is up (0.00027s latency). Not shown: 997 closed tcp ports (reset) PORT STATE SERVICE VERSION 135/tcp open msrpc? 139/tcp open netbios-ssn Microsoft Windows netbios-ssn 8081/tcp open blackice-icecap?

rollsch commented 6 months ago

Looks like you can't actually program the touch screen units via ethernet despite having an ethernet port. You have to use another module that does USB -> ethernet etc.

Nik19792000 commented 6 months ago

At least I haven't seen this kind of unit and therefore don't know what it exposes to the network. The library is meant for serial interface (PCI) or network interface (CNI). According to documentation, the latter would listen on port 10001. Without the right connectivity, libcbus won't be able to translate between MQTT and CBUS.

rollsch commented 6 months ago

Thanks for your help. Where would be the best place to ask/research what kind of adapter/translater I need to convert the touchscreen interface to PCI/CNI ?