Virtual HTTP Light Devices, supporting RGB(WW), Dimmers, Switch and much more (Tasmota, ESP*, Shelly)

Ouch. I’ll take a look and report back soon.

In case it helps, here is the contents of the luup file d_binarylight1.xml

<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
  <specVersion>
    <major>1</major>
    <minor>0</minor>
  </specVersion>
  <device>
    <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
    <staticJson>D_BinaryLight1.json</staticJson>
    <serviceList>
      <service>
        <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
        <serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId>
        <SCPDURL>S_SwitchPower1.xml</SCPDURL>
      </service>
      <service>
        <serviceType>urn:schemas-micasaverde-com:service:EnergyMetering:1</serviceType>
        <serviceId>urn:micasaverde-com:serviceId:EnergyMetering1</serviceId>
        <SCPDURL>S_EnergyMetering1.xml</SCPDURL>
      </service>
      <service>
        <serviceType>urn:schemas-micasaverde-com:service:HaDevice:1</serviceType>
        <serviceId>urn:micasaverde-com:serviceId:HaDevice1</serviceId>
        <SCPDURL>S_HaDevice1.xml</SCPDURL>
      </service>
    </serviceList>
  </device>
</root>

I currently shifted to using the httpswitch for kankun kk-sr3 and modded my luup to tag the device as an on/off switch so that it is also recognize in amazon alexa. Thanks to the community…

D_BinaryLight1.xml is a system file and shouldn’t be needed.
AFAIK it’s case sensitive and I don’t have any reports similar to your.

I am using Tasmota, too, but I do not suggest using MQTT unless you do not need it. There is one extra service without need.

Tasmota supports Rules, and with rules, you can send web calls… for example:

  • go to the Tasmota Console
  • type:
    Rule1 on Power1#State=0 do WebSend [xxx.xxx.xxx.xxx:3480] /data_request?id=action&output_format=json&DeviceNum=189&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0 endon on Power1#State=1 do WebSend [xxx.xxx.xxx.xxx:3480] /data_request?id=action&output_format=json&DeviceNum=189&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 endon

xxx.xxx.xxx.xxx is address of your vera, and 189 is ID of your switch…

I have similar problem. I believe app is great and would solve bunch of my problems. But, when I create new device, there is no properties I can set…

First device is not even shown…

Have you installed it from the store o manually?

Actually, I tried both… Manually I was able to create new RGB and Dimmer device, but no success with regular switches.

I think you made excellent first step, and that idea is great. I use Tasmota a lot, and I found it very affordable basis for IoT. However, there are plenty of possibilities that could be implemented. I would be happy to help in order to create even better version of this plugin. I can even help creating scripts for configuring tasmota remotely, too, for two-way communication.

I it possible that this plugin is in some kind of collision with Switchboard plugin by rigpapa? I am using it intensively. As I can see, some vitual switches are overriden with propertises of manual added switch from your plugin…

@therealdb I have the same error. System error: Device: 374. Fail to load implementation file D_BinaryLight1.xml

Ok, I finally got it. Implementation file should be I_VirtualBinaryLight1.xml, not D_BinaryLight1.xml (that’s a device file, not an implementation file)

  • Upnp Device Filename/Device File: D_BinaryLight1.xml
  • Upnp Implementation Filename/Implementation file: I_VirtualBinaryLight1.xml

I took a look at the app store again, and it’s OK. Very strange behavior.

1 Like

Switchboard is about automation, this plug-in is about calling HTTP endpoints to control devices. I will be more than happy to include speciale behavior for Tasmota, even if my initial idea was to make it very light and not dependent on external things.

Blockquote[quote=“therealdb, post:32, topic:209297”]
I it possible that this plugin is in some kind of collision with Switchboard plugin by rigpapa? I am using it intensively. As I can see, some vitual switches are overriden with propertises of manual added switch from your plugin…

Switchboard is about automation, this plug-in is about calling HTTP endpoints to control devices. I will be more than happy to include speciale behavior for Tasmota, even if my initial idea was to make it very light and not dependent on external things.
[/quote]

Ok, it might be that my installation is little bit more complicated. I must be sure how it works. It might be that I did something wrong. But, so far I like your idea a lot.

And, about tasmota, it has really extensive APIs, and they can be utilized a lot. My problem is that I am not so familiar with Vera environment, but I can write you web calls where you can get an answer whether is device on or off. Having if fully automatic would be even better.

Just catching up with this conversation… a few months ago, @akbooer added some additional device files to the internal filesystem of openLuup. No longer necessary to copy them from Vera or the UPnP.org web site. I’m not sure exactly what version that was, but suffice it to say that his current development versions have them, including D_BinaryLight1.xml.

2 Likes

I’m not a fan of polling, but I might implement it. It’s not hard, but it’s about writing a general implementation that will adapt to tasmota, Shelley and no brand devices. I will make some experiment and see if is easily doable later this month.

OK, it sounds great. There actually two options:

  1. to pool devices (I do not like it, too)
  2. to force device to report it state (which is also possible, but little bit more complicated depending of the device (I configure tasmota my self to do so, but it is hardly generic configuration)

However, can’t wait for your next step :slight_smile:

@therealdb Do what you asked me but it still doesn’t work. I want to use this app. Only I have done it with a virtual button plus the Shelly api and I have the on / off.

Change it, then reload luup engine and hard refresh your Browser.

I’m not sure this will help but here is how i have my tasmota switches working.

  1. Install the HTTP Switch (WiFi Switch) plugin.
    • Search for Small K WiFi Switch in the app installer.
  2. Under the variables set the address to the IP address of the device (static).
  3. Under variables set the GPIO to 12.

That should be enough to get your switches working with Vera.

@therealdb I have performed your procedure and it still does not work.

Please post two screenshots of your settings and variables.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules