HS3 MQTT Plugin
Moderator: Willem4ever
HS3 MQTT Plugin
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
Sent from my Phone using Tapatalk
-
- Starting Member
- Posts: 6
- Joined: Tue Feb 28, 2017 6:33 pm
Re: HS3 MQTT Plugin
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:
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.
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)
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.
Re: HS3 MQTT Plugin
I just tried it on my system and got this error message when running the immediate script command:
When I ran it as &nhs.PluginFunction, then it ran fine.
What version of HS3 are you running and on what OS?
Cheers
Al
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
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
Cheers
Al
-
- Starting Member
- Posts: 6
- Joined: Tue Feb 28, 2017 6:33 pm
Re: HS3 MQTT Plugin
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.
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.
Re: HS3 MQTT Plugin
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
Cheers
Al
Re: HS3 MQTT Plugin
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.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.
Just need to set a subscribe topic and a publish topic on the same device.
Re: HS3 MQTT Plugin
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.
Re: HS3 MQTT Plugin
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!
Also, could not find any .ini file that is storing these topics...
Any ideas?
Thanks!
Re: HS3 MQTT Plugin
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
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
Re: HS3 MQTT Plugin
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.
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.
Re: HS3 MQTT Plugin
Hi,
JSON payload is currently not supported in the MQTT plugin. JSON support is on my feature list.
Regards,
Geert-Jan
JSON payload is currently not supported in the MQTT plugin. JSON support is on my feature list.
Regards,
Geert-Jan
Re: HS3 MQTT Plugin
Ok I hope you can make the JSON soon:)
And the other question on subscripe to en topic with a wildcard like /# ?
And the other question on subscripe to en topic with a wildcard like /# ?
-
- Starting Member
- Posts: 6
- Joined: Tue Feb 28, 2017 6:33 pm
Re: HS3 MQTT Plugin
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.
Re: HS3 MQTT Plugin
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.geert-jan wrote:Hi,
adding controls for is not yet supported. I added your request to the feature list.
Regards,
Geert-Jan
-
- Starting Member
- Posts: 3
- Joined: Mon Jul 17, 2017 7:28 am
Re: HS3 MQTT Plugin
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
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 Page
- MQTT.PNG (51.54 KiB) Viewed 21169 times
-
- Network Settings
- Setting.PNG (220.76 KiB) Viewed 21169 times
-
- Main Page
- Homeseer.PNG (82.34 KiB) Viewed 21169 times
-
- Tasmota Command
- Command.PNG (298.71 KiB) Viewed 21169 times
-
- MQTT Config
- Config.PNG (95.68 KiB) Viewed 21169 times