Announcement

Collapse
No announcement yet.

Sonoff S31 and tasmota 12.2 not working for me

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

    #16
    I got the email.

    Not sure how to do this.
    Zip the files to compress them so size is small and .zip type accepted by the message board.

    To be clear, are you running mcsMQTT or mcsShelly? mcsShelly will not recognize non-Shelly devices. mcsMQTT will recognize everything. You can change from mcsShelly to mcsMQTT by installing mcsMQTT from Undater and disabling mcsShelly. If you created HS Events with the devices created by mcsShelly, then these will need to be redone.

    Comment


      #17
      Thank you. Here they are.
      Attached Files

      Comment


        #18
        MIchael,
        when checking the A box for
        Dev: stat|TasmotaS31-1a|POWER
        Sub: stat/TasmotaS31-1a/POWER
        Pub: the following Topic on Device command
        ​I can monitor the power correctly with the indicator in HS and it follows the power when toggling directly via 192.168.1.212. Publishing the other topics to HS does not get me the switch control or power readings.

        Comment


          #19
          I will be gone today, but give some guidance when I get back. Can you include a screenshot of Association table for the Sonoff topics? The zip in post 17 looks like the one sent via email with no Sonoff items in the database. What is posted in 18 looks to have Sonoff in the association table.

          Comment


            #20
            MIchael,
            when checking the A box for
            Dev: stat|TasmotaS31-1a|POWER
            Sub: stat/TasmotaS31-1a/POWER
            Pub: the following Topic on Device command
            ​I can monitor the power relay correctly with the indicator in HS and it follows the power when toggling directly via 192.168.1.212. Publishing the other topics to HS does not get me the switch control or power readings.
            Attached Files

            Comment


              #21
              What I see in your screenshots is one that has been associated with HS as Device Ref 648. The Pub text box for it is blank which means it is a status-only association. If you put cmnd/TasmotaS31-1a/POWER in the Pub text box then there will be ON and OFF buttons created in HS for Device 648 that can be used for control from the Devices page and you will also be able to command 648 as Device Control from Event Action.

              Publishing the other topics to HS does not get me the switch control or power readings.
              I do not understand what you are trying to indicate about other topics.

              I see in the screenshots that you do have homeassistant/.../config messages. I am confused as to why HS Devices 653 and 657 are associated with homeassistant topics. There should be no homeassistant topic associated with HS. This set of topics is only used by mcsMQTT as information on how to create S31 Devices automatically.

              If you want to have the device associations automaticaly created then the following process should do it
              1. Remove power from S31
              2. On MQTT Page, General Tab, Inbound Management Section enter
              Code:
              +/TasmotaS31-1a/#
              This will remove all record of this S31 from mcsMQTT.
              3. Do the similar to remove the homeassistant topics
              Code:
              homeassistant/#
              4. Apply power to S31
              5. Observe the TasmotaS31-a set of topics on the MQTT Page, Association table. Observe the S31 devices that were created on the HS Devices page.

              What should be created in HS are the ON/OFF controls for the POWER and status Devices for all the energy measurements.

              Comment


                #22
                Michael,

                Thank you. I checked the box to Pub cmnd/TasmotaS31-1a/POWER and a device was created but not with on off control.

                I then removed everything as you indicated and have a screen shot of what devices were created in HS and of each of the topics shown on the associations page. The homeassistant topic was very strange. It changed after I check the A box and a new device showed up the next time I checked. This occurred about 3 times and then finally the last time there are no options to Pub a topic. I've also zipped up the db file and the debug file. Maybe you can spot something.

                I may have had a browser open to the home page on a tablet. I'll redo the process

                Jim
                Attached Files

                Comment


                  #23
                  Redid the process and zipped the data base, debug files and associations before publishing anything to HS. Nothing was created automatically.
                  Attached Files
                  Last edited by ocxoman; October 3, 2022, 10:40 AM. Reason: One HS device created. see next post

                  Comment


                    #24
                    One device was created. Also I'm running HS4Pro if that makes a difference.
                    Attached Files

                    Comment


                      #25
                      The debug shows the following topics are being monitored by mcsMQTT to create automatic associations. The last of these was from receiving the message homeassistant/switch/28313F_RL_1/config topic

                      Code:
                      10/2/2022 11:07:07 PM    49322    | HA Dictionary
                      
                      tele/TasmotaS31-1a/SENSOR:ENERGY:TotalStartTime;
                      tele/TasmotaS31-1a/LWT;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:Total;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:Yesterday;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:Today;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:Power;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:ApparentPower;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:ReactivePower;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:Factor;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:Voltage;
                      tele/TasmotaS31-1a/SENSOR:ENERGY:Current;
                      tele/TasmotaS31-1a/STATE:POWER  ​
                      I subsequently see the following message which is topic ,tele/TasmotaS31-1a/STATE:POWER with value of "ON". This is the point when the association should be made to create HS device.

                      Code:
                      10/2/2022 11:21:50 PM    933144    | ActOnMessageForTrigger QueueSize=0 ,Topic tele/TasmotaS31-1a/STATE,Payload {"Time":"2022-10-03T07:21:50","Uptime":"0T00:15:09","UptimeSec":909,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"TIGER2","BSSId":"FC:34:97:03:69:31","Channel":11,"RSSI":100,"Signal":-25,"LinkCount":1,"Downtime":"0T00:00:03"}}

                      I extracted the two subject messages from your debug file and simulated their delivery for a local test. The following was automatically created in HS. Notice that Device Name tele-28313F for 5629 is based upon the received topic homeassistant/switch/28313F_RL_1/config. The Feature name for 5630 is also derived from homeassistant/switch/28313F_RL_1/config and its JSON payload of POWER key.

                      Click image for larger version

Name:	Capture.jpg
Views:	203
Size:	18.2 KB
ID:	1569130

                      When looking at the mcsMQTT Association table the following is visible

                      Click image for larger version

Name:	Capture1.jpg
Views:	97
Size:	114.4 KB
ID:	1569131

                      Looking at the Edit tab by clicking the 5630 button one can see the Control/Status UI is Button and the VSP are for ON and OFF
                      Click image for larger version

Name:	Capture2.jpg
Views:	103
Size:	64.3 KB
ID:	1569132

                      The sequence in the debug file shows the test messages being received and the HS Device Feature created with the lines containing "SetupTasmotaDevice". I did not see this in your debug. The version of the plugin I am using should yield the same results as the 5.26.5.4 you are using, but if you want to try the most current published one then unzip the attachment from mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board​ (depending upon HS3 or HS4 plugin) into \bin\mcsMQTT folder and restart the plugin.

                      While the homeassistant discovery is a nice feature, it is not required. The associations can be done manually and the Pub text box completed for the one POWER topic. The ENERGY topics of interest can also be associated via Association table.

                      There should be no homeassistant topic device associated as I have seen in some of your screenshots.

                      Code:
                      10/3/2022 8:42:37 AM    1941290    | ProcessMessage tele/TasmotaS31-1a/STATE  
                      10/3/2022 8:42:37 AM    1941414    | SetupTasmotaDevice From 1, SourceKey=tele/TasmotaS31-1a/STATE:POWER,SourceRecognized=False, RecordedParent=tele/28313F, RecordedSubTopic=tele/TasmotaS31-1a/STATE  
                      10/3/2022 8:42:37 AM    1941428    | SetupTasmotaDevice ParentDeviceCreated Ref= 5629  
                      10/3/2022 8:42:37 AM    1941501    | Update Accepted 5630 to ON StatusType=1 Payload=ON  
                      10/3/2022 8:42:37 AM    1941505    | Updating Device from 0 PayloadNumeric=False  
                      10/3/2022 8:42:37 AM    1941506    | Button Value 1, prior value = 0, for VSP of ON, bUpdateLastChange=False  
                      10/3/2022 8:42:37 AM    1941619    | ActOnMessageForTrigger QueueSize=0 ,Topic tele/TasmotaS31-1a/STATE,Payload {"Time":"2022-10-03T07:21:50","Uptime":"0T00:15:09","UptimeSec":909,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"TIGER2","BSSId":"FC:34:97:03:69:31","Channel":11,"RSSI":100,"Signal":-25,"LinkCount":1,"Downtime":"0T00:00:03"}}  
                      10/3/2022 8:42:37 AM    1941620    | ProcessMessage homeassistant/switch/28313F_RL_1/config  
                      10/3/2022 8:42:37 AM    1941622    | HA Dictionary tele/TasmotaS31-1a/STATE:POWER;tele/TasmotaS31-1a/LWT  
                      10/3/2022 8:42:37 AM    1941623    | ActOnMessageForTrigger QueueSize=2 ,Topic homeassistant/switch/28313F_RL_1/config,Payload {"name":"Tasmota","stat_t":"tele/TasmotaS31-1a/STATE","avty_t":"tele/TasmotaS31-1a/LWT","pl_avail":"Online","pl_not_avail":"Offline","cmd_t":"cmnd/TasmotaS31-1a/POWER","val_tpl":"{{value_json.POWER}}","pl_off":"OFF","pl_on":"ON","uniq_id":"28313F_RL_1","dev":{"ids":["28313F"]}}  
                      10/3/2022 8:42:37 AM    1941625    | ProcessMessage tele/TasmotaS31-1a/STATE  
                      10/3/2022 8:42:37 AM    1941628    | Update Accepted 5630 to ON StatusType=1 Payload=ON  
                      10/3/2022 8:42:37 AM    1941631    | Updating Device from 1 PayloadNumeric=False  
                      10/3/2022 8:42:37 AM    1941631    | Button Value 1, prior value = 1, for VSP of ON, bUpdateLastChange=False  
                      10/3/2022 8:42:37 AM    1941633    | ActOnMessageForTrigger QueueSize=1 ,Topic tele/TasmotaS31-1a/STATE,Payload {"Time":"2022-10-03T07:21:50","Uptime":"0T00:15:09","UptimeSec":909,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"TIGER2","BSSId":"FC:34:97:03:69:31","Channel":11,"RSSI":100,"Signal":-25,"LinkCount":1,"Downtime":"0T00:00:03"}}  
                      ​

                      Comment


                        #26
                        Michael,

                        Removed all the references as per your post 21 in the thread. Things are working better but have no idea if I really did anything different.

                        All the energy monitoring devices got created automatically. The only thing missing is the relay function for control.

                        I may give this a rest for a while and get back to you. I'll try to learn how to create the device manually. I'll give it a try tomorrow if it's not too difficult and then probably will be to busy to get back to it until Nov.

                        I'll keep you posted but I know I've got most of Oct spoken for from family so If you see nothing for a month, it doesn't mean I've given up.

                        Jim
                        Attached Files

                        Comment


                          #27
                          In post 25 I provided some screenshots. In the Association table it shows device 5630 created for the STATE:POWER topic. You do this manually by clicking on the "a" column checkbox. This will expand the row to include a Pub textbox. Enter the text just like is shown in row 5 of the same screenshot. You will now have a HS On/Off control for your relay.

                          Also on the Association table will be a row for ProcessMessage stat/TasmotaS31-1a/RESULT:POWER. In this row enter the same Ref number that was created for the ProcessMessage stat/TasmotaS31-1a/STATE:POWER row into the Ref textbox.

                          The RESULT topic is returned from S31 Tasmota when a cmnd/... topic is sent by HS to report a change of state. The STATE topic is sent periodically to report current state. By having both of these associated with the same HS device ref will result in HS being updated in both situations.

                          Comment


                            #28
                            I do not have the same results in the tele topic and so cannot click the A box to publish as you requested
                            Attached Files

                            Comment


                              #29
                              Michael,
                              I'm back after 4 weeks in Korea and Japan. Great trip. Now to figure out what is going on. I've attached a screen shot of topics tele. As you can see the subtopic STATE:POWER does not show up for me to check to have it published. It looks as if every other subtopic does show up. Looking at the console of the S31, I can see that the subtopic of STATE:POWER is in the list that is sent.
                              The screen shots are attached
                              One thing that I am doing is running the device through the serial interface and not plugging it into AC power. I am willing to delete everything and try again with AC power if you think that makes a difference.
                              Does the version of Ubuntu make a difference? HS4Pro has worked without issues Two Shellies are working without issues.
                              I will try other versions of the plugin or try whatever you suggest. I am not in any rush. I will even get a Raspberry Pi to install Mosquito broker if you think that may be something that would help.
                              Jim


                              Attached Files

                              Comment


                                #30
                                Michael,
                                Thank you for being so patient in helping me.
                                Here is the device that was created automatically. No control buttons are present.
                                I'll try to remove everything and start again after a fresh reboot of Linux and of HS4Pro. Will try to post results late today or tomorrow.
                                Jim
                                Attached Files

                                Comment

                                Working...
                                X