Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CBUS CGate Driver
So I got it connected on the second attempt.

I had a line in the translate field for a group that was not used and it would not connect

Field 'Bin/AC' Could not be initialized.Driver='C-Gate'

Driver C-Gate does not have a field named 'Bin/AC'

looking at t his as I type it, it is probably the / that is causing grief.

Also in C-Gate

805 cmd7 - Access control refused connection from /
805 null - Access control refused load change connection from /

znelbok Wrote:When you say all group must be listed in the translate file, do you mean all 256 groups, even if they are not used.

What about remote networks - I have a network bridge.

What is the C-Gate network number - is it the C-Bus network 254?

What is the event port?

Sorry, My C-Gate is very rusty, toolkit has done it all for me in the past.


no just the ones you use - adding unused ones will not cause a problem but / will as cgate uses the / in its addresses

Not sure on remote network - how do you address it in cgate?

default network is 254 yes

default event port is 20025

I still get the access control refused messages in the C-Gate window.

I am running C-Gate that comes with toolkit (V1.10.6) and C-Gate V2.7.1
Are they suitable?

The C-Gate project name - Is it case sensitive?

No idea on how to address remote network other than it is network 253 in my case (but could be anything - that is part of the set-up in toolkit when defining networks).

I need some more help to get this working so I can help you out.

Project name is not case senstive.

So have you the project opened in cgate? I used toolkit to make sure project was opened and initialised. You can close toolkit but dont close cgate. Once this works you can then configure teh cgate config to do this automatically.

Are you accessing cgate on the same machine ie is cgate running on your cqc server (this is how I am setup) . If you are getting access control issues you may be having a problem with the access settings in cgate.

You could try opening a telnet session from the cqc server to cgate

telnet <cgate sever> 20023

telnet <cgate server> 20025

on the 20023 you could send a command like

ON //Project/network/application/group

check the response should be something like

200 OK:

on the 20025 session you should see the event.

Let me know how you get on.
Starting to make some sense now.

I cant connect if I use the IP address, but if I use I can connect. So there must be a C-Gate setting somewhere to allow for remote connection (can you point me to where?)

All the fields are updating correctly now from the event server, but when I try to change a value I get the following response
408 Operation Failed: //<Project>/254/56/53 <some non ascii text>

I also get this if I try it at the telnet window.

408 from the manual indicates the SET, GET or other method failed for a given object

the cgate config folder has an access.txt file that has something to do with it.

I dont use the set command I use ramp set and trigger

but from telnet try the ON command

ON //project/254/56/53
The On command is what gives the error (as does off and ramp).

408 must be a generic error reply.

It must be something specific to my setup becuase I just tried this on a totally seperate system and it works fine.

My toolkit is old and thus so is my C-Gate.

I will update at home tonight.

Are there any specific tests you want me to run.

Keep up the good work.

Additional requests
- ability to reload the translate file
- passthrough field to allow commands to be sent to C-Gate that may not need a field.
- Polling of temp sensors.
- polling of light level sensors.
more feedback

I changed the access.txt file for C-Gate and restarted it. The CQC Driver did not re-connect to C-Gate automatically. I had to reconfigure the driver to get it to re-connect (as can be seen in C-Gate when the connection is made).

I then started to get a lot of 408 errors again.

Worked out that unless I scan the network in toolkit, the driver does not work - so the scan network must trigger something in C-Gate to open the connection (whcih i was not doing on my system).
Once scanned, all commands worked fine.

so I then went back to check the re-connecting issue, killed C-Gate while CQC was connected, restarted toolkit and C-Gate and scanned the network in toolkit. CQC was not able to get updates or send commands to C-Gate.

So it would seem that there would need to be some sort of re-connect field (it can be done by re-configuring the driver in the admin panel).
This then allowed the driver to send successfull commands, but the monitoring on port 20025 was not working. I could see changes in the field value when I would write the value out via the driver, but if the group was changed elsewhere, the field was not updated in the driver.

Not sure how to get around this one, maybe as I suggested above that with a reconnect field you could re-establish this connection.


Edit*** That last bit about port 20025 may be wrong. I went backj to it and it was working OK - go figure?
yes you have to scan to get the project opened.

Now to avoid that you need to setup cgate to start automatically on startup or setup as a service - you need to search the cbus forums to see how to do this

I followed the xyntservice option in this post

and change the cgate config file




this shoudl initialise the project

Note it takes cgate 2-3 minutes before its ready for monitoring

Why would you want to reload translation file on the fly? Wouldn't have thought this file would change much?

On connection - the driver only signlas a connect if it gets the ip connection ie cgate is running. If the ip connect fails then cqc takes care of retrying.

If there is a valid connection but project not loaded this should not force a reconnection as there is no need - once project is loaded it will start working.

The software reads the group state for each group on connection so this feature is lost if the cgate is not ready when the connection is first made so maybe we could add an update state flag however my understanding is that cgate does not retrieve the state from each device but maintains a map of state based on cbus network events so state may not match the actual state.

The cgate command field is something I intend to add and hopefully I can capture the response in a return field that might solve your other issues as I dont have a temp sensor.
martinmcc Wrote:Why would you want to reload translation file on the fly? Wouldn't have thought this file would change much?
Because as you add new loads, such as fans, blinds etc (lights would not change much) you dont want to have to unload the driver to get it to re-read the file.
It is trivial to add it into the driver

Quote:The cgate command field is something I intend to add and hopefully I can capture the response in a return field that might solve your other issues as I dont have a temp sensor.
There is a blurb on how to do it on the C-Bus forums (which a link appears in the original C-bus thread). When I find it I will post it. - looks like its for polling with a PCI and not C-Gate.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Monoprice Blackbird 4x4 HDMI Switcher - Driver request batwater 14 6,002 02-10-2018, 02:29 PM
Last Post: batwater
  LIFX Driver bobskie708 9 460 01-30-2018, 12:34 PM
Last Post: jkmonroe
  SNMP Driver wuench 115 258,310 01-01-2018, 05:18 PM
Last Post: Dean Roddey
  Sony Bravia TV Driver znelbok 6 363 12-27-2017, 08:03 AM
Last Post: jkmonroe
  Samsung SmartTV driver? sic0048 3 441 12-17-2017, 11:51 AM
Last Post: Dean Roddey
  Vantage Controls Driver for Infusion System KenC 3 1,119 10-23-2017, 12:10 PM
Last Post: Dean Roddey
  Another SMS Driver - SMS Global, one for everyone else znelbok 21 6,680 10-21-2017, 07:19 PM
Last Post: znelbok
  XBMC Driver wuench 419 131,925 07-02-2017, 11:04 AM
Last Post: Dean Roddey
  IMAP Email Driver whozeawhat 11 3,163 06-14-2017, 11:53 AM
Last Post: whozeawhat
  Which JVC Projector Driver indygreg 29 7,581 05-12-2017, 08:29 AM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)