kservices / gBridge

gBridge.io allows you to control (almost) anything with Google Assistant, by translating voice commands to MQTT messages.
https://about.gbridge.io
MIT License
173 stars 46 forks source link

Not able to change the topic name on self hosted docker instance #14

Closed giejay closed 5 years ago

giejay commented 5 years ago

I'm running this awesome bridge on my raspberry pi 3 with Docker.

Had some troubles at first with getting it all up and running but now it works quite well. The only thing which is not working, is changing the topic name of a device.

For example, I created a test light, changed the "d1" into "Dinner_Light" so: gBridge/u1/Dinner_Light/onoff but it still keeps on posting message to the gBridge/u1/d1/onoff topic:

{'Verb': 'PUBLISH', 'Retain': False, 'Topic': 'gBridge/u1/d1/onoff', 'DUP': 0, 'QoS': 0, 'Payload': b'1'}

Another thing I noticed is that the redis client is always subscribing to the default topics:

redis-worker_1_2301abc11820 | Redis client (subscribe) successful subscribe to gbridge:u*:d*:*

Edit: The reason I want to change the name is that I'm developing a plugin for domoticz, and I want the index of the device, or the friendly name of the device in the topic name, so I can easily toggle a device by id/name in the Python plugin.

One thing I should mention is that I wasn't able to change the topic names in the frontend at first, due to possibly an old version of the ARM image, and that I pulled the git repo, and "manually" coupled the /var/www of the image to the newer sources.

volumes:
         - /home/pi/gbridge/gBridge/web:/var/www

Maybe the redis container is also outdated?

giejay commented 5 years ago

The redis arm image was outdated, build a new one myself and now it works, closing this issue