www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer General Discussion Area

HomeSeer General Discussion Area General discussion about HomeSeer that does not fall into any other category or are not specific to 1.x or 2.x versions of HomeSeer.

Reply
 
Thread Tools Display Modes
  #81  
Old December 13th, 2017, 01:09 PM
Fischi Fischi is offline
Seer Master
 
Join Date: Oct 2012
Location: Germany
Posts: 518
Talking

Hi Eman,
I've tried to create an event with publish custom topic
topic : /sonos
message : $$DVR:1569:
but the msg.payload in nodered is still $$DVR:1569: instead of the
value of my temperature sensor.
And that's the reason SONOS says "Dollar Dollar ......." .
I'll go another way and send the temperature value with MQTT from
HomeSeer to nodered and add a function node in my nodered flow where I add my text
"Die Aussentemperatur beträgt" and "Grad Celsius" .
I thought I could use the HS Mqtt plugin to do this by an MQTT event
with 'publish custom topic"'but I think in the message field I can only
write text and no replacement variables.
I think it would be possible from the HomeSeer side but only with special
scripting.

Regards,
Fischi
Reply With Quote
  #82  
Old December 13th, 2017, 02:17 PM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by Fischi View Post
Hi Eman,
I've tried to create an event with publish custom topic
topic : /sonos
message : $$DVR:1569:
but the msg.payload in nodered is still $$DVR:1569: instead of the
value of my temperature sensor.
And that's the reason SONOS says "Dollar Dollar ......." .
I'll go another way and send the temperature value with MQTT from
HomeSeer to nodered and add a function node in my nodered flow where I add my text
"Die Aussentemperatur beträgt" and "Grad Celsius" .
I thought I could use the HS Mqtt plugin to do this by an MQTT event
with 'publish custom topic"'but I think in the message field I can only
write text and no replacement variables.
I think it would be possible from the HomeSeer side but only with special
scripting.

Regards,
Fischi
There is no way HomeSeer is going to speak a message round trip to Node-RED and back just the way are you doing it. That's why you are having problems. Yes HS3 will speak your device value but there's no reason to send the message from Node-RED.
If say the set point of your sensor was reached then you would create an event of that device with in HS3.
If it was Node-RED sending the value then MQTT in HomeSeer would subscribe to that value and thus a device created and HS3 would speak that value.. If you send an Mqtt message and subscribe to a new device ID is created in HomeSeer.

NOTE: To create devices that you subscribed to you have to click the add button on left.

Eman.

Last edited by Eman; April 24th, 2018 at 09:11 PM.
Reply With Quote
  #83  
Old December 13th, 2017, 07:49 PM
rxmas rxmas is offline
Seer
 
Join Date: Dec 2017
Location: Cali
Posts: 8
MQTT in the ESP8266 WemosD1Mini

Hello, I've learned a lot here but am missing the final piece in my puzzle.
I set up a RPI3 with Mosquitto and verified it sends and receives.

My HS is a HS2 and I have loaded the MQTT plugin.

I want to send a payload from HS to a Wemos D1 Mini to make a single GPIO pin close a relay for 2 seconds to open or close my garage door, then report the open/closed status based on either a tilt sensor (already in HS) or magnetic sensors.

What do I put on the Wemos to make it listen for MQTT packets and respond?

Thank you in advance for any advice/help.
Reply With Quote
  #84  
Old December 13th, 2017, 08:20 PM
taylormia taylormia is offline
Seer Plus
 
Join Date: Aug 2015
Location: USA
Posts: 94
To start you should flash the ESPEasy firmware on the Wemos D1. ESPEasy has an MQTT stack - the protocol to use would be "openHAB MQTT"
http://www.twoenter.nl/blog/en/ardui...wemos-d1-mini/

Read up on the required ESPEasy configuration for GPIO pins etc:
https://www.letscontrolit.com/wiki/i..._web_interface

Then use Step 3 in my guide here to configure HS3 for control via MQTT:
https://forums.homeseer.com/showpost...2&postcount=60
Reply With Quote
  #85  
Old December 13th, 2017, 08:20 PM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by rxmas View Post
Hello, I've learned a lot here but am missing the final piece in my puzzle.
I set up a RPI3 with Mosquitto and verified it sends and receives.

My HS is a HS2 and I have loaded the MQTT plugin.

I want to send a payload from HS to a Wemos D1 Mini to make a single GPIO pin close a relay for 2 seconds to open or close my garage door, then report the open/closed status based on either a tilt sensor (already in HS) or magnetic sensors.

What do I put on the Wemos to make it listen for MQTT packets and respond?

Thank you in advance for any advice/help.


First off this plugin is for HS3.
The second point is if your Wemos device doesn't have a plugin in HomeSeer then it can't be controlled. But only if your device was mqtt ( which I think can be) based like the ESP2866 then you could load mqtt on it then add it the group of devices you want to control with the mqtt plugin. All you would do is to publish custom topics of what you want.

Here: http://jpmens.net/2016/03/22/mqtt-on-an-esp8266-thing/ There is a good topic about the Wemos thingie!

But if still inquisitive the go here : https://www.domoticaforum.eu/viewfor...297beabb71713a and ask the author of the plugin.



Eman.
Reply With Quote
  #86  
Old December 13th, 2017, 09:07 PM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by Fischi View Post
Hi Eman,
I've tried to create an event with publish custom topic
topic : /sonos
message : $$DVR:1569:
but the msg.payload in nodered is still $$DVR:1569: instead of the
value of my temperature sensor.
And that's the reason SONOS says "Dollar Dollar ......." .
I'll go another way and send the temperature value with MQTT from
HomeSeer to nodered and add a function node in my nodered flow where I add my text
"Die Aussentemperatur beträgt" and "Grad Celsius" .
I thought I could use the HS Mqtt plugin to do this by an MQTT event
with 'publish custom topic"'but I think in the message field I can only
write text and no replacement variables.
I think it would be possible from the HomeSeer side but only with special
scripting.

Regards,
Fischi


Hello Fischi,

I had another hard look at your explanation above and it looks like you are sending topics from HomeSeer to Node-RED. And it seems you are using the Sonos control of Node-RED ==>https://flows.nodered.org/node/node-red-contrib-sonos.

What I can tell is Node-RED can't speak HomeSeer language thus ===> $$DVR:1569: So in order to do what you on about, the sensor has to be connected to Node-RED with some node .

So to sum it all up your question if am not wrong would be "how would you publish the value of your sensor from HomeSeer to Node-RED?"

To publish your devices you add them using the PUBLISH button. See this image here : https://forums.homeseer.com/showpost...4&postcount=67 then have Node-RED subscribe to the those topics.

It would be much more easier for either Node-RED or HS3 to handle the sensor and do the Speaking. Both have the Sonos plugins. But if you deside Node-RED then you can also add an mqtt topic to HS3 to create a device and do something with that as well.




Eman.
Reply With Quote
  #87  
Old December 13th, 2017, 09:10 PM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by taylormia View Post
To start you should flash the ESPEasy firmware on the Wemos D1. ESPEasy has an MQTT stack - the protocol to use would be "openHAB MQTT"
http://www.twoenter.nl/blog/en/ardui...wemos-d1-mini/

Read up on the required ESPEasy configuration for GPIO pins etc:
https://www.letscontrolit.com/wiki/i..._web_interface

Then use Step 3 in my guide here to configure HS3 for control via MQTT:
https://forums.homeseer.com/showpost...2&postcount=60


Nice one man @taylormia

you got there first.


Eman.
Reply With Quote
  #88  
Old December 15th, 2017, 07:05 PM
rxmas rxmas is offline
Seer
 
Join Date: Dec 2017
Location: Cali
Posts: 8
Good call

Quote:
Originally Posted by Eman View Post
First off this plugin is for HS3.
The second point is if your Wemos device doesn't have a plugin in HomeSeer then it can't be controlled. But only if your device was mqtt ( which I think can be) based like the ESP2866 then you could load mqtt on it then add it the group of devices you want to control with the mqtt plugin. All you would do is to publish custom topics of what you want.

Here: http://jpmens.net/2016/03/22/mqtt-on-an-esp8266-thing/ There is a good topic about the Wemos thingie!

But if still inquisitive the go here : https://www.domoticaforum.eu/viewfor...297beabb71713a and ask the author of the plugin.



Eman.

Thanks for the links. I'm getting closer
Reply With Quote
  #89  
Old December 18th, 2017, 08:24 AM
gd1210's Avatar
gd1210 gd1210 is offline
Seer Deluxe
 
Join Date: Mar 2016
Location: Edinburgh
Posts: 427
I use mqtt now with nodered and a raspberry pi to allow my car to access control straight to the dash.

Needs a little work but the trial works really well.

Reply With Quote
  #90  
Old December 18th, 2017, 07:07 PM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by gd1210 View Post
I use mqtt now with nodered and a raspberry pi to allow my car to access control straight to the dash.

Needs a little work but the trial works really well.


I really like what you have done here. If only I would ask you a big favour ===> Link up with this guy here : https://play.google.com/store/apps/d...tdash&hl=en_GB and ask him to join the Homeseer club so we can have an app like his for HomeSeer for the not the so technical people like I'm but love HomeSeer dearly. Even if it was a paid for version, it would bring great joy to folks me.



Eman.
Reply With Quote
  #91  
Old January 2nd, 2018, 10:21 PM
Bill Brower's Avatar
Bill Brower Bill Brower is offline
OverSeer
 
Join Date: Dec 2001
Location: Bend, Oregon
Posts: 3,132
Posting here because the domoticaforum.eu moderator approval of posts is slow.

I am really enjoying the plugin - thank you.

Am I doing something wrong?
Trying to send an MQTT command to an ESP Easy LCD display.
The attached picture of my event 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"})
In the logs 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!
Attached Images
 
__________________


~Bill
Reply With Quote
  #92  
Old January 3rd, 2018, 01:21 AM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by Bill Brower View Post
Posting here because the domoticaforum.eu moderator approval of posts is slow.

I am really enjoying the plugin - thank you.

Am I doing something wrong?
Trying to send an MQTT command to an ESP Easy LCD display.
The attached picture of my event 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"})
In the logs 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!
Am not any good at scripting but try to remove the under score from "LED_DEN" and see if it works otherwise the plugin author can best explain this.



Eman.
Reply With Quote
  #93  
Old January 3rd, 2018, 12:14 PM
rxmas rxmas is offline
Seer
 
Join Date: Dec 2017
Location: Cali
Posts: 8
Try putting ' around hello world

Quote:
Originally Posted by Bill Brower View Post
Posting here because the domoticaforum.eu moderator approval of posts is slow.

I am really enjoying the plugin - thank you.

Am I doing something wrong?
Trying to send an MQTT command to an ESP Easy LCD display.
The attached picture of my event 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"})
In the logs 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!
Try putting ' or " around hello world other wise it appears as 2 values
Reply With Quote
  #94  
Old January 3rd, 2018, 01:27 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,720
I cannot help with the syntax expected by this plugin, but you may find that you do not need to use script with mcsMQTT https://forums.homeseer.com/showthread.php?t=192675 manual http://mcsSprinklers.com/mcsMQTT.pdf. Just storing values in Device String or Device Value or using replacement variables in Event Action are other approaches that are used with mcsMQTT.
Reply With Quote
  #95  
Old January 3rd, 2018, 05:50 PM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by Michael McSharry View Post
I cannot help with the syntax expected by this plugin, but you may find that you do not need to use script with mcsMQTT https://forums.homeseer.com/showthread.php?t=192675 manual http://mcsSprinklers.com/mcsMQTT.pdf. Just storing values in Device String or Device Value or using replacement variables in Event Action are other approaches that are used with mcsMQTT.
WOW!,

Where have you been man? You just opened a can of worms!
This really is so sweeeet! And another good reason for staying awake all night!
Question please ===> Will I be able to link up to external systems like Node-RED and or formulate custom topics seamlessly like I did before? For this looks like one of the coolest plugin to ever hit HomeSeer! I am so looking forward to installing and modifying everything again.

Do you have a HomeSeer forum where we can post questions because redirecting people to other sites has proved a pain. The devil is within the details in the previous posts on this thread.

BOY YOU ROCK!


Eman.

Last edited by Eman; January 3rd, 2018 at 06:31 PM.
Reply With Quote
  #96  
Old January 3rd, 2018, 07:10 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,720
I have been around longer than most on the board starting back in the HS1 days. You can see from my post count. Had many plugins with HS1 and HS2 and then consolidated into just a few for HS3. The forum for discussion is in the above post, but I have asked Tyler to give mcsMQTT a subforum of its own rather than hiding as a thread in the parent forum.

I have been doing xAP for many years which has many similarities with MQTT so it was an easy port of that plugin into the equivalent for MQTT. xAP has more structure than MQTT so a message had context and was easier to integrate with HS3 with minimal user involvement. For example, xAP defines if a message is a command, event, or just info refresh. With MQTT there may be some conventions, but no standards so the user needs to be explicit on how to command a node.

Tyler also indicated that he has been busy, but that the plugin should be in the updater now. The change log for the plugin is maintained on the board as the referenced link for discussions.
Reply With Quote
  #97  
Old January 4th, 2018, 12:05 AM
Bill Brower's Avatar
Bill Brower Bill Brower is offline
OverSeer
 
Join Date: Dec 2001
Location: Bend, Oregon
Posts: 3,132
Quote:
Originally Posted by rxmas View Post
Try putting ' or " around hello world other wise it appears as 2 values
It must not like the Immediate Script Command because the following works:

PHP Code:
Sub Main(parm as object)
Dim x as string
hs.PluginFunction("MQTT""""publish", {"/LED_DEN/cmd""lcd,1,1,hello world"})
End Sub 
Thanks for trying.
Reply With Quote
  #98  
Old February 13th, 2018, 06:22 PM
goldriver's Avatar
goldriver goldriver is offline
Seer Deluxe
 
Join Date: Mar 2016
Location: Québec
Posts: 198
MQTT subscription without a related device

Hi

I erased a MQTT device directly from the device manageent page and now I am stuck with an entry in the MQTT Plugin subscritpion page.

Would someone know how I can erase this fantom entry ?

thanks
Reply With Quote
  #99  
Old February 13th, 2018, 07:30 PM
Eman Eman is offline
Seer Master
 
Join Date: Mar 2009
Location: UK
Posts: 818
Quote:
Originally Posted by goldriver View Post
Hi

I erased a MQTT device directly from the device manageent page and now I am stuck with an entry in the MQTT Plugin subscritpion page.

Would someone know how I can erase this fantom entry ?

thanks

They go away when you restart the server. And unless you tick the monitor server in the settings they shouldn't be back but only on the broker. Just create a new one and forget about it.

There is some good info here as well : http://www.steves-internet-guide.com...sages-example/



Eman.
Reply With Quote
  #100  
Old February 13th, 2018, 08:20 PM
goldriver's Avatar
goldriver goldriver is offline
Seer Deluxe
 
Join Date: Mar 2016
Location: Québec
Posts: 198
Quote:
Originally Posted by Eman View Post
They go away when you restart the server. And unless you tick the monitor server in the settings they shouldn't be back but only on the broker. Just create a new one and forget about it.

There is some good info here as well : http://www.steves-internet-guide.com...sages-example/



Eman.


Great thanks I worked !


Envoyé de mon iPhone en utilisant Tapatalk
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Project weekend: Using MQTT with HS3 mloebl HomeSeer General Discussion Area 50 June 18th, 2017 09:23 PM
HS3 MQTT Plugin ghurk Script & Plug-In Library 12 February 27th, 2017 07:21 PM
MQTT with raspberry pi gd1210 General Home Automation Hardware Discussion 49 December 30th, 2016 08:52 AM
[c#.Net] MQTT plugin dmurphy Script & Plug-In Library 9 June 12th, 2016 09:13 PM
Harmony Hub plugin dont show in Homeseer plugin Tvins81 Harmony Hub 28 June 5th, 2016 06:20 PM


All times are GMT -4. The time now is 10:47 AM.


Copyright HomeSeer Technologies, LLC