anthonywebb / homebridge-cbus

CBus plugin for homebridge
MIT License
35 stars 20 forks source link

Pi Connection to CNI (5500CN2)? #95

Open jtjg1 opened 4 years ago

jtjg1 commented 4 years ago

Hi all. I have followed the excellent Homebridge instructions from Daryl McDougall and installed cgate and Homebridge on a new Raspberry Pi (ip 192.168.1.47). My Pi is connected to my network via wifi. On my network, I have a CNI at ip 192.168.1.48. Becuase I am not suing a wired connection, what changes do I need to make to my config.json and/or access.txt or C-GateConfig.txt or? I am a bit unclear on how to set up the interface from the Pi to the C-bus system. Thank you for any guidance!

DarylMc commented 4 years ago

@jtjg1 I just sent you an email but after reading this I can be a bit more clear. RPI IP address will be used for SSH connections to the RPI and in CBus Toolkit to setup a connection to a remote CGate if and when you need to use CGate to make changes to your CBus network programming.

If CGate is running on the RPI the config.json file should point to 127.0.0.1

CGate config text needs to have your CBus project name added in the places specified. CGate will then use the CNI IP address data from your project xml. Easy

Brue24 commented 3 years ago

Hi everyone. I came across a project by greiginsydney which allowed me to install homebridge and cgate package onto a PI 3 as my access to touchsoft has stopped working due to recent phone/ios updates anyhow, i have managed to install and get my light switches onto my phone in the home app which is great, howerver the lights do not work from within the app. I do see log entries supporting the interface between my phone and the PI. Im just wondering whether my configuration is correct. I am using the loopback interface address for the client connection I am not certain that things are working as they should as I am also getting some errors which I havent been able to fathom due to my lack of coding/cbus experience, have attached my log file which may also shed some light .. would greatly appreciate any help in resolving

cheers

Andrew

homebridge.log (3).txt

here's a partial from my config below.
{ "bridge": { "name": "Homebridge Carlton", "username": "0E:C0:83:57:16:E4", "port": 51923, "pin": "139-05-413", "bind": [ "wlan0" ] }, "platforms": [ { "platform": "homebridge-cbus.CBus", "name": "CBus", "client_ip_address": "127.0.0.1", "client_controlport": 20023, "client_cbusname": "CARLTON", "client_network": 254, "client_application": 56, "client_debug": true, "platform_export": "/home/pi/my-platform.json", "accessories": [ { "type": "dimmer", "id": 0, "name": "Hall North", "enabled": true }, { "type": "dimmer", "id": 1, "name": "lounge", "enabled": true }, { "type": "dimmer", "id": 3, "name": "movie wall", "enabled": true }, { "type": "dimmer", "id": 4, "name": "kitchen", "enabled": true }, { "type": "dimmer", "id": 5, "name": "master bed", "enabled": true }, { "type": "light", "id": 6, "name": "outside south", "enabled": true }, { "type": "light", "id": 7, "name": "ens", "enabled": true }, { "type": "light", "id": 8, "name": "kitchen bench", "enabled": true }, { "type": "dimmer", "id": 9, "name": "dining table", "enabled": true }, { "type": "light", "id": 10, "name": "Hall West Side", "enabled": true }, { "type": "light", "id": 11, "name": "outside north", "enabled": true }, { "type": "light", "id": 12, "name": "master bed hall", "enabled": true } ] }, { "name": "Config", "port": 8581, "platform": "config" } ], "accessories": [] }

DarylMc commented 3 years ago

I haven't got time to look right away but you could log an issue on Greig's page. https://github.com/greiginsydney/Homebridge-cbus-installer

As far as I know Greig's instructions and setup is all good so you could just try from the start again.

Brue24 commented 3 years ago

Thanks anyway. Ive contacted Greig for comment. If you do get time though, id be interested in your thoughts

🥂

Andrew Baker Tassie

On 16 May 2021, at 10:39 am, DarylMc @.***> wrote:

 I haven't got time to look right away but you could log an issue on Greig's page. https://github.com/greiginsydney/Homebridge-cbus-installer

As far as I know Greig's instructions and setup is all good so you could just try from the start again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

DarylMc commented 3 years ago

Greig’s setup will fully create the config file. Did you make some changes to it?

Brue24 commented 3 years ago

Basically cut and pasted from the my-platform.json. I have confirmed through cbus toolkit that cbus network is correct, accessory id’s are correct etc. the only thing i can see is that when the light ramps, perhaps the app is expecting a level between 0 and 255 rather than a percentage which is being sent from the home app accessory.

I dont, or cannot see where to change the output so it displays as an integer though

I’m also attempting to connect directly to a cni but this isnt working as it cannot find the network if i change the address to 127.0.0.1. I am therefore running c-gate on a windows workstation had have modified the access config file to allow the PI access in. I do see connections being made to cgate from homebridge

I didnt think it was going to be this hard he he

Cheers

Sent from my iPad

On 16 May 2021, at 6:25 pm, DarylMc @.***> wrote:

 Greig’s setup will fully create the config file. Did you make some changes to it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Brue24 commented 3 years ago

Sorry just realised i responded to your email thinking it was the issue 118 which I posted earlier. Sorry for any confusion.