Search found 22 matches

by St7ven
Wednesday 29 March 2017 17:40
Forum: Python
Topic: Error Python : Return name Error
Replies: 2
Views: 1035

Re: Error Python : Return name Error

Thank you Dnpwwo,

It helps a lot !
by St7ven
Wednesday 29 March 2017 11:18
Forum: Python
Topic: Error Python : Return name Error
Replies: 2
Views: 1035

Error Python : Return name Error

Hi,

I get this error : Error: (Controler) 'onMessage' failed 'NameError'. But I can retrieve the name that make this error.

In a python, the name usually follow the error. How could I bring up the faulty name ?
by St7ven
Monday 27 March 2017 8:04
Forum: Python
Topic: Device created in plugging, use in blocky
Replies: 5
Views: 1462

Re: Device created in plugging, use in blocky

Thank you for you support Dnpwwo. Really appreciate it.
by St7ven
Friday 24 March 2017 16:40
Forum: Python
Topic: Device created in plugging, use in blocky
Replies: 5
Views: 1462

Re: Device created in plugging, use in blocky

@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 ?
by St7ven
Friday 24 March 2017 12:03
Forum: Python
Topic: Device created in plugging, use in blocky
Replies: 5
Views: 1462

Device created in plugging, use in blocky

Hi,

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

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 ...
by St7ven
Thursday 23 March 2017 11:40
Forum: Python
Topic: Device selector group
Replies: 2
Views: 1102

Re: Device selector group

Thank you for your help ! Very usefull !
by St7ven
Thursday 23 March 2017 10:19
Forum: Python
Topic: Device selector group
Replies: 2
Views: 1102

Device selector group

Hi,

On part of my plugin does not work on raspberry pi3 although working on a windows OS.

# Create devices here, see examples
LevelActions= "LevelActions:"+stringToBase64("|||||")+";"
LevelNames= "LevelNames:"+stringToBase64("None|Grp1|Grp2|Grp3|Grp4|GrpAll")+";"
Other= "LevelOffHidden ...
by St7ven
Tuesday 14 March 2017 18:26
Forum: Python
Topic: [Plugin] Serial USB300 ESP3 EnOcean
Replies: 3
Views: 1327

Re: [Plugin] Serial USB300 ESP3 EnOcean

Yes !! You are right. Well see and thank you.

What stupid mistake I did .... Shame on me.

Problem #2 Solved
by St7ven
Tuesday 14 March 2017 14:27
Forum: Python
Topic: [Plugin] Serial USB300 ESP3 EnOcean
Replies: 3
Views: 1327

[Plugin] Serial USB300 ESP3 EnOcean

Hi,

I'm starting to write a plugging output serial data through an EnOcean USB300.

I will, and I have already met some trouble with coding this plugin. I decided to start this topic for who may want to help.

Please Help ! :roll:

@Dnpwwo generously send me a template to start this plugin. see ...
by St7ven
Tuesday 14 March 2017 11:19
Forum: LUA
Topic: Lua write to port com Windows
Replies: 10
Views: 5060

Re: Lua write to port com Windows

I gave a second try for a python plugging. I'm full of hope. Until I met :

PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform


I installed domoticz using the last beta version https://www.domoticz.com/downloads/

Then copy the ...
by St7ven
Monday 13 March 2017 17:29
Forum: LUA
Topic: Add library to lua : raspberry
Replies: 4
Views: 1917

Re: Add library to lua : raspberry

Its work well to link to the lib folder. Thank you.

Unfortunatly, I get the following error

/home/pi/librs232/dist/lib/luars232.so:1: unexpected symbol near char(127)

The luars232.so is known to work and it has been confirmed with a lua (commande line) windows (available when I installed the ...
by St7ven
Monday 13 March 2017 17:12
Forum: LUA
Topic: Lua write to port com Windows
Replies: 10
Views: 5060

Re: Lua write to port com Windows

Hi,

Back to Lua, I have copy the file "luars232.dll" to the folder "C:\Program Files (x86)\Domoticz"

When I run (script_device_MyScript.lua in domoticz/scripts/lua/:

rs232 = require("luars232")

Domoticz pop-up a message "missing lua.5.1.dll"

Then, I install lua5.1 (LuaForWindows_v5.1.4-46,exe ...
by St7ven
Monday 13 March 2017 15:43
Forum: LUA
Topic: Add library to lua : raspberry
Replies: 4
Views: 1917

Add library to lua : raspberry

Hello,

I instaled the librs232 library in the raspberry along domoticz. (home/username/ folder). When I call

require("luars232")

I get

no field package.preload['luars232']
no file '/usr/local/share/lua/5.2/luars232.lua'
no file '/usr/local/share/lua/5.2/luars232/init.lua'
no file '/usr ...
by St7ven
Monday 13 March 2017 12:25
Forum: LUA
Topic: Lua write to port com Windows
Replies: 10
Views: 5060

Re: Lua write to port com Windows

@Dnpwwo,

Thank you for this plugin.

Today, I tried to run a python script. Finaly, I noticed that It is not possible if I don't install domoticz directly from the source (which seems hard for a novice like me).

I read your template plugin. Unfortunatly, I have not the skill to modify or include ...
by St7ven
Saturday 11 March 2017 12:59
Forum: LUA
Topic: Lua write to port com Windows
Replies: 10
Views: 5060

Re: Lua write to port com Windows

Hi Dnpwwo,

I have never code python. I usually code in C or asm. But I can give it a try. It seams that it can be a good thing to have this plugging in domoticz. Please, send me this simple sample plugin that does Serial communication. I will try to do something.
by St7ven
Friday 10 March 2017 15:44
Forum: LUA
Topic: Lua write to port com Windows
Replies: 10
Views: 5060

Re: Lua write to port com Windows

I tried this one (along many others)

If i remember well this one pop-up a missing lua.5.1.dll. file

I guess it has not been update since.
by St7ven
Friday 10 March 2017 15:12
Forum: LUA
Topic: Lua write to port com Windows
Replies: 10
Views: 5060

Lua write to port com Windows

Hi,

I have try to find a USB library for Lua in windows.

I would like to write data through USB (port COM) thank to a lua script. In fact, I want to send a serial data through a USB300 EnOcean (RORG MSC, so not handle by domoticz). Every topic or forum present a process to use a serial peripheral ...
by St7ven
Friday 10 March 2017 12:45
Forum: LUA
Topic: Script execution : nothing happens
Replies: 9
Views: 2615

Re: Script execution : nothing happens

Ok,

Thank you for you help !
by St7ven
Friday 10 March 2017 12:23
Forum: LUA
Topic: Script execution : nothing happens
Replies: 9
Views: 2615

Re: Script execution : nothing happens

I change the switch type to "selector"

So, I ran the script for the event manager and the script work. But not only the event script but also the one in action.

Then, I have deleted the script in the event manager and let the script in the action in place as describe in : https://forum.mysensors ...
by St7ven
Friday 10 March 2017 11:55
Forum: LUA
Topic: Script execution : nothing happens
Replies: 9
Views: 2615

Re: Script execution : nothing happens


print('this will end up in the domoticz log')

commandArray = {}
if (devicechanged['MyDeviceName'] == 'On' and otherdevices['MyOtherDeviceName'] == 'Off') then
commandArray['MyOtherDeviceName']='On'
end
return commandArray


This is the code of the script_device_demo.lua file, renommed script ...