Page 1 of 1

Device created in plugging, use in blocky

Posted: Friday 24 March 2017 12:03
by St7ven
Hi,

Within blocky, I'm trying to use a device that has been created with a python plugin :

Code: Select all

Domoticz.Device(Name="Plugin_Blind", Unit=2, TypeName="Switch", DeviceID="07070707",  Switchtype=3).Create()
The device appear in blocky but the statement are not executed correctly (if plugin_devince = Closed). Nevertheless, the current states display the good state of this device.

It seems as only the OnCommand() function of the pluggin is called?

By the way, this device does not change icon state either on the switch tab.

I have noticed a difference between a dummy blind switch and the plugin device blind switch :

[img]Debug_Blind_switch.jpg[/img]

I was looking for the list of TypeName and SwitchType. TypeName are clearly mentionned here https://www.domoticz.com/wiki/Developin ... hon_plugin. Is it up to date ? Where could I find the switchtype number list ?

Thank you for your help

Re: Device created in plugging, use in blocky

Posted: Friday 24 March 2017 14:47
by Dnpwwo
@St7ven,

The TypeName parameter really just mimics what is available in the Dummy hardware type for consistency. If you want to copy a device type that you already have that works I would recommend using the Type, SubType & SwitchType parameters instead, you get get much better control over what is created.

You can look in the Domoticz database's DeviceStatus table using somethink like sqlite3 browser to pick up the values of existing devices.

Re: Device created in plugging, use in blocky

Posted: Friday 24 March 2017 16:40
by St7ven
@Dnpwwo

Very usefull tool. Thank you for the tips ! Devices are working fine now. I forgot to update Devices[x].update(values...)

Is is possible to create scene (group) from a python plugin ?

Re: Device created in plugging, use in blocky

Posted: Friday 24 March 2017 23:02
by Dnpwwo
@St7ven,

You can't create scenes or groups in the current version. Maybe in the future.

Re: Device created in plugging, use in blocky

Posted: Monday 27 March 2017 8:04
by St7ven
Thank you for you support Dnpwwo. Really appreciate it.

Re: Device created in plugging, use in blocky

Posted: Friday 02 June 2017 13:12
by Terry321
since The systems like Netflix charge us a lot. You TV Player makes You TV Player APK Download type of site for downloading the APK data.