HS3 MQTT Plugin
Moderator: Willem4ever
Re: HS3 MQTT Plugin
Status/update:
My issue has been solved:
1. MQTT: I now realize that I did not fully understand how to setup the plugin so when systematically going trough the setup I found that I was trying so send command with "stat" instead of "cmnd"
2. Sonoff/Code:I found the setting in the Sonoff code where to change the "ON" to "1" and "OFF" to "0".
3. Help from the post "esschenk", helped me setup HS3 to use the same values 1 & 0.
So all in all everything is working correctly - Thanks for the support.
/Steffen
My issue has been solved:
1. MQTT: I now realize that I did not fully understand how to setup the plugin so when systematically going trough the setup I found that I was trying so send command with "stat" instead of "cmnd"
2. Sonoff/Code:I found the setting in the Sonoff code where to change the "ON" to "1" and "OFF" to "0".
3. Help from the post "esschenk", helped me setup HS3 to use the same values 1 & 0.
So all in all everything is working correctly - Thanks for the support.
/Steffen
Re: HS3 MQTT Plugin
Thank you for the 1.4.0.0 update.
That fixed my decimal point problem. I think I need to build some ESP8266 nodes now and start using this.
Regards
Morten
That fixed my decimal point problem. I think I need to build some ESP8266 nodes now and start using this.
Regards
Morten
Re: HS3 MQTT Plugin
Thanks for such a great plugin.
This is a big ask for the feature request, but would add a lot of power to the plugin:
Do incoming translation on subscribed messages similar to the 'transformation' capability in this Openhab plugin:
https://github.com/gerrieg/openhab/wiki/MQTT-Binding
I have a device which publishes to MQTT values such as 'on' and 'off'. This gets placed into the homeseer device string field, but it would be nice if I could translate the text on import to 1 and 0 so that can be input into value field of homeseer directly.
I believe I can use mqttwarn to do the translation, but this will add latency. In my case, I have the source available to me for the device publishing to MQTT, so I simply modified the source to send 1 and 0 instead of on and off. This will not always be the case, so some inline translation of the message string would be awesome.
Thanks in advance for the consideration,
Woody
This is a big ask for the feature request, but would add a lot of power to the plugin:
Do incoming translation on subscribed messages similar to the 'transformation' capability in this Openhab plugin:
https://github.com/gerrieg/openhab/wiki/MQTT-Binding
I have a device which publishes to MQTT values such as 'on' and 'off'. This gets placed into the homeseer device string field, but it would be nice if I could translate the text on import to 1 and 0 so that can be input into value field of homeseer directly.
I believe I can use mqttwarn to do the translation, but this will add latency. In my case, I have the source available to me for the device publishing to MQTT, so I simply modified the source to send 1 and 0 instead of on and off. This will not always be the case, so some inline translation of the message string would be awesome.
Thanks in advance for the consideration,
Woody
Re: HS3 MQTT Plugin
Great plugin! Works perfectly! However, I would like to make a request for a small modification. When you configure the plugin it only allows for an IP address. This is great until my IP address changes. I use this plugin in two locations. One being on my LAN and the other at a remote location connecting to the same broker. When my ISP changes IPs on me I loose the remote location until I enter a new IP in the config at the remote location. Can you please allow the plugin to use either IP or hostname?
Re: HS3 MQTT Plugin
Hi,
the fieldname 'IP Address MQTT Broker' is confusing; it accepts both the IP address as the hostname, which resolves your issue.
Regards,
Geert-Jan
the fieldname 'IP Address MQTT Broker' is confusing; it accepts both the IP address as the hostname, which resolves your issue.
Regards,
Geert-Jan
Re: HS3 MQTT Plugin
geert-jan,
Great! Thanks for the response. I thought I tried that but must have "fat fingered" the address. I will try again tonight. I love this plug-in! It is one of the most beneficial plugins to HS.
I do have another question though. 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.
Regards,
Sean
Great! Thanks for the response. I thought I tried that but must have "fat fingered" the address. I will try again tonight. I love this plug-in! It is one of the most beneficial plugins to HS.
I do have another question though. 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.
Regards,
Sean
Re: HS3 MQTT Plugin
Hi,
adding controls for is not yet supported. I added your request to the feature list.
Regards,
Geert-Jan
adding controls for is not yet supported. I added your request to the feature list.
Regards,
Geert-Jan
Re: HS3 MQTT Plugin
I have a question. I have Octoprint which can send an MQTT message when finished printing. the MQTT message looks like this:
I see this message in the log like this:
The value of _event is what I need to determine how to act with this in Homeseer. Sometimes I can use the other information in the JSON as well. Can you give me a pointer on how to deal with this?
I was thinking about:
set event which runs when device assigned to the octoprint mqtt messages changes.
Read status of this device in script which is run by event.
In script parse JSON based on the status (json) in the device.
Problem with this is I cannot seem to get the JSON out of the status of the device. I guess it doesnt accept the JSON as string/status? Do you have any idea how to be able to use the JSON send through MQTT?
If not possible I could use the MQTT topic to at least determine the status of the printer, but it would be nice to also use the additional available info
Code: Select all
{“_event”: “ClientOpened”, “remoteAddress”: “127.0.0.1”}
Code: Select all
Info: Received MQTT topic: octoprint/event/ClientOpened payload: {"_event": "ClientOpened", "remoteAddress": "127.0.0.1"}
I was thinking about:
set event which runs when device assigned to the octoprint mqtt messages changes.
Read status of this device in script which is run by event.
In script parse JSON based on the status (json) in the device.
Problem with this is I cannot seem to get the JSON out of the status of the device. I guess it doesnt accept the JSON as string/status? Do you have any idea how to be able to use the JSON send through MQTT?
If not possible I could use the MQTT topic to at least determine the status of the printer, but it would be nice to also use the additional available info
groeten,
Harry
Harry
Re: HS3 MQTT Plugin
Hi,
the support for JSON payload is already on the feature list.
If you only enable 'update string' for the device you should see the full JSON payload in the device string, which you than can use in a script.
Regards,
Geert-Jan
the support for JSON payload is already on the feature list.
If you only enable 'update string' for the device you should see the full JSON payload in the device string, which you than can use in a script.
Regards,
Geert-Jan
Re: HS3 MQTT Plugin
Thanks, I will try this weekend! I could see the status but have both value and status enabled so that cause it to not show up.
groeten,
Harry
Harry
Re: HS3 MQTT Plugin
Thanks for all your hard work on this plug-in, it is very much appreciated. Is there a help document/sight/etc that details all the various option/settings/usages for the plug-in?
Thanks again.
Thanks again.
-
- Starting Member
- Posts: 6
- Joined: Tue Feb 28, 2017 6:33 pm
Re: HS3 MQTT Plugin
Thank you so much for providing this plugin, geert-jan. I'm new to HomeSeer, and have an existing home automation infrastructure using MQTT, which I plan to keep, so this is fantastic for me.
I can successfully connect to my broker, and both publish and subscribe. I'm now looking at the scripting support, and I'm wondering if anyone has tested publishing from a script using a HomeTroller Zee S2. As a test, I have a manually-triggered event executing an immediate script: hs.PluginFunction("MQTT", "", "publish", {"topic", "payload"})
It doesn't work, and I get the following messages in the log (read from bottom to top):
Feb-28 12:44:16 PM Error Compiling script /tmp/K1.vb: http://mono-project.com/Bugs)
Feb-28 12:44:16 PM Error Compiling script /tmp/K1.vb: 42021
Feb-28 12:44:16 PM Error Compiling script /tmp/K1.vb: The import 'System.Core' could not be found.
Feb-28 12:44:13 PM Info Running immediate script: /tmp/K1.vb
Other scripts work, so this doesn't seem to be a fundamental scripting problem on my system. I've done some googling on this, and not found anything helpful. Any ideas or help would be much appreciated.
I can successfully connect to my broker, and both publish and subscribe. I'm now looking at the scripting support, and I'm wondering if anyone has tested publishing from a script using a HomeTroller Zee S2. As a test, I have a manually-triggered event executing an immediate script: hs.PluginFunction("MQTT", "", "publish", {"topic", "payload"})
It doesn't work, and I get the following messages in the log (read from bottom to top):
Feb-28 12:44:16 PM Error Compiling script /tmp/K1.vb: http://mono-project.com/Bugs)
Feb-28 12:44:16 PM Error Compiling script /tmp/K1.vb: 42021
Feb-28 12:44:16 PM Error Compiling script /tmp/K1.vb: The import 'System.Core' could not be found.
Feb-28 12:44:13 PM Info Running immediate script: /tmp/K1.vb
Other scripts work, so this doesn't seem to be a fundamental scripting problem on my system. I've done some googling on this, and not found anything helpful. Any ideas or help would be much appreciated.
Re: HS3 MQTT Plugin
Hi,
from the logging I see that you are running HS3 on Linux; System.Core cannot be found. I need to check that in my environment if its is something I have to do in the plugin or in the HS3 configuration.
Regards,
Geert-Jan
from the logging I see that you are running HS3 on Linux; System.Core cannot be found. I need to check that in my environment if its is something I have to do in the plugin or in the HS3 configuration.
Regards,
Geert-Jan
-
- Starting Member
- Posts: 6
- Joined: Tue Feb 28, 2017 6:33 pm
Re: HS3 MQTT Plugin
Thanks, geert-jan.
A quick update: I just upgraded HomeSeer to the newly released 3.0.0.312, and I still have the same problem.
A quick update: I just upgraded HomeSeer to the newly released 3.0.0.312, and I still have the same problem.
-
- Starting Member
- Posts: 6
- Joined: Tue Feb 28, 2017 6:33 pm
Re: HS3 MQTT Plugin
I know very little about .NET, Mono, and HomeSeer, but here is what I have learned about the problem I posted about earlier, with publishing from a script not working on my Hometroller.
System.Core is presumably a .NET namespace that is stored in a DLL that HomeSeer doesn't automatically load. This conclusion is based on the following:
http://homeseer.com/support/homeseer/We ... spaces.htm
On my system, System.Core.dll is found in four locations and fifth location that is a symbolic link to one of these four. I edited the file /usr/local/HomeSeer/Config/settings.ini and in the [Settings] section, I added "ScriptingReferences=System.Core;System.Core.dll". I then rebooted the Hometroller. This has not resolved my problem.
As I said, I'm way out of my areas of expertise here, so any help would be appreciated.
System.Core is presumably a .NET namespace that is stored in a DLL that HomeSeer doesn't automatically load. This conclusion is based on the following:
http://homeseer.com/support/homeseer/We ... spaces.htm
On my system, System.Core.dll is found in four locations and fifth location that is a symbolic link to one of these four. I edited the file /usr/local/HomeSeer/Config/settings.ini and in the [Settings] section, I added "ScriptingReferences=System.Core;System.Core.dll". I then rebooted the Hometroller. This has not resolved my problem.
As I said, I'm way out of my areas of expertise here, so any help would be appreciated.