Announcement

Collapse
No announcement yet.

Plugin for Sonoff DIY devices - Intro/Config/Screenshots

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Plugin for Sonoff DIY devices - Intro/Config/Screenshots

    .

    Click image for larger version  Name:	BASICR3banner_1920_850.jpg Views:	0 Size:	33.5 KB ID:	1321265
    .

    Great news - Sonoff started a line of devices with local REST control API - they call them Sonoff DIY. The new plugin for Sonoff DIY devices:

    https://shop.homeseer.com/products/a...lug-in-for-hs3

    Currently Sonoff DIY line includes:
    Click image for larger version  Name:	SonoffMini1.jpg Views:	0 Size:	46.1 KB ID:	1320973
    Note 1: The Sonoff DIY firmware is still in active development, so the protocol, instructions, etc. may change often at this stage.

    Note 2: The procedure for connecting new DIY device to the WiFi network is currently a bit involved and requires using Python app provided by Sonoff (tool.exe) https://github.com/itead/Sonoff_Devices_DIY_Tools

    Note 3: Many users (incl. me) have initial discovery issues with current FW (ver. 3.3.0) - don't give up (yet):
    https://youtu.be/fzEDFmB0UYU?t=338
    https://github.com/itead/Sonoff_Devi...Y_Tools/issues
    https://lofurol.fr/joomla/electroniq...e-sonoff-rf-r3

    I'm working with Sonoff on polishing their firmware and especially set-up procedure, but in the mean time I will provide set-up instructions in a separate post. And possibly provide command-line replacement for their Python app which is currently a bit of a pain.
    .
    Click image for larger version  Name:	Capture.PNG Views:	0 Size:	95.1 KB ID:	1320986

    Click image for larger version  Name:	MainConfig.PNG Views:	0 Size:	100.1 KB ID:	1320987


    Click image for larger version  Name:	Config.PNG Views:	0 Size:	101.9 KB ID:	1320988

  • #2
    Connecting new device procedure (FW 3.3.0)

    I try to describe Sonoff pairing procedure in more comprehensible language here. The procedure is currently somewhat involved, hopefully we'll be able to simplify it in the future. Personally I prefer Shelly devices - they are much more professionally developed.

    Note: Sonoff DIY firmware is still in active deleopment, so the most up-to-date information and config tool should be obtained from:

    https://github.com/itead/Sonoff_Devices_DIY_Tools

    Currently the latest working firmware version is 3.3.0. The Sonoff config tool version should match the device firmware version.

    1. SONOFF Basic R3, RFR3 and Mini can operate as either eWeLink Mode or DIY Mode. To switch to DIY Mode need to connect jumper (included) to GPIO 16. First make sure the device has latest firmware (at least 3.3.0). Power the device (not in DIY mode - with jumper removed) and pair with eWeLink app as normally. Check firmware version and update if necessary.

    2. Now change to DIY mode - put the jumper on. Note: when switching between modes all device settings will be reset. YouTube video here.

    3. In DIY mode the new device is looking for predefined WiFi hotspot (SSID sonoffDiy, password 20170618sn). So you need a phone or PC to setup a WiFi access point with these credentials (2.4 GHz is only supported).

    4. The device should connect the WiFi hotspot after a few seconds. Note the blue light - single blinking means that it's not connected, after successful connection should change to double blinking.

    5. Download Sonoff tool from https://github.com/itead/Sonoff_Devi...ee/master/tool

    6. Connect a computer (Windows preferred at this stage) to the same hotspot. Since the device discovery uses mDNS (Multicast DNS zero-configuration networking service) - this is most troubled part. Sonoff tool apparently picks only first available network interface to send mDNS broadcast, so if your computer has multiple interfaces (i.e. laptops have usually WiFi and Ethernet) - it's better to disable Ethernet adaptor to make sure the mDNS uses the WiFi adaptor.

    Some users also suggest to set network to private, not public (https://lofurol.fr/joomla/electroniq...e-sonoff-rf-r3)

    Check other users issues here and report your problems to Sonoff: https://github.com/itead/Sonoff_Devi...Y_Tools/issues

    I might write my own app, to avoid using infamous Sonoff tool which also requires installing Python 3.

    7. If all works and the tool discovers the devices - you can test switching devices on/off.

    Now you should change the device WiFi configuration - click "change SSID _Password" button and enter your WiFi SSID and Password:

    Click image for larger version  Name:	2019-08-15.png Views:	0 Size:	107.3 KB ID:	1321055Click image for larger version  Name:	2019-08-15 (1).png Views:	0 Size:	9.9 KB ID:	1321056

    8. After rebooting the device it should connect to your WiFi network and should be discovered by the plugin.

    Comment


    • #3
      Reserved

      Comment


      • #4
        Great
        Will try your plugin, just ordered 4 sonoff mini

        Comment


        • #5
          Originally posted by lunkan View Post
          Great
          Will try your plugin, just ordered 4 sonoff mini
          Cool. Are you on Windows or Linux?

          Comment


          • #6
            I hope Sonoff will simplify pairing procedure.

            Any issues with devices - please open a ticket with Sonoff https://github.com/itead/Sonoff_Devices_DIY_Tools/issues - it will let them know if users are struggling...

            Comment


            • #7
              Originally posted by alexbk66 View Post
              Cool. Are you on Windows or Linux?
              I'm on Linux, Rpi

              Comment


              • #8
                Originally posted by lunkan View Post
                I'm on Linux, Rpi
                On Linux I found an issue, it doesn't update switch status if switched on/off manually, but otherwise works ok. I'm investigating...

                [EDIT]
                Sonoff use mDNS record to update data (i.e. switch state). Which is cool - doesn't require polling devices for status (like Shelly). Problem is on Linux Mono.Zeroconf doesn't support that. So to fix status update I must implement polling, for now at least.

                Comment


                • #9
                  Linux version mDNS update fixed, without using polling

                  Comment


                  • #10
                    I've got an email from Sonoff, so hopefully the pairing procedure will be improved:

                    We agreed to your point to optimize the device pairing procedure, there is some of other platforms feedback for such. the AP mode is recommended. Our team will discuss and give a solution.

                    Comment


                    • #11
                      Originally posted by alexbk66 View Post
                      Linux version mDNS update fixed, without using polling
                      Sounds great 👍 Just waiting to get my devices.

                      Comment


                      • #12
                        And:

                        yup, we will review all of them. I will discuss with my team for a better DIY MODE.

                        Comment


                        • #13
                          Got the devices today, not shure yet that I will use the DIY_tool.exe. Seems to contain virus.
                          https://github.com/itead/Sonoff_Devi...ools/issues/36

                          Comment


                          • #14
                            Seems to be clean.
                            https://www.virustotal.com/gui/url/d...28d2/detection

                            Comment


                            • #15
                              Yeah, I had same suspicion, asked Sonoff - they didn't reply... I'm also working on C# command line tool - to avoid Sonoff crap

                              [EDIT] I think Sonoff use Py2exe to compile Python code into exe. This is knows for false detection because Py2exe is also used to compile malware - producing similar signature.

                              Comment

                              Working...
                              X