toddaustin07 / webrequestor

Web Requestor Edge Driver
Apache License 2.0
20 stars 8 forks source link

3-way switch, getting light power status back? #10

Open coinzdude opened 8 months ago

coinzdude commented 8 months ago

Thank you very much for this excellent project. I was finally able to use ST to trigger my Gosund Sw6 Tasmota flashed 3-way switch to toggle power properly with a get command like this http://192.168.1.117/?m=1&o=3

The device is using this setup https://templates.blakadder.com/gosund_SW6.html

Do you have any tips to

  1. Get "Request # 1 " to act as a directly accessible UI button for the device tile? Right now, it's just listed as a device, and the only way I find to trigger this is to open the device, select "select web request to execute"
  2. Any suggestions as to how to get the light switch power state back? The tasmota response is currently some broken HTML like
    {t}</table>{t}
    <tr>
    <td style='width:33%;text-align:center;font-weight:bold;font-size:46px'>ON</td>
    <td style='width:33%;text-align:center;font-weight:bold;font-size:46px'>ON</td>
    <td style='width:33%;text-align:center;font-weight:normal;font-size:46px'>OFF</td>
    </tr>
    <tr></tr>
    </table>

    However, I suspect light switch status should come back more event driven, like through MQTT? I'm completely new to MQTT, so I'm not really sure what I'm asking for here yet

toddaustin07 commented 6 months ago

Hello - Sorry for the long delay in responding.

Regarding Q #1, the best way to do that would be to create a virtual switch or button that uses an automation to trigger your web request. You can either try the "native" SmartThings virtual devices or I have another driver that allows you to create all kinds of virtual devices with additional capabilities: https://community.smartthings.com/t/st-edge-vedge-creator-a-virtual-device-generator-for-end-users/231786

Regarding Q #2, I've no idea on this one, as I'm not familiar with your device. If it supports MQTT, then yes, that might be one way to do it. I have an MQTT Devices driver that may be useful to you: https://github.com/toddaustin07/MQTTDevices