Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CBUS CGate Driver
#11
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 /192.168.0.33
805 null - Access control refused load change connection from /192.169.0.33

Mick
Reply
#12
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.

Mick


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

Martin
Reply
#13
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.

Mick
Reply
#14
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


also
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.
Reply
#15
Starting to make some sense now.

I cant connect if I use the IP address, but if I use 127.0.0.1 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

Mick
Reply
#16
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
Reply
#17
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.
Reply
#18
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.

Mick

Edit*** That last bit about port 20025 may be wrong. I went backj to it and it was working OK - go figure?
Reply
#19
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

http://www.cbusforums.com/forums/showthread.php?t=3355



and change the cgate config file

change

project.default=<project>


project.start=<project>


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.
Reply
#20
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.

http://www.cbusforums.com/forums/showthread.php?t=1229 - looks like its for polling with a PCI and not C-Gate.

Mick
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  LIFX Driver bobskie708 12 2,148 11-26-2018, 05:23 PM
Last Post: Dean Roddey
  Driver for Bigass Fan lleo 7 224 11-25-2018, 08:57 AM
Last Post: Dean Roddey
  Amazon Echo Hue Simulator Driver wuench 115 41,942 11-08-2018, 06:49 AM
Last Post: karenlee
  RunTimer2 driver rbroders 14 4,177 10-15-2018, 11:45 AM
Last Post: rbroders
  Generic Modbus Driver - Serial & IP znelbok 25 12,622 10-09-2018, 08:59 AM
Last Post: Ron Haley
  Issues debugging IP based driver jnolting 5 568 09-24-2018, 11:52 AM
Last Post: Dean Roddey
  Enhance Driver Test Harness Field Monitor rbroders 1 323 09-24-2018, 10:49 AM
Last Post: Dean Roddey
  Koyo Click PLC Driver rbroders 75 29,100 09-23-2018, 01:18 PM
Last Post: rbroders
  Carrier Infinity HVAC Driver beelzerob 34 13,963 09-07-2018, 01:15 PM
Last Post: lleo
  Sony TV IP driver dogman 10 1,361 08-01-2018, 03:53 PM
Last Post: znelbok

Forum Jump:


Users browsing this thread: 1 Guest(s)