HS3 MQTT Plugin

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

Moderator: Willem4ever

HS3 MQTT Plugin

Postby Sparkman » Sun Mar 12, 2017 10:46 pm

The system.core message will be displayed if there's any kind of compilation error. Can you post the contents of the K1.vb file? Also, did you put an & in front of the hs. Command in the immediate script field?


Sent from my Phone using Tapatalk
Sparkman
Starting Member
Starting Member
 
Posts: 29
Joined: September 2015

Re: HS3 MQTT Plugin

Postby Doug Meredith » Mon Mar 13, 2017 2:38 am

Thanks, sparkman.

I just double checked, and there is an ampersand at the beginning of the immediate script. The contents of /tmp/K1.vb are as follows:

Code: Select all
Function Main(parm as object)
dim result as object
result=hs.PluginFunction("MQTT", "", "publish", {"homeseer/something", "1234"})
return(result)


I can't see how this could be a compilation error, but maybe there is something I am missing.

As another data point, my original attempt was a script that compiled and executed just fine using tenScripting3, and it correctly published the MQTT message. When I moved the script to HomeSeer itself, I got the error I mentioned earlier. The immediate script was just a stripped-down example to illustrate the problem.
Doug Meredith
Starting Member
Starting Member
 
Posts: 6
Joined: February 2017

Re: HS3 MQTT Plugin

Postby Sparkman » Tue Mar 14, 2017 1:17 am

I just tried it on my system and got this error message when running the immediate script command:

Code: Select all
Mar-13 6:12:49 PM       System   Control Panel Immediate Script: &hs.PluginFunction("MQTT","","publish",{"homeseer/something","1234"})
Mar-13 6:12:49 PM       Error   Running script(1) &hs.PluginFunction("MQTT","","publish",{"homeseer/something","1234"}), init error: Invalid character


When I ran it as &nhs.PluginFunction, then it ran fine.
Code: Select all
Mar-13 6:13:03 PM       System   Control Panel Immediate Script: &nhs.PluginFunction("MQTT","","publish",{"homeseer/something","1234"})
Mar-13 6:13:03 PM       Info   Running immediate script: C:\Program Files (x86)\HomeSeer HS3\Temp\K2.vb


What version of HS3 are you running and on what OS?

Cheers
Al
Sparkman
Starting Member
Starting Member
 
Posts: 29
Joined: September 2015

Re: HS3 MQTT Plugin

Postby Doug Meredith » Tue Mar 14, 2017 3:17 am

I get the same error with either of the immediate scripts you posted. What is the difference between "hs" and "nhs"?

I'm using a Hometroller Zee 2 (so Linux), with HomeSeer 3.0.0.312 and version 1.4.0.0 of the MQTT plugin.
Doug Meredith
Starting Member
Starting Member
 
Posts: 6
Joined: February 2017

Re: HS3 MQTT Plugin

Postby Sparkman » Wed Mar 15, 2017 2:04 am

nhs forces the script command to run as vb.net whereas on Windows, using hs will run it as vbscript. Since the Zee does not support vbscript, the nhs and hs commands likely do exactly the same thing on a Zee. Since it works under Windows/.NET, I'm guessing its an issue with Mono on the Zee 2. You could try upgrading mono (search the HS board), but I would do an image of the SD card in the Zee first.

Cheers
Al
Sparkman
Starting Member
Starting Member
 
Posts: 29
Joined: September 2015

Re: HS3 MQTT Plugin

Postby Scott » Sun Mar 26, 2017 3:36 am

seanwill2 wrote:geert-jan,

Can I create a device that can subscribe and publish? When I try to setup a HS device to allow for any input to a subscribed device it will not allow any controls to be created.


This is literally the only thing missing that's keeping me from buying a whole ton of MQTT devices. I'd rather have a single device in Homeseer that can control and update status. Right now I have a work around using a handful of events that's cumbersome.

Just need to set a subscribe topic and a publish topic on the same device.
Scott
Starting Member
Starting Member
 
Posts: 1
Joined: March 2017

Re: HS3 MQTT Plugin

Postby Yazzcat1 » Tue Mar 28, 2017 9:01 am

With the latest update of HS3, the option of 'Linked Device' is introduced. If you would create 2 devices, one for subscribing to a status and one for controlling it, from the first device, you can link it to the second. That way, if the status is updated, the control device is updated as well. No need anymore for a special event.
Yazzcat1
Starting Member
Starting Member
 
Posts: 2
Joined: March 2017

Re: HS3 MQTT Plugin

Postby Yazzcat1 » Tue Mar 28, 2017 9:04 am

Can you help me on this one. Maybe it was covered before, but I could not find it. I need to change the MQTT topic for quite a lot of devices that have subscribed to specific MQTT topics. I know I can change the publish topics, but I cannot find a way to change the topics of the subscriptions. I see the topic is stated in the Technology Address, but I cannot seem to change this.

Also, could not find any .ini file that is storing these topics...

Any ideas?

Thanks!
Yazzcat1
Starting Member
Starting Member
 
Posts: 2
Joined: March 2017

Re: HS3 MQTT Plugin

Postby geert-jan » Mon Apr 03, 2017 7:24 am

Hi,

when creating a new MQTT 'subscription' a Homeseer device is created where the MQTT topic is used as Technology Address. After creating the Homeseer device it is not possible to change the Technology Address. At the moment I cannot offer a mechanism to update the MQTT topic, besides creating a new device and delete the old one.

Regards,
Geert-Jan
geert-jan
Member
Member
 
Posts: 118
Joined: November 2010

Re: HS3 MQTT Plugin

Postby pklijnjan » Tue May 09, 2017 4:34 pm

Hi I like to use this plugin with happy-bubbels recievers.
I now work with ibeacons and a mqtt reciever from china. (also works nice)
Is there a way to recieve the posts by using subscription like happy-bubbles/ble/livingroom/ibeacon/# ?
The reciever send the signals of the beacons like happy-bubbles/ble/<the-hostname>/ibeacon/<the-iBeacon-UUID>
in a json format. Even beter if I can recieve the json fields as devices value/strings:)!

thanks for the plugin it works great when you cab supsribe to one subsription.
pklijnjan
Member
Member
 
Posts: 60
Joined: August 2009
Location: Netherlands

Re: HS3 MQTT Plugin

Postby geert-jan » Wed May 10, 2017 6:08 am

Hi,

JSON payload is currently not supported in the MQTT plugin. JSON support is on my feature list.

Regards,
Geert-Jan
geert-jan
Member
Member
 
Posts: 118
Joined: November 2010

Re: HS3 MQTT Plugin

Postby pklijnjan » Wed May 10, 2017 10:16 am

Ok I hope you can make the JSON soon:)

And the other question on subscripe to en topic with a wildcard like /# ?
pklijnjan
Member
Member
 
Posts: 60
Joined: August 2009
Location: Netherlands

Re: HS3 MQTT Plugin

Postby Doug Meredith » Wed May 10, 2017 1:03 pm

There are lots of JSON libraries out there, so it's quite possible to do JSON payloads already. It's your plugin, but you might want to consider keeping your focus on true MQTT functionality, rather than peripheral things like that.
Doug Meredith
Starting Member
Starting Member
 
Posts: 6
Joined: February 2017

Re: HS3 MQTT Plugin

Postby critical_ » Tue May 16, 2017 11:22 am

geert-jan wrote:Hi,

adding controls for is not yet supported. I added your request to the feature list.

Regards,
Geert-Jan


Any chance we could get this item bumped up on the feature list? Being able to create a device that can subscribe and publish is what I am waiting for. Thanks for an awesome plugin.
critical_
Starting Member
Starting Member
 
Posts: 3
Joined: May 2017

Re: HS3 MQTT Plugin

Postby EmilySmith1 » Mon Jul 17, 2017 7:02 am

Hi guys
I want to integrate my HS3 with sonoff relay using MQTT protocol
https://www.itead.cc/sonoff-wifi-wireless-switch.html

I have flashed sonoff with Tasmota and currently connected with my local network
https://github.com/arendst/Sonoff-Tasmota

HS3 and mosquito broker is installed on same computer running windows 7 with IP 192.168.1.102


kindly Help me for setting up sonoff device
Emi

Images are attached
Attachments
MQTT.PNG
MQTT Page
MQTT.PNG (51.54 KiB) Viewed 536 times
Setting.PNG
Network Settings
Setting.PNG (220.76 KiB) Viewed 536 times
Homeseer.PNG
Main Page
Homeseer.PNG (82.34 KiB) Viewed 536 times
Command.PNG
Tasmota Command
Command.PNG (298.71 KiB) Viewed 536 times
Config.PNG
MQTT Config
Config.PNG (95.68 KiB) Viewed 536 times
EmilySmith1
Starting Member
Starting Member
 
Posts: 3
Joined: July 2017

PreviousNext

Return to Homeseer MQTT Plugin Forum

Who is online

Users browsing this forum: No registered users and 1 guest