Announcement

Collapse
No announcement yet.

Newbie Question - interfacing HS4 with CloudFree Smart Plugs (Tasmota)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Newbie Question - interfacing HS4 with CloudFree Smart Plugs (Tasmota)

    I picked up a couple of Tasmota based smart plugs from CloudFree (http://cloudfree.shop) and have managed to get them setup on my home wifi network and configure with my MQTT broker. I'm trying to figure out how to control through MCSMQTT, and I can see that the topics appear, but I apparently need to do a bit more configuration and I'm not sure where to start... (The plugin did such a great job with my Shelly devices, I guess I got spoiled! )

    Would appreciate some guidance on where to start looking in documentation or if there is a setting(s) to focus in on... I will also be messing with it today, so if I come across a solution, will post here for anyone else who may be struggling with same thing...)
    Home automation devices shouldn't require the internet. Build a private and secure smart home you control, with CloudFree and Home Assistant.

    #2
    In the case of a smart plug the setup is pretty easy and can be done manually. There is also a more automated way of doing it. Before doing any configuration in HS you will want to assure your tasmota device is setup using the browser and URL of the tasmota device. The Configuration button on tasmota will make options available for MQTT as well as others as shown below.

    Click image for larger version

Name:	Capture6.PNG
Views:	150
Size:	22.1 KB
ID:	1435915

    The MQTT setup needs the Host, which will be the IP of HS if you are using the broker built into mcsMQTT and the Topic and FullTopic. The Topic will be the name of the device. I use SpaceHeater in this example. Full topic will default to %prefix%/%topic%/. The default is fine. I change mine to %topic%/. Either will do. It affects if cmnd, stat and tele is used as part of the topic or not and in the case of cmnd for publish messages if the cmnd is first or second.

    For the automated process look below as this would be the time when you use the SetOption19 command from the console. I will first continue with the manual process.

    The manual process starts with the Association tab and the row that contains the POWER item at the end of the topic. Click the "A" column checkbox and the plugin will create a HS feature and parent device such as below
    Click image for larger version

Name:	Capture1.PNG
Views:	277
Size:	101.7 KB
ID:	1435910
    Next step is to create the buttons on the HS device so it can be controlled. This is started by clicking the Ref column button (8741 in example) that will bring up the Edit page. In the publish text box enter the topic that tasmota is expecting to command the power on and off. Likely it is "cmnd/Name/Power" for default tasmota where Name is the name of the tasmota device and also assure that the Control/Status UI is set to Button to produce the ON and OFF button in HS. I the example below my Name is "SpaceHeater" and I changed the tasmota topic template to put the cmnd after rather than before the name.
    Click image for larger version

Name:	Capture2.PNG
Views:	147
Size:	41.0 KB
ID:	1435911

    The created HS device will look like
    Click image for larger version

Name:	Capture3.PNG
Views:	145
Size:	46.9 KB
ID:	1435912
    When the tasmota device power has been toggled either locally, tasmota browser page, or HS on/off button then POWER and RESULT messages will be shown. These are the event-based reporting vs. the periodic reporting of the STATE messages. Since we want to have both event and periodic updates in HS the feature ref number (8741 in example) is entered into the text boxes on the Association tab of these two rows as shown below with first before entry and then after entry. This now means that any of the three reports from tasmota device will update HS device 8741.
    Click image for larger version

Name:	Capture4.PNG
Views:	167
Size:	226.4 KB
ID:	1435913
    Click image for larger version

Name:	Capture5.PNG
Views:	166
Size:	329.4 KB
ID:	1435914


    For the more automated process ....

    Tasmota supports homeassistant discovery. It can be enabled by using browser with URL of the tasmota device. Select the Console button. Enter as below and then restart the tasmota device. This will cause it to send MQTT message describing itself which will be recognized by mcsMQTT so that it is able to create a device with most of the setup done as was the case with Shelly.
    Code:
    SetOption19 1
    mcsMQTT only does the auto device creation with the checkbox has been set in the Inbound Management section of the general page. It also only does it on the initial observation of a topic. This means that before restarting tasmota device described in prior paragraph you will need to tell mcsMQTT to forget what it previous saw about the tasmota device. You can do this from the Associate tab by clicking every "O"bsolete column checkbox for the tasmota device messages or from the General tab, Inbound Management, Obsolete text box where the topic pattern is entered. Default tasmota topics are type/name/function so an appropriate text box entry would be as below with name being that of the tasmota device.
    Code:
    +/name/#

    Comment


      #3
      Sorry for the delayed response, but THANKS!!!!! This worked perfectly after I went back and started over (sort-of). I had some initial issues, but once I went back and took out the %prefix, everything seemed to click...

      Comment

      Working...
      X