Closed hallard closed 5 years ago
Hi, Thanks for your PR. I'll have a look on my system and do some tests.
Hi, no problem, should works but saw a strange thing with MQTT FX, under certain circonstance broker disconnected me when filtering by model, I don't know if it's related to my broker (MOSQUITTO) or my client (MQTTFX)
xiaomi/from/+/+/sensor_ht/#
All other filtering works well, strange.
Hi, I've quickly done some tests, so far it's okey.
I added a similar feature in homebridge-mqtt
and I'd like to handle it in the same way, I used topic_type
single
or multiple
. topic_mode
is also okey so you don't have to change that however the setting from
and to
are used to define the direction.
So would you please change the topic_mode settings to something like short
, full
and both
or multiple
, single
and both
.
I'd like to keep the README as simple as possible, the samples about filtering are mqtt features, I'd propose to move these examples to the Wiki and just add a link to the Wiki in README.
In your config.json examples you have to remove the last commas.
"heartbeatfreq": 6,
You can use https://jsonlint.com/ to validate
...
Note this apply only to gateway heartbeat not the device's one.
Devices also decrement the counter. add this log.debug to see what happens:
case "heartbeat":
if (hb_count > 1) {
log.debug('count '+hb_count+' model '+msg.model);
It's done:
from
to short
please give a test, done that in a hurry ;-)
full
and use mqtt this way:xiaomi/from/#
Yeah I agree and understand, but, I'm using both, to keep compatibility for old version that don't know the new features (and don't need) and if for example I'm using xiaomi/from/#
and jeedom listening to xiaomi/from
, will it work?
Okey, let's keep the both
setting, however it doesn't make sense to send the same data twice. It's better to change the subscriber topic.
New features:
xiaomi/from/{{sid}}/{{cmd}}/{{model}}
that will allow filtering for subscribers