Announcement

Collapse
No announcement yet.

shelly Motion Sensor Problem

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

    shelly Motion Sensor Problem

    Had a few problems installing mcsMqtt, on HS4 also tried mcsShelly without success. Eventually McsMQTT installed ok and found two shelly dimmers and a temperature and humidity sensor, I also had a shelly motion sensor, which it found, but reported battery as 0% and Lux as 0%.
    The HomeSeer log has an entry from mcsMQTT as follows:
    ProcessMessage New shellies/shellymotionsensor-60A423975B58/info={ "wifi_sta": {"connected": true,"ssid": "Gibbet Secure","ip": "10.0.0.158","rssi": 0},"cloud": {"enabled": false,"connected": false},"mqtt": {"connected": true},"time": "00:00","unixtime": 1634833369,"serial": 0,"has_update": false,"mac": "60A423975B58","cfg_changed_cnt": 0,"actions_stats": {"skipped": 0},"sleep_time": 0,"lux": {"value":272,"illumination": "twilight","is_valid": true},"sensor": {"vibration": false,"motion": true,"timestamp": 0,"active": true,"is_valid": true},"bat": {"value":100,"voltage": 4.195},"charger": true,"update": {"status": "unknown","has_update": false,"new_version": null,"old_version": "20211004-105639/v2.0.2@7eba4128","beta_version": null},"ram_total": 97280,"ram_free": 22720,"fs_size": 65536,"fs_free": 59632,"uptime": 5,"fw_info":{"device":"shellymotionsensor-60A423975B58","fw":"20211004-105639/v2.0.2@7eba4128"},"ps_mode": 0,"dbg_flags": 0 } at MCSMQTTHS4_2020.Shelly.ProcessPayload (System.String sValue) [0x0030b] in :0 at MCSMQTTHS4_2020.ProcessMessage..ctor (uPLibrary.Networking.M2Mqtt.Messages.MqttMsgPublishEventArg s eventArg, System.Int32 iPubBroker) [0x00409] in :0 Line 0 Index was outside the bounds of the array.
    This message only appears once unless I either reboot the device from its web page or disable/re-enable MQTT on the device. even if the message appears again, the time does not alter on the device page (I unticked Last Change Time Updates on Status Change Only)

    #2
    The issue is caused by the key "time":"00:00" where the plugin did not properly recognize the second colon being encased in quotes. I will need to make an update.

    Comment


      #3
      I cleaned up the parsing. The changed files since what is in the Updater are attached for each HS4 and HS3 plugins. HSPI* goes in HS4 folder. mcsMQTT* goes into \bin\mcsMQTT folder. *.html goes into \html\mcsMQTT folder.

      Attached Files

      Comment


        #4
        Thanks for the fast response to this.
        I copied the files as instructed, disabled and re-enabled mcsMQTT, got a message in the log saying port 1883 was in use, so rebooted HomeSeer, did not get an update to the time in the Device information and no change to battery status of 0%. So deleted device and rebooted once more.
        then I got an error message in the log.....
        ProcessMessage New shellies/announce={"id":"shellymotionsensor-60A423975B58","model":"SHMOS-01","mac":"60A423975B58","ip":"10.0.0.158","new_fw":false, "f w_ver":"20211004-105639/v2.0.2@7eba4128"} at System.ThrowHelper.ThrowArgumentException (System.ExceptionResource resource) [0x0000b] in :0 at System.Collections.Generic.Dictionary`2[TKey,TValue].Insert (TKey key, TValue value, System.Boolean add) [0x0008e] in :0 at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in :0 at MCSMQTTHS4_2020.Shelly.ProcessPayload (System.String sValue) [0x001eb] in :0 at MCSMQTTHS4_2020.ProcessMessage..ctor (uPLibrary.Networking.M2Mqtt.Messages.MqttMsgPublishEventArg s eventArg, System.Int32 iPubBroker) [0x0044b] in :0 Line 0 An item with the same key has already been added.

        followed by a similar message to the first one I posted 3 seconds later ....

        ProcessMessage New shellies/shellymotionsensor-60A423975B58/info={ "wifi_sta": {"connected": true,"ssid": "Gibbet Secure","ip": "10.0.0.158","rssi": -30},"cloud": {"enabled": false,"connected": false},"mqtt": {"connected": true},"time": "11:01","unixtime": 1634896887,"serial": 0,"has_update": false,"mac": "60A423975B58","cfg_changed_cnt": 0,"actions_stats": {"skipped": 0},"sleep_time": 0,"lux": {"value":276,"illumination": "twilight","is_valid": true},"sensor": {"vibration": false,"motion": true,"timestamp": 1634896876,"active": true,"is_valid": true},"bat": {"value":100,"voltage": 4.191},"charger": true,"update": {"status": "unknown","has_update": false,"new_version": "20211004-105639/v2.0.2@7eba4128","old_version": "20211004-105639/v2.0.2@7eba4128","beta_version": null},"ram_total": 97280,"ram_free": 22560,"fs_size": 65536,"fs_free": 59632,"uptime": 494,"fw_info":{"device":"shellymotionsensor-60A423975B58","fw":"20211004-105639/v2.0.2@7eba4128"},"ps_mode": 0,"dbg_flags": 0 } at MCSMQTTHS4_2020.Shelly.ProcessPayload (System.String sValue) [0x003e5] in :0 at MCSMQTTHS4_2020.ProcessMessage..ctor (uPLibrary.Networking.M2Mqtt.Messages.MqttMsgPublishEventArg s eventArg, System.Int32 iPubBroker) [0x0044b] in :0 Line 0 Index was outside the bounds of the array.

        Also, this time the device was created, although the Motion, Lux, Illumination, Battery and Vibration Devices were created, there were no icons.








        Comment


          #5
          There are two issues at play. One is there still seems to be a parsing error. The second is that mcsMQTT creates Shelly devices on first detection. This means that to "start over" with a new Shelly product you need to obsolete the prior detection. This is most easily done on the MQTT page, General tab, Obsolete textbox. You enter shellies/shellymotionsensor-60A423975B58/# to remove just this one product.

          I will be traveling tomorrow and may not be able to dig into the parsing for a few days, depending upon other things I need to prepare.

          Comment


            #6
            What may help is the error message posted inside of code tags so additional spaces are not added for the HTML display.

            Comment

            Working...
            X