Every 15 seconds??? I just used a simple php to get the status of 5 thermometers..
I noticed the homewizard was often "not available" after i ran the php..
Which php script do you use?
Search found 9 matches
- Saturday 14 November 2015 9:48
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
- Friday 13 November 2015 23:18
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Re: Lua script to run a php page
It is working!
Thanks!!!
Thanks!!!
- Friday 13 November 2015 18:33
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Re: Lua script to run a php page
unfortunately not...jvdz wrote:I am just talking about the linked support libraries, not the whole DTGBOT.
Doesn't the Wiki page tell you the prerequisites that needs to be installed?
Jos
Is there no standard HTTP command in Lua? (Without having to load libraries?)
- Friday 13 November 2015 18:18
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Re: Lua script to run a php page
You will need something to define the http.xxxx function as that is not a standard available LUA command/ Where did you find this command? I am using http.request(url) myself which is part of the library I refereed to in my previous post. This one is an add on which is made available in the DTGBOT ...
- Friday 13 November 2015 17:32
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Re: Lua script to run a php page
No,jvdz wrote:Do you have the HTTP addon loaded somewhere in your script with something like this:?JosCode: Select all
http = require "socket.http";
The entire script i have copied/paste is in my opening message... So i should enter these lines in as well??
- Friday 13 November 2015 15:13
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Re: Lua script to run a php page
Ok script runs now, but i get the following error:
Error: /usr/local/domoticz/scripts/lua/script_time_run_php.lua:19: attempt to index global 'http' (a nil value)
That is the http request line..... Weird...
Error: /usr/local/domoticz/scripts/lua/script_time_run_php.lua:19: attempt to index global 'http' (a nil value)
That is the http request line..... Weird...
- Friday 13 November 2015 13:41
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Re: Lua script to run a php page
What is the name of this script to determine on which event is should fire? Do you really want to run the PHP page each time the script gets fired and the switch is on or only when it changes to on? Jos Jos, the script is named script_run_php.lua And yes, i really want to run this script every ...
- Friday 13 November 2015 11:01
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Re: Lua script to run a php page
Because of performance.....Egregius wrote:Why not run the PHP script by cron every x minutes?
My Homewizard gets really slow when i run that php job every minute.......
- Friday 13 November 2015 10:49
- Forum: LUA
- Topic: Lua script to run a php page
- Replies: 18
- Views: 6791
Lua script to run a php page
Ok, i am trying to run a Lua script which runs a certain php page as soon as a switch is marked as "on" I have written this code: --[[ This script runs a php page when a certain switch is "on" --]] commandArray = {} -- declare some constants -- adjust to your specific situation SENSOR_NAME ...