Page 15 of 16

Re: HS3 MQTT Plugin

Posted: Tue Nov 28, 2017 5:43 pm
by taylormia
You will have to use a couple of events to sync the actual POWER status of the Sonoff with the Control device. I explained how to do this in the guide I put together which is referenced in my previous post.

Re: HS3 MQTT Plugin

Posted: Fri Dec 01, 2017 10:11 pm
by taylormia
I have an MQTT broker that works when I publish a topic/payload to turn off and on a Sonoff S20 plug with MQTT firmware.

But I have tried various things to be able to control a non-MQTT (i.e Zwave) device by publishing the default topic "homeseer/device reference ID/value" and payload/message=99 to turn the switch on, with no luck.

I'm not sure what I'm missing.

My device is a Homeseer Dimmer Zwave switch with Reference ID 182. I also have a websockets MQTT client to publish control topics and subscribe to status messages.

Can someone tell me what to configure in the MQTT plugin to be able to turn on/off this switch by publishing an MQTT topic/message from outside of HS3 i.e. an external MQTT client?

Thanks

Re: HS3 MQTT Plugin

Posted: Mon Dec 04, 2017 7:46 pm
by taylormia
I have created a subscription in HS3 for the light switch I want to control and have created an event with "Publish Custom Topic" to manually turn off the light. When I trigger the event, I see it in the log but the light does not turn off. What am I missing? See screenshots below.



This is the device I want to control that I have created a subscription for:

Image


Here is the subscription for the above device:

Image



Here is the event to turn off the light by publishing the topic of the subscription above:

Image



Here is the log showing that the pubished topic was received with a payload of "0" i.e. Off.


Image

Re: HS3 MQTT Plugin

Posted: Tue Dec 05, 2017 12:39 am
by taylormia
Question for Geert-Jan (Plugin Author) or anybody in the know:

Can a non-MQTT enabled Homeseer device be controlled via MQTT? If so, how?

Thanks

Re: HS3 MQTT Plugin

Posted: Wed Dec 06, 2017 12:41 am
by taylormia
Finally, I have been able to control an HS3 Zwave device via MQTT from an external source. Thanks to @Eman for his patience and pointing me in the right direction.
The HS3 device I want to control is a HS3 HS-WD100+ which is controlled by a Homeseer ZNET.

First I add a Manual Subscription in the HS3 MQTT Plugin for the topic "familyroom/light" which creates a virtual MQTT subscription device you see below:
Image

Then, I create an Event that uses the payload value of the MQTT "familyroom/light" subscription device as a trigger to cause the action of turning off the Zwave HS3 switch device "Family Room Light"
Image

The external source for the MQTT message is Node-Red where I inject i.e Publish the "familyroom/light" topic to the MQTT broker with a payload of "0"
Image

HS3 by way of the MQTT Plugin subscribes to this topic via the subscription device "familyroom/light" and the Event "Turn Family Room Light Off" causes the HS3 Zwave switch to be turned Off
Image

Re: HS3 MQTT Plugin

Posted: Tue Dec 12, 2017 5:36 am
by rgerrans
I'm brand new to HomeSeer and am just using it to connect my Zwave devices to Node-Red. For the control side I've just been setting up virtual devices with the same Status Values as my physical devices and then linking the virtual device to the physical device. That seems a lot simpler to me than setting up a bunch of one off events.

Re: HS3 MQTT Plugin

Posted: Tue Dec 12, 2017 6:38 pm
by taylormia
Can you show and example with screenshots from Node-Red and Homeseer?

Re: HS3 MQTT Plugin

Posted: Sun Dec 17, 2017 6:13 pm
by rgerrans
Sorry for the delayed response. Just figured out how to setup reply notifications.

How I have mine setup is I use two flavors of mqtt topics for each device (home/[room]/[device] for status from HomeSeer and home/[room]/[device]/set to send commands to HomeSeer. So for example in HomeSeer I have my Dining Room Main Light set up to publish it's status to mqtt:
HS-Out.JPG
HS-Out.JPG (77.93 KiB) Viewed 22984 times
Then in Node-Red I bring that in through an mqtt-In node:
NR-In.JPG
NR-In.JPG (36.13 KiB) Viewed 22984 times
Then in Node-Red when I have a rule set to act on the light I publish that back through my /set topic using an mqtt-out node:
NR-Out.JPG
NR-Out.JPG (41.97 KiB) Viewed 22984 times
In HomeSeer I subscribe to the /set mqtt topic:
HS-In.JPG
HS-In.JPG (45.16 KiB) Viewed 22984 times
And assign that to a virtual device which I link back to my physical device (I did have to update to the most recent version of HomeSeer to get this option):
HS-D1.JPG
HS-D1.JPG (83.85 KiB) Viewed 22984 times
And setup the status options to mirror the physical device (not sure this is 100% necessary but if I remember right it didn't work until I did):
HS-D2.JPG
HS-D2.JPG (82.28 KiB) Viewed 22984 times
Let me know if that helps or any other information I can provide.

HS3 MQTT Plugin errors

Posted: Tue Dec 19, 2017 6:48 pm
by dad
Hi,

Just updated my HS3 to 3.0.0.388 with the MQTT plugin 1.5.0.0 (running on RPI 2) and I have noticed the following intermittent error messages in the logs:

"Dec-19 15:02:42 Warning Plugin MQTT is not processing events quickly enough or is not responding, the HS event will not be processed, queue is full, last event: VALUE_CHANGE"

Not sure if it is related to the update or something else?

D

Re: HS3 MQTT Plugin

Posted: Tue Jan 02, 2018 5:28 am
by wrbrower
Am I doing something wrong?
Trying to send an MQTT command to an ESP Easy LCD display.
The attached picture works fine - the LCD updates.
But I need to transfer this ability to a script - so I did this: &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
I get this: Running script(2) &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"}), init error: Invalid character
I am basing that script off of the MQTT Plugin description: Example: hs.PluginFunction("MQTT", "", "publish", {"/tmp/myTopic", "1234"})

Thank you everyone!

Re: HS3 MQTT Plugin

Posted: Sun Jan 07, 2018 7:45 pm
by geert-jan
Hi,

change &hs to &nhs and it should work.

Code: Select all

&nhs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
In a script you can use:

Code: Select all

dim result as object
result=hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
Regards,
Geert-Jan

Re: HS3 MQTT Plugin

Posted: Tue Jan 16, 2018 12:07 am
by rgerrans
Is there anyway to delete mqtt subscription entries? I had a typo in one and it seems to be conflicting with the replacement I put in place even though I deleted the device.

Re: HS3 MQTT Plugin

Posted: Wed Jan 17, 2018 8:17 am
by geert-jan
Deleting the device should be sufficient. If you stop and start the plugin the list of subscriptions is rebuild, maybe that can help.
What is exactly conflicting?

Regards,
Geert-Jan

Re: HS3 MQTT Plugin

Posted: Wed Jan 17, 2018 8:32 pm
by rgerrans
Thanks, that solved the problem.

My first one was "home/masterBathroom/southSInkLight/set" (with the capital I). When I tried it as "home/masterBathroom/southSinkLight/set" the next time it assigned it to that same device and seemed to put a tab in front of it that showed up as a bunch of spaces in the data field and the virtual device wasn't picking up the topic. So I deleted that device and tried a third time and it got the address right but the virtual device wasn't picking up the commands.

Re: HS3 MQTT Plugin

Posted: Mon Feb 26, 2018 9:26 pm
by raymonvdm
The MQTT topics the plugin is sending start with /homeseer/# is it possible to change this to homeseer/# I would like homeseer as input for mqttwarn (MQTT to Carbon) but when the MQTT topic is converter to carbon topic the value becomes (.homeseer.498.value) invalid for a Carbon server. It needs to be homeseer.498.value

Is possible to change this?

https://github.com/jpmens/mqttwarn/issues/161