Inheriting OnOff States and Client Buttons

Posted on
Wed Aug 16, 2023 8:33 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Inheriting OnOff States and Client Buttons

I'm writing a simple plugin and I'd like to have my device allow OnOff state and status request. I've used the "relay" device type but all I see is the battery meter in my device. Here's my device definition:

pic.png
pic.png (162.36 KiB) Viewed 686 times


Code: Select all
<?xml version="1.0"?>
<Devices>
   <!-- Define some devices -->
   <Device type="relay" id="televisions">

   <Name>Samsung TV</Name>
   <ConfigUI>
      <SupportURL>https://forums.indigodomo.com/viewforum.php?f=363</SupportURL>
      <Field id="ipaddress" type="textfield">
                <Label>IP Address</Label>
        </Field>
        <Field id="port" type="textfield" defaultValue="8002">
                <Label>Port</Label>
        </Field>
        <Field id="mac" type="textfield" defaultValue="false">
                <Label>Mac Address</Label>
        </Field>
   </ConfigUI>
   <States>
      <State id="name">
         <ValueType>String</ValueType>
         <TriggerLabel>Name</TriggerLabel>
         <ControlPageLabel>Name</ControlPageLabel>
      </State>
      <State id="macaddress">
         <ValueType>String</ValueType>
         <TriggerLabel>MAC Address</TriggerLabel>
         <ControlPageLabel>MAC Address</ControlPageLabel>
      </State>
      <State id="model">
         <ValueType>String</ValueType>
         <TriggerLabel>Model</TriggerLabel>
         <ControlPageLabel>Model</ControlPageLabel>
      </State>
      <State id="status">
         <ValueType boolTyoe="OnOff">Boolean</ValueType>
         <TriggerLabel>Name</TriggerLabel>
         <ControlPageLabel>Name</ControlPageLabel>
      </State>
      <State id="device_id">
         <ValueType>String</ValueType>
         <TriggerLabel>Device ID</TriggerLabel>
         <ControlPageLabel>Device ID</ControlPageLabel>
      </State>
      <State id="os">
         <ValueType>String</ValueType>
         <TriggerLabel>Operating System</TriggerLabel>
         <ControlPageLabel>Operating System</ControlPageLabel>
      </State>
   </States>
   <UiDisplayStateId>status</UiDisplayStateId>
   </Device>
</Devices>

Posted on
Wed Aug 16, 2023 8:35 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Inheriting OnOff States and Client Buttons

That does not look right. Disable plugin, delete device, make sure you actually have the right version installed, then reenable.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Aug 16, 2023 8:50 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Inheriting OnOff States and Client Buttons

FlyingDiver wrote:
That does not look right. Disable plugin, delete device, make sure you actually have the right version installed, then reenable.


Thanks, that's better. I guess you can't change a device type without deleting it. Noted.

Posted on
Wed Aug 16, 2023 8:52 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Inheriting OnOff States and Client Buttons

Yeah, there's some things you can change, but not the type.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests