HS3 MQTT Plugin
Moderator: Willem4ever
Re: HS3 MQTT Plugin
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
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
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
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:

Here is the subscription for the above device:

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

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

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

Here is the subscription for the above device:

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

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

Re: HS3 MQTT Plugin
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
Can a non-MQTT enabled Homeseer device be controlled via MQTT? If so, how?
Thanks
Re: HS3 MQTT Plugin
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:

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"

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"

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

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:

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"

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"

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

Re: HS3 MQTT Plugin
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
Can you show and example with screenshots from Node-Red and Homeseer?
Re: HS3 MQTT Plugin
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: Then in Node-Red I bring that in through an mqtt-In node: 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: In HomeSeer I subscribe to the /set mqtt topic: 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): 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): Let me know if that helps or any other information I can provide.
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: Then in Node-Red I bring that in through an mqtt-In node: 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: In HomeSeer I subscribe to the /set mqtt topic: 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): 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): Let me know if that helps or any other information I can provide.
HS3 MQTT Plugin errors
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
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
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!
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 (20.92 KiB) Viewed 27354 times
Re: HS3 MQTT Plugin
Hi,
change &hs to &nhs and it should work.
In a script you can use:
Regards,
Geert-Jan
change &hs to &nhs and it should work.
Code: Select all
&nhs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
Code: Select all
dim result as object
result=hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
Geert-Jan
Re: HS3 MQTT Plugin
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
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
What is exactly conflicting?
Regards,
Geert-Jan
Re: HS3 MQTT Plugin
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.
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
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
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