HS3 MQTT Plugin

Alles m.b.t. de Homeseer MQTT Broker Plugin van Willem Eradus (Dutch Forum)

Moderator: Willem4ever

Re: HS3 MQTT Plugin

Postby taylormia » Tue Nov 28, 2017 4:43 pm

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.
taylormia
Starting Member
Starting Member
 
Posts: 7
Joined: November 2017

Re: HS3 MQTT Plugin

Postby taylormia » Fri Dec 01, 2017 9:11 pm

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
taylormia
Starting Member
Starting Member
 
Posts: 7
Joined: November 2017

Re: HS3 MQTT Plugin

Postby taylormia » Mon Dec 04, 2017 6:46 pm

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
taylormia
Starting Member
Starting Member
 
Posts: 7
Joined: November 2017

Re: HS3 MQTT Plugin

Postby taylormia » Mon Dec 04, 2017 11:39 pm

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
taylormia
Starting Member
Starting Member
 
Posts: 7
Joined: November 2017

Re: HS3 MQTT Plugin

Postby taylormia » Tue Dec 05, 2017 11:41 pm

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
taylormia
Starting Member
Starting Member
 
Posts: 7
Joined: November 2017

Re: HS3 MQTT Plugin

Postby rgerrans » Tue Dec 12, 2017 4:36 am

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.
rgerrans
Starting Member
Starting Member
 
Posts: 6
Joined: December 2017

Re: HS3 MQTT Plugin

Postby taylormia » Tue Dec 12, 2017 5:38 pm

Can you show and example with screenshots from Node-Red and Homeseer?
taylormia
Starting Member
Starting Member
 
Posts: 7
Joined: November 2017

Re: HS3 MQTT Plugin

Postby rgerrans » Sun Dec 17, 2017 5:13 pm

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 3033 times


Then in Node-Red I bring that in through an mqtt-In node:
NR-In.JPG
NR-In.JPG (36.13 KiB) Viewed 3033 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 3033 times


In HomeSeer I subscribe to the /set mqtt topic:
HS-In.JPG
HS-In.JPG (45.16 KiB) Viewed 3033 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 3033 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 3033 times


Let me know if that helps or any other information I can provide.
rgerrans
Starting Member
Starting Member
 
Posts: 6
Joined: December 2017

HS3 MQTT Plugin errors

Postby dad » Tue Dec 19, 2017 5:48 pm

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
dad
Starting Member
Starting Member
 
Posts: 30
Joined: June 2013

Re: HS3 MQTT Plugin

Postby wrbrower » Tue Jan 02, 2018 4:28 am

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!
Attachments
ScreenHunter_10 Jan. 01 19.19.jpg
ScreenHunter_10 Jan. 01 19.19.jpg (20.92 KiB) Viewed 2633 times
wrbrower
Starting Member
Starting Member
 
Posts: 1
Joined: January 2018

Re: HS3 MQTT Plugin

Postby geert-jan » Sun Jan 07, 2018 6:45 pm

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
geert-jan
Member
Member
 
Posts: 125
Joined: November 2010

Re: HS3 MQTT Plugin

Postby rgerrans » Mon Jan 15, 2018 11:07 pm

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.
rgerrans
Starting Member
Starting Member
 
Posts: 6
Joined: December 2017

Re: HS3 MQTT Plugin

Postby geert-jan » Wed Jan 17, 2018 7:17 am

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
geert-jan
Member
Member
 
Posts: 125
Joined: November 2010

Re: HS3 MQTT Plugin

Postby rgerrans » Wed Jan 17, 2018 7:32 pm

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.
rgerrans
Starting Member
Starting Member
 
Posts: 6
Joined: December 2017

Re: HS3 MQTT Plugin

Postby raymonvdm » Mon Feb 26, 2018 8:26 pm

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
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
raymonvdm
Senior Member
Senior Member
 
Posts: 1145
Joined: December 2011

PreviousNext

Return to Homeseer MQTT Plugin Forum

Who is online

Users browsing this forum: No registered users and 1 guest