Ankündigung

Einklappen
Keine Ankündigung bisher.

Miele@Home LBS for Homeserver (14360)

Einklappen
Dieser Beitrag wurde beantwortet.
X
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    HS/FS Miele@Home LBS for Homeserver (14360)

    Miele Baustein for Gira Homeserver (LBS 14360)

    See the YouTube movie I made for some examples of what's possibe!



    miele_v1.1.png

    Inputs and Outputs
    Input 1: Debug (0=off, 1=on, will only show output on the Homeserver VGA display or VMWare console when connected)
    Input 2: Client ID (text)
    Input 3: Client Secret (text)
    Input 4: Username (text, i.e. email@mydomain.com )
    Input 5: Password (text)
    Input 6: Account Language (text, i.e. nl-NL or de-DE)
    Input 7: Device (text, i.e. 56456456)
    Input 8: Get All Devices (0/1, trigger)
    Input 9: Get Device (0/1, trigger)
    Input 10: Get Ident (0/1, trigger)
    Input 11: Get State (0/1, trigger)
    Input 12: Get Actions (0/1, trigger)
    Input 13: Get Programs (0/1, trigger)
    Input 14: Set JSON Actions (text, trigger. Can be any advanced action, example: {"targetTemperature":[{"zone":2,"value":-20}]} )
    Input 15: Set JSON Programs (text, trigger. Can be any advanced Program, example: {"programId":24,"duration":[1,15],"temperature":220} )
    Input 16: Set Power (0=off, 1=on, trigger)
    Input 17: Set Light (0=off, 1=on, trigger)
    Input 18: Set Color (text, can be: white, blue, red, yellow, orange, green, pink, purple or turquoise, trigger)
    Input 19: Set Modes (0/1, 0=Normal operation mode, 1=Sabbath mode, trigger)
    Input 20: Set DeviceName (text, modify the devicename, trigger)
    Input 21: Set ProcessAction (numeric, 1=Start, 2=Stop, 3=Pause, 4=Start superfreezing, 5=Stop superfreezing, 6=Start supercooling, 7=Stop supercooling, trigger)
    Input 22: Set VentilationStep (numeric, 1=Step1, 2=Step2, 3=Step3, 4=Step4, trigger)
    Input 23: Set ProgramId (numeric, trigger. Trigger a Get Programs to see all available ProgramIds.)
    Input 24: Get Rooms (0/1, both 0 and 1 will trigger. Get the Room information for the device (as on input 7) and write output to Output 11)
    Input 25: Room: Set Map ID (numeric, will not trigger the clean room function! Only the Set Room ID will do that. This just sets the Map ID and is needed before setting the Room ID)
    Input 26: Room: Set Room ID (numeric, any number will trigger the Clean Room function. The Room ID of the device (as on input 7) to clean)

    Output 1: Error (0=no error, 1=an error occured)
    Output 2: Error Text (text, detailed error text >14chars)
    Output 3: Device Info (text >14chars, triggered by Input 8 or Input 9)
    Output 4: Ident Info (text >14chars, triggered by Input 10)
    Output 5: State Info (text >14chars, triggered by Input 11)
    Output 6: Available Actions (text >14chars, triggered by Input 12)
    Output 7: Available Programs (text >14chars, triggered by Input 13)
    Output 8: Power (0=off, 1=on, triggered by Input 16 or Input 11)
    Output 9: Light (0=off, 1=on, triggered by Input 17 or Input 11)
    Output 10: Color (text, triggered by Input 18 or Input 11)
    Output 11: Rooms (text, >14chars, triggered by Input 24)


    Release Notes
    v1.5 - 21-07-2023 - Miele_14360_v1.5.zip
    * Set timeout to 5 seconds to the Miele API, so the Homeserver will not become slow/overloaded/queued.
    * Close all connections as to Miele API as soon as possible to keep memory free.
    * Added vacuum cleaner options: Get Rooms and Set Map ID/Room ID to start cleaning in a specific room.
    * Updated to be Python v3 compatible (for any future HS updates).​

    v1.4 - 22-06-2022 - Miele_14360_v1.4.zip
    * Fix for initiating module / fix for need a reboot first
    * Automatically corrects uppercase/lowercase country like de-de or de-DE (an often made mistake)
    * Fixes the Set ProgramID (input23) which didn't work. Thanks to knxhans for mentioning this bug.

    v1.3 - 29-12-2021 - Miele_14360_v1.3.zip
    * Does not check for validity of Miele SSL certificate anymore since some homeservers have old root certificates. This resulted in v1.2 doing nothing on some physical'homeservers (even they were running 4.11.1).

    v1.2 - 22-11-2021 - Miele_14360_v1.2.zip
    * Small contextual Help File corrections

    v1.1 - 25-11-2021
    * Added raw JSON input for Actions so any action can be set.
    * Added raw JSON input for Programs so any program can be set.
    * Added Set Modes to set the device in normal or Sabbath mode
    * Added Set Devicename to change the devicename
    * Added Set ProcessAction to set various actions. Depends on device type (most freezers have options 4-7, an oven has only 1 and 2)
    * Added Set VentilationStep to set the ventilation step between 1 and 4.
    * Added Set ProgramId to start a program on the washingmachine, dryer or oven. To check which programs are available: Trigger a Get Programs at Input 13.

    v1.0 - 24-11-2021
    * Compatible and tested with Homeserver 4.11 and 4.11.1
    * Power and Light tested with Miele CVA 7845


    Installation instructions
    1. Download the Building block: Miele_14360_v1.5.zip
    2. Add it to a new Homeserver Logic tab.
    3. Go to: https://www.miele.com/f/com/en/register_api.aspx and just add a new Application Name and enter your e-mail address. You will receive an email with an activation link.
    4. Click on the activation link. Login with your Miele account (and set your language to the language/country in which you have this account.
    5. Copy the Client ID and Client Secret to the Building Block.
    6. Set the Username/Password and Language of your account. See the Youtube movie for examples.

    Original release blog: https://www.roelbroersma.nl/miele-bu...-knx-lbs-14360
    Can be find in the Downloadbereich at: https://service.knx-user-forum.de/?c...nload&id=14360
    More information about the Miele API: https://www.miele.com/developer/


    Alternatives
    Edomi LBS 19002325 https://service.knx-user-forum.de/?c...ad&id=19002325 from Andre Feld (written in PHP)
    Zuletzt geändert von Roeller; 23.07.2023, 11:43.
  • Als Antwort markiert von Roeller am 22.06.2022, 12:42.

    ****Blocking first post for any updates****

    Kommentar


      #2
      ****Blocking first post for any updates****

      Kommentar


        #3
        Hi Roeller,

        great. Such module is still on my list to control my washing machine and start it in conjunction of provided PV energy. Did some calls with postman but was to lacy to start the washing machine at night to get proper data on the endpoints ;-)

        When I look to the inputs and outputs of your module it seems that it's not a covering the whole Miele@Home capabilities and hard to adopt it in a way to cover all available Miele devices (https://www.miele.com/developer/capabilities.html). Maybe you consider adjust the name a bit to avoid confusion and create different modules for different usecases?

        Looking forward to your blogposts to get a rough overview. Is the code available on github under a open source license? Then I could imagine to build my module based on your previous work.
        ​​​​​​​

        Kommentar


          #4
          Hi SvenB, The next version (v1.1) will have more actions, like starting various actions (targetTemperature, startTime,..) and Starting Programs (Start an Oven Action for a specific duration and a specific Temperature, Start the Washing Machine (program Cotton) or the Dryer,..etc.).

          It will have more Inputs (continue at E17..-..E20). I am in doubt to make a trigger action for various actions/programs or to make a more generic JSON input field:
          1. Option A: If I will make Inputs for a lot of actions (like for the Oven), I need a lot of extra inputs, for Temperature, for Duration, for ProgramID, for Step,..etc. Other devices will ask for whole different parameters for a specific program. However, having more inputs is more user friendly in your logic.
          2. Option B: I can also make a "JSON Action Input" Input at E17. To Start your Oven, you will parse: { "programId": 24, "duration": [ 1, 15 ], "temperature": 220 } to it. Or to start the Washingmachine: { "programId": 133 }
            This will require you to have more advanced logic so you can parse an input string to the Building Block
          What do you think?

          PS. It's not yet on Github, but it will.

          Kommentar


            #5
            I've updated the LBS. So any raw advanced action can be set. But also simple actions by just triggering (a programId, a ventilationStep or a Sabathmode).
            Need some more testing time. Will be uploaded soon!!

            Kommentar


              #6
              Great! Some parts of this would be perfect for a new X1 logic module.....

              Kommentar


                #7
                Just updated the Baustein to v1.3. I saw that some (physical) homeserver 4 machines did not want to verify the Miele SSL certificate. The SSL check is now disabled. So if you've downloaded the Baustein (v1.1 or v1.2) and it didn't do anything at all... It's probably solved using this v1.3

                Kommentar


                  #8
                  Hallo,

                  Woher bekommt man die Device Nummer? Ev. die Seriennummer vom Gerät …
                  „Input 7: Device (text, i.e. 56456456)“

                  lg
                  Walter
                  Zuletzt geändert von Engel der Nacht; 06.01.2022, 13:42.

                  Kommentar


                    #9
                    If you have a gateway then access it with a browser, select 'settings', then it will be shown in your device listing.

                    Kommentar


                      #10
                      Zitat von Engel der Nacht Beitrag anzeigen
                      Hallo,

                      Woher bekommt man die Device Nummer? Ev. die Seriennummer vom Gerät …
                      „Input 7: Device (text, i.e. 56456456)“

                      lg
                      Walter
                      Go to the Miele App (iPhone or Android) and click the Device for which you want to see the Device ID.
                      Then select settings (on iPhone it is the little radar in the upper right corner). Click "Information" and you will see the "Serial Number". That is the Device Number. You need to give exactly this number it probably has about 2 or 3 zeros in front of it, just copy the whole number including the zeros.


                      Kommentar


                        #11
                        Thanks a lot

                        Kommentar


                          #12
                          I'm always getting this error.
                          "Unauthorized, probably Security token expired it will automatically renew next time"
                          While using using examples on the miele website with credentials it works.

                          Kommentar


                            #13
                            I also had troubles with the login. But after doing a second login on the following website, it finally worked for me: https://www.miele.com/developer/swagger-ui/index.html

                            Kommentar


                              #14
                              1. Request Application here: https://www.miele.com/f/com/en/register_api.aspx. Even if you request 2 or 3 times. You will only receive 1 e-mail.
                              2. You receive an email about 5-10 minutes later. Click the link in the mail.
                              3. Write down the Miele Client_ID and CLient_Secret.
                              4. Click to ALLOW and Continue.
                              5. Go to https://www.miele.com/developer/swagger-ui/swagger.html and click on Authorize ONE time. You will need to enter the Client ID, Client Secret and it will continue to a step where you need to login. After that, it asks you to ALLOW third-party/privacy settings.



                              (step 5 will soon be integrated in the Baustein and is then not needed anymore)

                              Kommentar


                                #15
                                HS debug is reporting (on HS Version 4.11.2) Any ideas would be helpful

                                File "hs_logik.py", line 230, in calc
                                File "formula", line 1, in [module]
                                File "[14360_Miele_0]", line 52, in __init__
                                File "[14360_Miele_0]", line 70, in check
                                File "[14360_Miele_0]", line 107, in get_code
                                NameError: global name 'auth_url' is not defined
                                [5012L, 14360L, 1L, '(EI or EC[1] or EC[2] or EC[3] or EC[4] or EC[5] or EC[6] or EC[7])', 'Miele(locals())', '', 0L, 0L, 1L, 0L]
                                Zuletzt geändert von FHohenad; 05.02.2022, 08:19. Grund: did a restart and now it works :-)

                                Kommentar

                                Lädt...
                                X