Closed peterconn closed 5 years ago
Hello Peter I have Homebridge on stretch lite no problem. That looks like a node problem to me. Don’t use my spreadsheet use this. curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
I think CGate will have some extra work moving from Jessie to Stretch. Previous instructions to start CGate service used init.d and I think that might need to be changed to systemd for Stretch.
@darylmc thanks mate. I’ll give that a go. Hope you’re keeping well!
I have a few RPI’s at home with Homebridge running on Stretch for other plugins. I’ve moved house so nothing with CBus or CGate handy to test right now.
Just go here, copy the URL for the download and paste with wget in front.
Bottom of the page if you want an older cgate version to match a toolkit version.
Check out the matrix chart to make sure all suitable.
https://updates.clipsal.com/ClipsalSoftwareDownload/mainsite/cis/technical/downloads/c-gate.html
Thanks, i eventually worked it out :-)
i think i ran into this issue "CGate will have some extra work moving from Jessie to Stretch. Previous instructions to start CGate service used init.d and I think that might need to be changed to systemd for Stretch."
sudo nano /etc/systemd/system/cgate.service insert text from link sudo systemctl enable cgate.service sudo systemctl start cgate.service sudo chmod +x /usr/local/bin/cgate/cgate.jar sudo chmod 755 /etc/init.d/cgate sudo update-rc.d cgate defaults nano /usr/local/bin/cgate/config/access.txt remote XXX.XXX.XXX.XXX Program sudo service cgate restart
look ok?
sudo chmod 755 /etc/init.d/cgate sudo update-rc.d cgate defaults Don’t think you need this since you are moving to systemd
Ok, thanks. It wouldn’t let me write to nano /usr/local/bin/cgate/config/C-GateConfig.txt Permission denied.
How do I change permission?
sudo
@DarylMc, any thoughts here, homebridge starts and runs for around 20 seconds then stops.
pi@raspberrypi2:~ $ sudo systemctl status homebridge ? homebridge.service - Node.js HomeKit Server Loaded: loaded (/etc/systemd/system/homebridge.service; disabled) Active: active (running) since Mon 2019-05-13 22:12:36 AEST; 1s ago Main PID: 1241 (homebridge) CGroup: /system.slice/homebridge.service +-1241 homebridge +-1250 /bin/sh -c /bin/echo -n "$(npm -g prefix)/lib/node_modules" +-1251 node /usr/bin/npm -g prefix
May 13 22:12:37 raspberrypi2 nodejs[1241]: WARNING Please fix your application to use the native API of Avahi! May 13 22:12:37 raspberrypi2 nodejs[1241]: WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs May 13 22:12:37 raspberrypi2 nodejs[1241]: WARNING The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. May 13 22:12:37 raspberrypi2 nodejs[1241]: WARNING Please fix your application to use the native API of Avahi! May 13 22:12:37 raspberrypi2 nodejs[1241]: WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister May 13 22:12:37 raspberrypi2 homebridge[1241]: WARNING Please fix your application to use the native API of Avahi! May 13 22:12:37 raspberrypi2 homebridge[1241]: WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs May 13 22:12:37 raspberrypi2 homebridge[1241]: WARNING The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. May 13 22:12:37 raspberrypi2 homebridge[1241]: WARNING Please fix your application to use the native API of Avahi! May 13 22:12:37 raspberrypi2 homebridge[1241]: WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister
pi@raspberrypi2:~ $ sudo systemctl status homebridge ? homebridge.service - Node.js HomeKit Server Loaded: loaded (/etc/systemd/system/homebridge.service; disabled) Active: inactive (dead) since Mon 2019-05-13 22:12:40 AEST; 47s ago Process: 1241 ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS (code=exited, status=0/SUCCESS) Main PID: 1241 (code=exited, status=0/SUCCESS)
May 13 22:12:40 raspberrypi2 homebridge[1241]: [5/13/2019, 10:12:40 PM] Loading 1 platforms... May 13 22:12:40 raspberrypi2 homebridge[1241]: [5/13/2019, 10:12:40 PM] [CBus] Initializing homebridge-cbus.CBus platform... May 13 22:12:40 raspberrypi2 homebridge[1241]: Mon, 13 May 2019 12:12:40 GMT cbus:client Opening connection to C-Gate… May 13 22:12:40 raspberrypi2 homebridge[1241]: [5/13/2019, 10:12:40 PM] Loading 0 accessories... May 13 22:12:40 raspberrypi2 homebridge[1241]: Mon, 13 May 2019 12:12:40 GMT cbus:client C-Gate connection open. May 13 22:12:40 raspberrypi2 homebridge[1241]: Mon, 13 May 2019 12:12:40 GMT cbus:client Connected to C-Gate server v2.11.1 (build 3240), syntax v1.0 May 13 22:12:40 raspberrypi2 homebridge[1241]: Mon, 13 May 2019 12:12:40 GMT cbus:client Configuring C-Gate session… May 13 22:12:40 raspberrypi2 homebridge[1241]: Mon, 13 May 2019 12:12:40 GMT cbus:client C-Gate session estabished and configured at 20023:127.0.0.1 May 13 22:12:40 raspberrypi2 homebridge[1241]: Mon, 13 May 2019 12:12:40 GMT cbus:platform Loading the accessories list… May 13 22:12:40 raspberrypi2 homebridge[1241]: Mon, 13 May 2019 12:12:40 GMT cbus:platform Unable to instantiate accessory 'Bathroom Exhaust' (Fan) reason: Error: unknown accessory type 'Fan'. ABORTING
@peterconn Hi Peter Just a guess but maybe config.json has a problem. Otherwise maybe both CGate and homebridge starting together causes some problem. To try test that, wait a while after reboot for CGate to sync then stop Homebridge service and restart it. Another thing to test is if project is loaded and running on CGate.
@peterconn ...
@DarylMc so once I reboot and homebridge timer kicks in, I should force stop homebridge and let cgate start first then start homebridge?
Sent with GitHawk
@peterconn I’d try that just to make sure Cgate is started, project loaded and synced before Homebridge tries to talk to it.
If you can wait a few weeks I will try to set up myself and be more able to help
@DarylMc Can you shed some light on the client control port. With my setup it works with 20023 and also 52497?
"platforms": [{ "platform": "homebridge-cbus.CBus", "name": "CBus", "client_ip_address": "127.0.0.1", "client_controlport": 52497, "client_cbusname": "101SPARK", "client_network": 254, "client_application": 56, "client_debug": true,
"platform_export": "/home/pi/my-platform.json",
{ "bridge": { "name": "My Home", "username": "DC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-111" },
"description": "This is the My home HomeKit API configuration file.",
"platforms": [ { "platform": "homebridge-cbus.CBus", "name": "CBus", "client_ip_address": "127.0.0.1", "client_controlport": 20023, "client_cbusname": "OFFICE", "client_network": 254, "client_application": 56, "client_debug": true,
"platform_export": "/home/pi/my-platform.json",
"accessories": [
]
}
], "accessories": [ ] }
There is a PDF CGate manual in the C drive of your windows pc after you install Cbus Toolkit. You could search that for the port info. I’ve always used 20023
Use https://jsonlint.com/ to check your config if you haven’t already.
@darylmc checked and valid.
@DarylMc
So i got stretch working in my home but cant get it working in my friends. Cgate project has started and running..
That looked alright. Did you sort the problem?
Have a read how you can use journalctl I use the following sometimes and you should also be able to see CGate or other services logs too. sudo journalctl -u homebridge.service -f Or try sudo journalctl -u -f
@darylmc I initially copied my config.json and just edited the addresses to work with my friends system, for some reason it didn’t like that. So I had to manually write all the addresses, types and ID’s in config.json and it worked. I do however get a weird message “lines 1-17/17 (END)” once homebridge has started and I have to hit Ctrl C to view pi@raspberrypi:~$
Anyone got homebridge for CBUS working with raspbian stretch Lite?
stuck at this step, sudo npm install -g --unsafe-perm homebridge sudo: npm: command not found
Is this because of stretch or newer version of node js 8.11.1
Cheers
Pete