Announcement

Collapse
No announcement yet.

Plans for LG washer/dryers?

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

    #16
    And this is the dryer when i use it :

    Code:
            "washerDryer": {
                "dampDrySignal": "DAMPDRYSIGNAL_OFF",
                "initialTimeMinute": 59.0,
                "antiBacterial": "ANTIBACTERIAL_OFF",
                "remoteStart": "REMOTE_START_OFF",
                "state": "DRYING",
                "energySaver": "ENERGYSAVER_OFF",
                "easyIron": "EASYIRON_OFF",
                "moreLessTime": 0.0,
                "turboSteam": "TURBOSTEAM_OFF",
                "courseDryer27inchBase": "NORMAL",
                "wrinkleCare": "WRINKLECARE_OFF",
                "preState": "INITIAL",
                "initialBit": "INITIAL_BIT_OFF",
                "loadItem": "LOADITEM_OFF",
                "initialTimeHour": 0.0,
                "downloadedCourseDryer27inchBase": "SUPERDRY",
                "error": "ERROR_NO",
                "remainTimeHour": 0.0,
                "reduceStatic": "REDUCESTATIC_OFF",
                "smartCourseDryer27inchBase": "NOT_SELECTED",
                "dryLevel": "DRYLEVEL_VERYDRY",
                "temp": "TEMP_MEDIUM",
                "timeDry": "TIMEDRY_OFF",
                "remainTimeMinute": 57.0,
                "childLock": "CHILDLOCK_OFF"
            },

    Comment


      #17
      I have been able to automate this in HS/. For now only the "state": attribute interest me.

      Here are the values i got so far for this attribute.



      Attached Files

      Comment


        #18
        I created small ''script'' named LG.SH into the folder /wideq-api2_merged.

        here it is :
        Code:
        #!/bin/bash
        
        while true
        do
        
        python3 example.py -c CA -l en-CA  > LGoutput.txt && mosquitto_pub -t Mqtt/LG -f ./LGoutput.txt
         sleep 25
        done
        Then i create a systemd service to start this script at boot :

        here is my systemd service file :

        Code:
        [Unit]
        Description=LG script
        After=network-online.target
        Wants=network-online.target
        
        [Service]
        WorkingDirectory=/wideq-api2_merged
        ExecStart=/wideq-api2_merged/LG.sh
        Restart=always
        RestartSec=30
        SyslogIdentifier=LG
        StandardOutput=null
        KillMode=none
        TimeoutStopSec=300
        
        [Install]
        WantedBy=multi-user.target
        Then i created this flow in nodered , the flow send the stats attribut for both machine into the respective hs3 device:

        node red flow (I have modified ther machine id in the flows so it won't match mine):
        Code:
        [{"id":"7d2f0c33.cd50c4","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"fb18bebd.83eaa","type":"string","z":"7d2f0c33.cd50c4","name":"Wash Machine","methods":[{"name":"delLeftMost","params":[{"type":"str","value":"MY WASHER ID: Washer (WASHER T1789EFH_F)"}]},{"name":"delRightMost","params":[{"type":"str","value":"MY DRYER ID : Dryer (DRYER RV10A9AS_D_US_WIFI)"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":333,"y":115,"wires":[["3c453c63.ee2894"]]},{"id":"f6c8b2e2.07bde","type":"string","z":"7d2f0c33.cd50c4","name":"Dryer","methods":[{"name":"delLeftMost","params":[{"type":"str","value":"MY dryer id: Dryer (DRYER RV10A9AS_D_US_WIFI)"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":297,"y":206,"wires":[["5f5b8b2c.4d6634"]]},{"id":"3c453c63.ee2894","type":"yaml","z":"7d2f0c33.cd50c4","property":"payload","name":"","x":495,"y":119,"wires":[["9e4a2aff.933f28"]]},{"id":"5f5b8b2c.4d6634","type":"yaml","z":"7d2f0c33.cd50c4","property":"payload","name":"","x":487,"y":203,"wires":[["ac64fd19.a33f3"]]},{"id":"be8915bb.709db8","type":"mqtt in","z":"7d2f0c33.cd50c4","name":"","topic":"Mqtt/LG","qos":"0","datatype":"utf8","broker":"26709ce.98da664","x":97,"y":145,"wires":[["fb18bebd.83eaa","f6c8b2e2.07bde"]]},{"id":"9e4a2aff.933f28","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snapshot.washerDryer.state","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":677.5,"y":147,"wires":[["7664f70c.e6bee8"]]},{"id":"ac64fd19.a33f3","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snapshot.washerDryer.state","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":672,"y":208,"wires":[["4e276bbf.27ff84"]]},{"id":"97ac714b.6dd2b","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"POWEROFF","fromt":"str","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"END","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"INITIAL","fromt":"str","to":"2","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"DETECTING","fromt":"str","to":"3","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"RUNNING","fromt":"str","to":"4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"RINSING","fromt":"str","to":"5","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"SPINNING","fromt":"str","to":"6","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"PAUSE","fromt":"str","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":996,"y":174,"wires":[["44e9d907.d3d2b8"]]},{"id":"5e8516cb.3c8998","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"POWEROFF","fromt":"str","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"END","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"INITIAL","fromt":"str","to":"2","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"DRYING","fromt":"str","to":"3","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"COOLING","fromt":"str","to":"4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"PAUSE","fromt":"str","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":959,"y":233,"wires":[["eed9f246.f6abd"]]},{"id":"1732d9bd.208296","type":"flogger","z":"7d2f0c33.cd50c4","name":"LGWASHER","logfile":"LGWASHER","inputchoice":"fullmsg","inputobject":"payload","inputobjectType":"msg","inputmoustache":"Recieved payload {{payload}} and topic {{topic}}","loglevel":"INFO","logconfig":"7afe2599.bb983c","sendpane":"","x":1034,"y":100,"wires":[[]]},{"id":"e778c75d.b6e118","type":"flogger","z":"7d2f0c33.cd50c4","name":"LGWASHER","logfile":"LGDRYER","inputchoice":"fullmsg","inputobject":"payload","inputobjectType":"msg","inputmoustache":"Recieved payload {{payload}} and topic {{topic}}","loglevel":"INFO","logconfig":"7afe2599.bb983c","sendpane":"","x":936,"y":302,"wires":[[]]},{"id":"7664f70c.e6bee8","type":"rbe","z":"7d2f0c33.cd50c4","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":851,"y":117,"wires":[["1732d9bd.208296","97ac714b.6dd2b","a7bbc41b.6fb928"]]},{"id":"4e276bbf.27ff84","type":"rbe","z":"7d2f0c33.cd50c4","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":802,"y":268,"wires":[["e778c75d.b6e118","5e8516cb.3c8998","89428f62.78dd3"]]},{"id":"89428f62.78dd3","type":"debug","z":"7d2f0c33.cd50c4","name":"dryer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1144.5,"y":342,"wires":[]},{"id":"44e9d907.d3d2b8","type":"http request","z":"7d2f0c33.cd50c4","name":"WASHER","method":"GET","ret":"txt","paytoqs":false,"url":"http://127.0.0.1:80/JSON?request=setdevicestatus&ref=3071&value={{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":1182,"y":176,"wires":[[]]},{"id":"eed9f246.f6abd","type":"http request","z":"7d2f0c33.cd50c4","name":"DRYER","method":"GET","ret":"txt","paytoqs":false,"url":"http://127.0.0.1:80/JSON?request=setdevicestatus&ref=3073&value={{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":1159,"y":241,"wires":[[]]},{"id":"a7bbc41b.6fb928","type":"debug","z":"7d2f0c33.cd50c4","name":"Washer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":978,"y":487,"wires":[]},{"id":"26709ce.98da664","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"7afe2599.bb983c","type":"config-log","z":"","logname":"loggin","logdir":"/opt/FlogggerLogs","stamp":"utc","logstyle":"plain","logrotate":false,"logcompress":false,"logrotatecount":"5","logsize":"1000"}]

        I plan to add some other attribute as hs3 device like :
        "error": and remaining time ( need to so some maths in node red because i need to merge the "remainTimeHour" and "remainTimeMinute": into one value (+ keep in mind that when the appliance is done with its thing... the "remainTimeMinute": still stay at 01 minute in the api...so when status is set to ''off'' i will need to change the time in the hs3 device to 0 minutes )).

        Hope this helps. I think it is somewhat a good environement to test what this non official apiv2 can offer.
        Attached Files

        Comment


          #19
          Love your discovery ! I cloned the git repository, and after some fiddling with the example.py, I have gotten the much missed output from my washer!

          Comment


            #20
            nice to hear!

            Comment


              #21
              Originally posted by MattL0 View Post
              I created small ''script'' named LG.SH into the folder /wideq-api2_merged.

              here it is :
              Code:
              #!/bin/bash
              
              while true
              do
              
              python3 example.py -c CA -l en-CA > LGoutput.txt && mosquitto_pub -t Mqtt/LG -f ./LGoutput.txt
              sleep 20
              done
              Then i create a systemd service to start this script at boot :

              here is my systemd service file :

              Code:
              [Unit]
              Description=LG script
              After=network-online.target
              Wants=network-online.target
              
              [Service]
              WorkingDirectory=/wideq-api2_merged
              ExecStart=/wideq-api2_merged/LG.sh
              Restart=always
              RestartSec=30
              SyslogIdentifier=LG
              StandardOutput=null
              KillMode=none
              TimeoutStopSec=300
              
              [Install]
              WantedBy=multi-user.target
              Then i created this flow in nodered , the flow send the stats attribut for both machine into the respective hs3 device:

              node red flow (I have modified ther machine id in the flows so it won't match mine):
              Code:
              [{"id":"7d2f0c33.cd50c4","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"fb18bebd.83eaa","type":"string","z":"7d2f0c33.cd50c4","name":"Wash Machine","methods":[{"name":"delLeftMost","params":[{"type":"str","value":"MY WASHER ID: Washer (WASHER T1789EFH_F)"}]},{"name":"delRightMost","params":[{"type":"str","value":"MY DRYER ID : Dryer (DRYER RV10A9AS_D_US_WIFI)"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":333,"y":115,"wires":[["3c453c63.ee2894"]]},{"id":"f6c8b2e2.07bde","type":"string","z":"7d2f0c33.cd50c4","name":"Dryer","methods":[{"name":"delLeftMost","params":[{"type":"str","value":"MY dryer id: Dryer (DRYER RV10A9AS_D_US_WIFI)"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":297,"y":206,"wires":[["5f5b8b2c.4d6634"]]},{"id":"3c453c63.ee2894","type":"yaml","z":"7d2f0c33.cd50c4","property":"payload","name":"","x":495,"y":119,"wires":[["9e4a2aff.933f28"]]},{"id":"5f5b8b2c.4d6634","type":"yaml","z":"7d2f0c33.cd50c4","property":"payload","name":"","x":487,"y":203,"wires":[["ac64fd19.a33f3"]]},{"id":"be8915bb.709db8","type":"mqtt in","z":"7d2f0c33.cd50c4","name":"","topic":"Mqtt/LG","qos":"0","datatype":"utf8","broker":"26709ce.98da664","x":97,"y":145,"wires":[["fb18bebd.83eaa","f6c8b2e2.07bde"]]},{"id":"9e4a2aff.933f28","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snapshot.washerDryer.state","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":677.5,"y":147,"wires":[["7664f70c.e6bee8"]]},{"id":"ac64fd19.a33f3","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snapshot.washerDryer.state","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":672,"y":208,"wires":[["4e276bbf.27ff84"]]},{"id":"97ac714b.6dd2b","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"POWEROFF","fromt":"str","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"END","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"INITIAL","fromt":"str","to":"2","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"DETECTING","fromt":"str","to":"3","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"RUNNING","fromt":"str","to":"4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"RINSING","fromt":"str","to":"5","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"SPINNING","fromt":"str","to":"6","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"PAUSE","fromt":"str","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":996,"y":174,"wires":[["44e9d907.d3d2b8"]]},{"id":"5e8516cb.3c8998","type":"change","z":"7d2f0c33.cd50c4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"POWEROFF","fromt":"str","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"END","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"INITIAL","fromt":"str","to":"2","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"DRYING","fromt":"str","to":"3","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"COOLING","fromt":"str","to":"4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"PAUSE","fromt":"str","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":959,"y":233,"wires":[["eed9f246.f6abd"]]},{"id":"1732d9bd.208296","type":"flogger","z":"7d2f0c33.cd50c4","name":"LGWASHER","logfile":"LGWASHER","inputchoice":"fullmsg","inputobject":"payload","inputobjectType":"msg","inputmoustache":"Recieved payload {{payload}} and topic {{topic}}","loglevel":"INFO","logconfig":"7afe2599.bb983c","sendpane":"","x":1034,"y":100,"wires":[[]]},{"id":"e778c75d.b6e118","type":"flogger","z":"7d2f0c33.cd50c4","name":"LGWASHER","logfile":"LGDRYER","inputchoice":"fullmsg","inputobject":"payload","inputobjectType":"msg","inputmoustache":"Recieved payload {{payload}} and topic {{topic}}","loglevel":"INFO","logconfig":"7afe2599.bb983c","sendpane":"","x":936,"y":302,"wires":[[]]},{"id":"7664f70c.e6bee8","type":"rbe","z":"7d2f0c33.cd50c4","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":851,"y":117,"wires":[["1732d9bd.208296","97ac714b.6dd2b","a7bbc41b.6fb928"]]},{"id":"4e276bbf.27ff84","type":"rbe","z":"7d2f0c33.cd50c4","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":802,"y":268,"wires":[["e778c75d.b6e118","5e8516cb.3c8998","89428f62.78dd3"]]},{"id":"89428f62.78dd3","type":"debug","z":"7d2f0c33.cd50c4","name":"dryer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1144.5,"y":342,"wires":[]},{"id":"44e9d907.d3d2b8","type":"http request","z":"7d2f0c33.cd50c4","name":"WASHER","method":"GET","ret":"txt","paytoqs":false,"url":"http://127.0.0.1:80/JSON?request=setdevicestatus&ref=3071&value={{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":1182,"y":176,"wires":[[]]},{"id":"eed9f246.f6abd","type":"http request","z":"7d2f0c33.cd50c4","name":"DRYER","method":"GET","ret":"txt","paytoqs":false,"url":"http://127.0.0.1:80/JSON?request=setdevicestatus&ref=3073&value={{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":1159,"y":241,"wires":[[]]},{"id":"a7bbc41b.6fb928","type":"debug","z":"7d2f0c33.cd50c4","name":"Washer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":978,"y":487,"wires":[]},{"id":"26709ce.98da664","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"7afe2599.bb983c","type":"config-log","z":"","logname":"loggin","logdir":"/opt/FlogggerLogs","stamp":"utc","logstyle":"plain","logrotate":false,"logcompress":false,"logrotatecount":"5","logsize":"1000"}]

              I plan to add some other attribute as hs3 device like :
              "error": and remaining time ( need to so some maths in node red because i need to merge the "remainTimeHour" and "remainTimeMinute": into one value (+ keep in mind that when the appliance is done with its thing... the "remainTimeMinute": still stay at 01 minute in the api...so when status is set to ''off'' i will need to change the time in the hs3 device to 0 minutes )).

              Hope this helps. I think it is somewhat a good environement to test what this non official apiv2 can offer.
              Will you use this non official (wideq) api? Not all the fonctions were working so i had to send all raw text to node red (not a programmer here) stefxx

              Comment


                #22
                Hi , not sure I understand your question.

                I will be using the official API v2 (on of the main reasons to consider my own version of the plugin, as the current API v1 doesn't show new devices). The API is undocumented, so it will take some reverse engineering and off course I will look into other developments as well (including the wideq initiative). But as wideq is using python it cannot simply be incorporated or converted into dotNet, which is required for HomeSeer plugins.
                stefxx

                Comment

                Working...
                X