Announcement

Collapse
No announcement yet.

WiFi Controlled USB and Mains Power Strip

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

  • Michael McSharry
    replied
    Good news that you got it working. Since your image is purple you likely have not got it setup in the best way. This should mean that you have an existing HS device that you associated with the MQTT topic.

    The normal situation is to have a mcsMQTT device for this purpose. Undo what you did to associate the topic to HS device. On the Association tab find the status from the power strip. This will be something like sonoff/stateower. Click the A checkbox on this row. It will create a mcsMQTT device. Then for the pub: text box on this device use what you entered for the first one you created.

    When I setup my Tasmota devices I have the MQTT Full topic to be %topic%/ and the Topic to be whatever I want to call the device (e.g. sonoff-powerstrip-1). Doing it this way I remove the Sonoff from the start of the Topic. Nothing wrong with what you have, but I find it just extra text of no value to me.

    Leave a comment:


  • rcrules
    replied
    This is cool stuf!! You never cease to amaze Michael. I got my power strip in and reflashed the firmware. I am still slow on picking up the mcsMQTT skills but I got one of the outlets to go ON/OFF using the attached info. Thanks again!!

    Leave a comment:


  • Michael McSharry
    replied
    It is actually easier than the SonOTA.exe for doing Sonoff devices, but you need to have something like RPi to run the Tuya emulation. I am not aware of anybody who has tried to port this to Windows. The first one I saw is at https://www.youtube.com/watch?v=O5GYh470m5k. I also put the shorthand version in http://mcsSprinklers.com/mcsMQTT.pdf Section 14.12. It only takes a couple minutes to reflash them once setup with the software loaded on RPi. If you want to bear the shipping cost then I will do it for you. Alternately you can have it shipped to me and I will resend when flashed.

    Leave a comment:


  • mterry63
    replied
    So I bought one of these, but reviewing the OTA flash instructions I'm challenged. I don't have an RPI, and my native wifi network at home is 192.168.4.0, so... care to share the serial flash instructions? Same as a Sonoff Basic? I've done a couple of those.

    Leave a comment:


  • Michael McSharry
    replied
    Let us know how it works out... I may get one if I can send simple HTTP commands from HS3.
    Tasmota supports HTTP control. I believe, but bsobel needs to confirm, that his plugin will also control it with the original Tuya firmware.

    [/quote]The USB are NOT switched independently. They are all on or all off.[/quote]
    confirmed. GPIO14 is used to control the USB so they are all on or off. I have seen a mini plug on Amazon https://www.amazon.com/dp/B07G78YSQS..._t2_B074YGV2NK that indicates the USB can be turned on/off via App. Since it is only one USB port you could stack these and have individual control of each USB.

    Leave a comment:


  • bsobel
    replied
    Originally posted by drhtmal View Post

    The USB are NOT switched independently. They are all on or all off.
    Thanks (darn)

    Leave a comment:


  • drhtmal
    replied
    Originally posted by bsobel View Post
    Are the usb switched as one or independently? So far on the Tuya ones it is all.
    The USB are NOT switched independently. They are all on or all off.

    Leave a comment:


  • bsobel
    replied
    Are the usb switched as one or independently? So far on the Tuya ones it is all.

    Leave a comment:


  • Ltek
    replied
    Let us know how it works out... I may get one if I can send simple HTTP commands from HS3.

    Leave a comment:


  • Michael McSharry
    started a topic WiFi Controlled USB and Mains Power Strip

    WiFi Controlled USB and Mains Power Strip

    I reflashed the Wheswell ZLD-44USA-W Wifi Power Strip that is available from Amazon https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1.

    Remote controlled power strips are pretty common, but I have not seen many remote control of USB power.

    Click image for larger version

Name:	Capture.PNG
Views:	63
Size:	102.3 KB
ID:	1288943

    I installed Tasmota that allows for remote control via HTTP or MQTT. Seven of the eleven GPIO of the ESP8266 were used for control and status. The configuration I used is shown in the attachment. Relay 1 (inverted) is setup as a master and Relay 2 through 6 are used for mains and USB control. Each has a LED for local feedback that is wired in parallel with its relay. From console "poweronstate 3" was setup so power state of the plugs is maintained after power cycles.

    While I was exploring the GPIO configuration I put the unit into an unbootable state so I opened it up and found flashing via serial straightforward. The digital card was well labeled and access to the necessary pads was easy. Not as easy as a Sonoff with header pins, but solder connections were on the circuit card edge so easy to tack on some wires for the serial connection. Now that I have identified the configuration nobody else that is interested in this unit will need to go through the same steps. Just a OTA firmware update per instructions in Section 14.12 of http://mcsSprinklers.com/mcsMQTT.pdf.

    I was surprised as the amount of electronics that existed on the USB power circuit card. It looked pretty hefty Nothing like the little cubes one uses that comes with smartphone or other small electronics that are powered via USB.

    Click image for larger version

Name:	20190228_203932.jpg
Views:	46
Size:	98.7 KB
ID:	1288944

    Click image for larger version

Name:	Capture.PNG
Views:	47
Size:	32.6 KB
ID:	1288945
Working...
X