Author Topic: MQTT Client Plugin  (Read 28352 times)

Offline Snaxmuppet

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
Re: MQTT Client Plugin
« Reply #15 on: January 20, 2016, 05:41:49 pm »
How then do I specify the MQTT topic and which device?

Offline SchattenMann

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #16 on: January 21, 2016, 05:14:16 am »
How then do I specify the MQTT topic and which device?

For now Topic is hard-coded (next on the to-do list pile)

It will either be Vera/Events/<DEVICE ID> or Vera/Events/<DEVICE ALIAS>

And you don't need to specify which device you want to monitor, that's just unnecessary work and a PITA if you have 100 devices.
You simply set which variables you want to monitor and all devices with those variables will publish status updates - you may then subscribe only the Topics you actually want to monitor but odds are if you need MQTT you're using something like node-red for all your logic and this is a huge help

Offline Snaxmuppet

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
Re: MQTT Client Plugin
« Reply #17 on: January 21, 2016, 05:25:17 am »
Fantastic!

All working.

Thank you for your efforts :)

Offline SchattenMann

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #18 on: January 21, 2016, 05:27:11 am »
Fantastic!

All working.

Thank you for your efforts :)

glad you like it

Offline stefaanbolle

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #19 on: January 21, 2016, 06:15:32 am »
I installed the dependencies and the plugin file and created the device.
The device state is 'connected' and I've selected a couple of parameters to monitor.
However, when subscribing to Vera/# I do not see any messages.
Any idea where I can troubleshoot/see logs for this plugin?

Offline Snaxmuppet

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
Re: MQTT Client Plugin
« Reply #20 on: January 21, 2016, 06:17:43 am »
I had the same issue. You may have the same problem I had...

The messages it sends are not persistent. You have to action something on the Vera while being subscribed to the MQTT topic so you can see it as the message is published.

Offline SchattenMann

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #21 on: January 21, 2016, 06:18:18 am »
I installed the dependencies and the plugin file and created the device.
The device state is 'connected' and I've selected a couple of parameters to monitor.
However, when subscribing to Vera/# I do not see any messages.
Any idea where I can troubleshoot/see logs for this plugin?

You can see the last published message on the Plugin Settings tab.
You can also monitor Vera's log or your MQTT Broker's log.

Offline SchattenMann

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #22 on: January 21, 2016, 06:19:08 am »
I had the same issue. You may have the same problem I had...

The messages it sends are not persistent. You have to action something on the Vera while being subscribed to the MQTT topic so you can see it as the message is published.

Yeah that's correct, thanks Snaxmuppet

Offline stefaanbolle

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #23 on: January 21, 2016, 06:22:14 am »
Thanks, I'll check it out

Offline Snaxmuppet

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
Re: MQTT Client Plugin
« Reply #24 on: January 21, 2016, 06:36:41 am »
I am finding that the messages are sent for a while and then they stop. Right now I left it half an hour and then switched on the monitored device and the MQTT message wasn't sent. Tried several times. Checked the Last Message on Setting on the device and the last message was from half an hour ago so it isn't sending the message.

However, while I am writing this I checked the watchdog and resaved it and then I switched it again and now it is working.

All a bit strange.

Offline SchattenMann

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #25 on: January 21, 2016, 06:38:53 am »
bit strange, I haven't experienced any problems so far.
What type of device are we talking about?

Offline Snaxmuppet

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
Re: MQTT Client Plugin
« Reply #26 on: January 21, 2016, 07:13:01 am »
It is a TZ88E Power Meter Socket.

Offline SchattenMann

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #27 on: January 21, 2016, 07:15:58 am »
It is a TZ88E Power Meter Socket.

What Variables are you monitoring (that wasn't published to MQTT)?
I do have a few TKB on the bench that I'm using for testing purposes and haven't seen any problems so far...haven't tried with Power Meter though, only status changes.
Bottom line is I'm using variable watches and when *something* changes then it has to be triggered unless there's something wrong with the code in which case an error should be logged

Offline Snaxmuppet

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
Re: MQTT Client Plugin
« Reply #28 on: January 21, 2016, 07:50:34 am »
Only monitoring urn:upnp-org:serviceId:SwitchPower1 with the Status variable.

It is working... just intermittently it seems although it seems pretty stable and consistent at the moment. It was just that long gap between switching that seemed to put it to sleep.

Offline SchattenMann

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +4/-1
Re: MQTT Client Plugin
« Reply #29 on: January 21, 2016, 08:07:22 am »
Only monitoring urn:upnp-org:serviceId:SwitchPower1 with the Status variable.

It is working... just intermittently it seems although it seems pretty stable and consistent at the moment. It was just that long gap between switching that seemed to put it to sleep.

Not really sure what to say TBH, that never happened to me even though i just tested it in a system that wasn't "touched" for two days.