My guess is that you have to keep the MQTT topic topic “tree-depth”:
denkovi-relay/q4/state/set
So the format should be
x/y/z/ž 
I think that bcg gateway is using some wildcards ? in the MQTT topics. We did this probably so it is similar to existing style of topics.
let me know the result, send me application.c if you could not get it work.
Also try to update the dongle firmware. I think that anything above 1.8.0 is fine, but please test the latest version as the last option.
Martin