This is a continuation of thread started at https://forums.homeseer.com/forum/ho...bspace-support. It contains the specific implementation for the subject integration as part of mcsMQTT. Section of mcsMQTT user manual is copied below.
Initial version is 6.2.0.0 that can be obtained as a delta set of file from Updater 6.x.x.x or as an Updater package that contains the full install using Updater Override process. See bottom of https://forums.homeseer.com/forum/hs...ge-log-hs4-hs3 for install files.
Hubspace is a brand that shares a common smartphone App for outlets, locks, lights, fans and other products distributed through Home Depot. A snapshot from the HD marketing page is shown in Figure 117.
Figure 117 Hubspace Products
The products are setup by first creating a Hubspace account and using the QR codes provided with each instance of the product that is being installed. Bluetooth is used for initial setup of the product to gain access to the WiFi network and then WiFi is used to communicate with the Hubspace cloud server.
A Python library is available with instructions and repository at https://github.com/jan-leila/hubspace-py and https://pypi.org/project/paho-mqtt/#installation It is most easily installed from the command line / terminal window using PIP with the command
pip install hubspace
pop install paho-mqtt
If Python3 and PIP are not yet installed on the Homeseer computer they first need to be installed. Use Google for guidance on installing them on the OS that is hosting Homeseer. After installation, the folder where python.exe needs to be identified as it varies. There will also be a \Scripts subfolder that normally a subfolder of where python.exe is located. HubspaceRequest.py will be copied to the \Scripts subfolder.
During installation of Python, the PATH environment variable is normally updated with path to python and the scripts subfolder. It will likely be necessary to have these definitions in PATH.
The integration of this library with Homeseer is done with the Python script HubspaceRequest.py that is available in the mcsMQTT download package and originally installed at subfolder \bin\mcsMQTT. It will not be run from this location, but is moved to the \Scripts subfolder of python install.
The mcsMQTT setup for Hubspace integration is on the Cloud Page, Hubspace Tab as in Figure 118
Note the full path to python.exe and the Scripts folder in the setup. Also needed are the email and password to the account that was setup with Hubspace. Data is polled for status updates to handle the local control being synced with HS. Provision is also provided to disconnect the connection with the cloud server. This disconnection will also result in the Python script HubspaceRequest.py being terminated. HubspacaceRequest.py is managed by mcsMQTT and run when the setup is complete and not disconnected.
Figure 118 Hubspace Integration Setup
After everything is put in place it would be good to run HubspaceRequest.py from console/terminal window such as below after navigating to the Python \Scripts folder. In this example, 192.168.0.5 is the MQTT Broker address. If no MQTT Broker has been setup then use 127.0.0.1 here and on the mcsMQTT MQTT Page, General Tab. myEmail.com will be your Hubspace account email. myPW can be anything as this test will not have success with connection to the cloud server. The test is to assure all the Python components are installed correctly. If no error message on the console/terminal then likely the install is good.
python hubspaceRequest.py myEmail.com myPW 192.168.0.5
At this time the integration supports the outlet and lightbulb. Others can be added in the future with assistance from users of the other equipment. The mcsMQTT integration structure is setup to add additioinal products with minimum difficulty.
mcsMQTT will use two endpoints with the Hubspace server. One provides Meta data that describes the characteristics of the product that exist on the account/server. The other provides the Attributes of the products which includes the current state.
The data of interest is visible on the MQTT Page, Association Tab. This includes the Hubspace product attributes and message feedback in communicaitons between mcsMQTT and HubspaceRequest.py. The Meta data is not shown in this table. A slice of this is shown in Figure 119. Beyond the setup of HS Device Features other features of mcsMQTT, such as History data and charting, can be selected from this page.
Figure 119 Hubspace Product Data as MQTT pseudo-Topics
The outlet is presented by the Hubspace server as two independent plugs. There is no single command to control both simultaneously, but the HS linking capability can be used if the desire is to have both plugs controlled together.
A feature is provided by mcsMQTT to allow an outlet to be always ON. At each polling interval mcsMQTT will confirm it is ON and if not, it will command it to the ON state. The On/Off controls will still be visible on the HS Devices page, but can be removed if desired using the Status/Graphics Tab of the HS Devices Page.
To indicate that an outlet plug is be always ON, the PubTopic on the Association Tab will be changed so that is indicates it is “on” rather than the actionId that is normally at the end. Using the examble of HS Feature 7823 shown in Figure 119, the Pub textbox will be changed
From: Hubspace/HStest_toggle outlet-2_3_872d485519a9fcde/3
To: Hubspace/HStest_toggle outlet-2_3_872d485519a9fcde/on
HS Device and Features will be automatically created based upon the Meta data with example of outlet and light in Figure 120. The Feature names are taken from the Meta data. They can be changed by the user from the default names if desired. Renaming will not affect operation. Similarly, Floor, Room and Device/Feature grouping can all be changed using the Devices page tools provided by HS.
Figure 120 Hubspace Auto-Created HS Device and Features
Initial version is 6.2.0.0 that can be obtained as a delta set of file from Updater 6.x.x.x or as an Updater package that contains the full install using Updater Override process. See bottom of https://forums.homeseer.com/forum/hs...ge-log-hs4-hs3 for install files.
Hubspace is a brand that shares a common smartphone App for outlets, locks, lights, fans and other products distributed through Home Depot. A snapshot from the HD marketing page is shown in Figure 117.
Figure 117 Hubspace Products
The products are setup by first creating a Hubspace account and using the QR codes provided with each instance of the product that is being installed. Bluetooth is used for initial setup of the product to gain access to the WiFi network and then WiFi is used to communicate with the Hubspace cloud server.
A Python library is available with instructions and repository at https://github.com/jan-leila/hubspace-py and https://pypi.org/project/paho-mqtt/#installation It is most easily installed from the command line / terminal window using PIP with the command
pip install hubspace
pop install paho-mqtt
If Python3 and PIP are not yet installed on the Homeseer computer they first need to be installed. Use Google for guidance on installing them on the OS that is hosting Homeseer. After installation, the folder where python.exe needs to be identified as it varies. There will also be a \Scripts subfolder that normally a subfolder of where python.exe is located. HubspaceRequest.py will be copied to the \Scripts subfolder.
During installation of Python, the PATH environment variable is normally updated with path to python and the scripts subfolder. It will likely be necessary to have these definitions in PATH.
The integration of this library with Homeseer is done with the Python script HubspaceRequest.py that is available in the mcsMQTT download package and originally installed at subfolder \bin\mcsMQTT. It will not be run from this location, but is moved to the \Scripts subfolder of python install.
The mcsMQTT setup for Hubspace integration is on the Cloud Page, Hubspace Tab as in Figure 118
Note the full path to python.exe and the Scripts folder in the setup. Also needed are the email and password to the account that was setup with Hubspace. Data is polled for status updates to handle the local control being synced with HS. Provision is also provided to disconnect the connection with the cloud server. This disconnection will also result in the Python script HubspaceRequest.py being terminated. HubspacaceRequest.py is managed by mcsMQTT and run when the setup is complete and not disconnected.
Figure 118 Hubspace Integration Setup
After everything is put in place it would be good to run HubspaceRequest.py from console/terminal window such as below after navigating to the Python \Scripts folder. In this example, 192.168.0.5 is the MQTT Broker address. If no MQTT Broker has been setup then use 127.0.0.1 here and on the mcsMQTT MQTT Page, General Tab. myEmail.com will be your Hubspace account email. myPW can be anything as this test will not have success with connection to the cloud server. The test is to assure all the Python components are installed correctly. If no error message on the console/terminal then likely the install is good.
python hubspaceRequest.py myEmail.com myPW 192.168.0.5
At this time the integration supports the outlet and lightbulb. Others can be added in the future with assistance from users of the other equipment. The mcsMQTT integration structure is setup to add additioinal products with minimum difficulty.
mcsMQTT will use two endpoints with the Hubspace server. One provides Meta data that describes the characteristics of the product that exist on the account/server. The other provides the Attributes of the products which includes the current state.
The data of interest is visible on the MQTT Page, Association Tab. This includes the Hubspace product attributes and message feedback in communicaitons between mcsMQTT and HubspaceRequest.py. The Meta data is not shown in this table. A slice of this is shown in Figure 119. Beyond the setup of HS Device Features other features of mcsMQTT, such as History data and charting, can be selected from this page.
Figure 119 Hubspace Product Data as MQTT pseudo-Topics
The outlet is presented by the Hubspace server as two independent plugs. There is no single command to control both simultaneously, but the HS linking capability can be used if the desire is to have both plugs controlled together.
A feature is provided by mcsMQTT to allow an outlet to be always ON. At each polling interval mcsMQTT will confirm it is ON and if not, it will command it to the ON state. The On/Off controls will still be visible on the HS Devices page, but can be removed if desired using the Status/Graphics Tab of the HS Devices Page.
To indicate that an outlet plug is be always ON, the PubTopic on the Association Tab will be changed so that is indicates it is “on” rather than the actionId that is normally at the end. Using the examble of HS Feature 7823 shown in Figure 119, the Pub textbox will be changed
From: Hubspace/HStest_toggle outlet-2_3_872d485519a9fcde/3
To: Hubspace/HStest_toggle outlet-2_3_872d485519a9fcde/on
HS Device and Features will be automatically created based upon the Meta data with example of outlet and light in Figure 120. The Feature names are taken from the Meta data. They can be changed by the user from the default names if desired. Renaming will not affect operation. Similarly, Floor, Room and Device/Feature grouping can all be changed using the Devices page tools provided by HS.
Figure 120 Hubspace Auto-Created HS Device and Features
Comment