HS3 MQTT Plugin

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

Moderator: Willem4ever

taylormia
Starting Member
Starting Member
Posts: 7
Joined: Mon Nov 27, 2017 3:43 pm

Re: HS3 MQTT Plugin

Post 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.
taylormia
Starting Member
Starting Member
Posts: 7
Joined: Mon Nov 27, 2017 3:43 pm

Re: HS3 MQTT Plugin

Post 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
taylormia
Starting Member
Starting Member
Posts: 7
Joined: Mon Nov 27, 2017 3:43 pm

Re: HS3 MQTT Plugin

Post 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
taylormia
Starting Member
Starting Member
Posts: 7
Joined: Mon Nov 27, 2017 3:43 pm

Re: HS3 MQTT Plugin

Post 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
taylormia
Starting Member
Starting Member
Posts: 7
Joined: Mon Nov 27, 2017 3:43 pm

Re: HS3 MQTT Plugin

Post 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
rgerrans
Starting Member
Starting Member
Posts: 6
Joined: Tue Dec 12, 2017 5:33 am

Re: HS3 MQTT Plugin

Post 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.
taylormia
Starting Member
Starting Member
Posts: 7
Joined: Mon Nov 27, 2017 3:43 pm

Re: HS3 MQTT Plugin

Post by taylormia »

Can you show and example with screenshots from Node-Red and Homeseer?
rgerrans
Starting Member
Starting Member
Posts: 6
Joined: Tue Dec 12, 2017 5:33 am

Re: HS3 MQTT Plugin

Post 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 22798 times
Then in Node-Red I bring that in through an mqtt-In node:
NR-In.JPG
NR-In.JPG (36.13 KiB) Viewed 22798 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 22798 times
In HomeSeer I subscribe to the /set mqtt topic:
HS-In.JPG
HS-In.JPG (45.16 KiB) Viewed 22798 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 22798 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 22798 times
Let me know if that helps or any other information I can provide.
dad
Starting Member
Starting Member
Posts: 30
Joined: Thu Jun 13, 2013 10:20 pm

HS3 MQTT Plugin errors

Post 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
wrbrower
Starting Member
Starting Member
Posts: 1
Joined: Tue Jan 02, 2018 3:28 am

Re: HS3 MQTT Plugin

Post 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!
Attachments
ScreenHunter_10 Jan. 01 19.19.jpg
ScreenHunter_10 Jan. 01 19.19.jpg (20.92 KiB) Viewed 22398 times
geert-jan
Member
Member
Posts: 126
Joined: Sat Nov 27, 2010 7:23 pm

Re: HS3 MQTT Plugin

Post 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
rgerrans
Starting Member
Starting Member
Posts: 6
Joined: Tue Dec 12, 2017 5:33 am

Re: HS3 MQTT Plugin

Post 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.
geert-jan
Member
Member
Posts: 126
Joined: Sat Nov 27, 2010 7:23 pm

Re: HS3 MQTT Plugin

Post 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
rgerrans
Starting Member
Starting Member
Posts: 6
Joined: Tue Dec 12, 2017 5:33 am

Re: HS3 MQTT Plugin

Post 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.
raymonvdm
Senior Member
Senior Member
Posts: 1153
Joined: Sun Dec 18, 2011 1:23 am

Re: HS3 MQTT Plugin

Post 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
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Post Reply

Return to “Homeseer MQTT Plugin Forum”