Search found 74 matches

by bewo
Friday 30 December 2022 20:35
Forum: LUA
Topic: Trying to get a button on LCD2004 to display other data
Replies: 8
Views: 4586

Re: How to pause or wait in script

Hi zicht, Ronka is already using the array of commands... ;) He uses commandArray[28] = .... commandArray[29] = .... commandArray[30] = .... commandArray[35] = .... and so on. In this way the order is easyliy recognizable. But you have to pay attention at programming. Your posted command does the ...
by bewo
Friday 30 December 2022 15:02
Forum: LUA
Topic: os.execute curl - I need an error catch??
Replies: 4
Views: 1332

Re: os.execute curl - I need an error catch??

Hi binbo,

don't know if the page you would like to call is important for the rest of the script.
If not just fire the command in the background with an single & at the end. ;)

Code: Select all

os.execute('curl -s "https://www.example.com/gateway/?user=binbo&pass=123" &')
by bewo
Friday 30 December 2022 14:42
Forum: LUA
Topic: Trying to get a button on LCD2004 to display other data
Replies: 8
Views: 4586

Re: How to pause or wait in script

Hi RonkA, I don't know if tips are still necessary but an idea to pause the command would to NOT use the OpenURL-command. The nicest way would to use "curl" but the tool isn't included in the standard-Synology Package. An other way is to use wget. :) So you could do something like: URLcall = "wget ...
by bewo
Friday 30 December 2022 13:16
Forum: LUA
Topic: HTTP/HTTPS poller xml parser
Replies: 4
Views: 800

Re: HTTP/HTTPS poller xml parser

Hey damdub,

is your parser working? If not, there are multiple ways to parse your values.

First of all i would check if the heatpump gives you really an html answer. Maybe this is only the browser output.
Just post the whole answer from your heatpump und the request.

Then we'll get this. ;)
by bewo
Friday 03 September 2021 19:11
Forum: LUA
Topic: Commandarray not executed
Replies: 8
Views: 853

Re: Commandarray not executed

Hi Tinfinity, are you sure your example-script ist working sometimes? :shock: I think it will work never. :? The state "Off" isn't normally available in an selector switch. You should work with the levels in your selector switch. So your code should be something like: if devicechanged['Donker ...
by bewo
Saturday 23 January 2021 14:22
Forum: LUA
Topic: Domoticz HTTP Poller Lua json ......
Replies: 3
Views: 515

Re: Domoticz HTTP Poller Lua json ......

Hi Klaus, please help me, if i correctly understood your problem: The raspberry in your garden sends his output via an LTE hotspot to an server. And you would like to read this file from the server? OK -> No problem. ;) What should be the rythm? Once a minute? All five minutes? Every hour? What do ...
by bewo
Tuesday 21 July 2020 14:55
Forum: PHP and all others
Topic: iRobot Roomba 980 integration
Replies: 59
Views: 28116

Re: iRobot Roomba 980 integration

Hi manuloup,

yes i think it should work. Just try out. :-)
by bewo
Friday 03 July 2020 14:37
Forum: LUA
Topic: LUA script: Turn Plug ON and play alarm sound with OmxPlayer
Replies: 1
Views: 466

Re: LUA script: Turn Plug ON and play alarm sound with OmxPlayer

Hi gemminiss,

if you run your posted script, the plug isn't on and has no power in the moment you start the alarm sound!

The commandArray-Command is executed when you reach the "return". A possible way is to power on the plug via curl and the Json-API before you start the sound. ;)
by bewo
Friday 03 July 2020 14:20
Forum: LUA
Topic: Script/Algorithm for screens / blinds - reinvent the wheel
Replies: 2
Views: 783

Re: Script/Algorithm for screens / blinds - reinvent the wheel

Hi ensingg, Your wishes are no problem. ;-) Maybe this could be a start... My comments are german. Look at the script, if you would give it a try, i'll can translate and adjust it. :P -- Dieses Skript sorgt für das automatische Schließen und Öffnen der Rolläden Abends bei Dunkelheit und -- morgens be ...
by bewo
Friday 03 July 2020 14:11
Forum: PHP and all others
Topic: iRobot Roomba 980 integration
Replies: 59
Views: 28116

Re: iRobot Roomba 980 integration

Hey guys, Sorry for my late reply. I hope my answer helps anyway. ;) First point: what the line dofile("/opt/domoticz/scripts/lua/Eigene_Funktionen.lua") does ? This line loads a file with all my functions which i use multiple in several scripts. I think in the Roomba-Script only the timedifference ...
by bewo
Tuesday 21 April 2020 12:42
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

It's simply NOT possible to change to icon of an text device. You have to use another type of device.
by bewo
Monday 20 April 2020 22:33
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

And the script still doesn‘t work?

If not, maybe your network is not well configured.
Please change in my script „localhost“ to „127.0.0.1“. It‘s near under „Look for the icon which is used in the moment“
:-)
by bewo
Monday 20 April 2020 17:33
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

Sorry the delay... :? Did you restart Domoticz after add 127.0.0.1 in the settings? Sometimes there some network issues... ;-) Yes, you can test this in CLI. In your case type: curl "http://127.0.0.1:8084/json.htm?type=command&param=getversion" And you should get some information about domoticz ...
by bewo
Friday 17 April 2020 12:39
Forum: LUA
Topic: Reading data from device
Replies: 15
Views: 2524

Re: Reading data from device

Any errors or outputs in the log?
by bewo
Thursday 16 April 2020 23:01
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

A sorry my bad... I've didn't seen... :D

Make sure that localhost has the rights to collect the json.
Therefore you have to set localhost (127.0.0.1) in your settings under local network:
Bildschirmfoto 2020-04-16 um 22.59.24.png
Bildschirmfoto 2020-04-16 um 22.59.24.png (20.43 KiB) Viewed 1703 times
by bewo
Thursday 16 April 2020 22:51
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

Did you set up as device triggered?
Bildschirmfoto 2020-04-16 um 22.51.23.png
Bildschirmfoto 2020-04-16 um 22.51.23.png (4.45 KiB) Viewed 1704 times
by bewo
Thursday 16 April 2020 21:51
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

If i don't forget something..... Here it is: Generate a new Lua-Script, device triggered (So the icon should change immediately. :D ) Please change the variables - try out and report. ;-) -- Script to change the icon of a battery device depending it's level -- Set your devices and variabels here ...
by bewo
Thursday 16 April 2020 20:39
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

Hi jarmoboy, you don't have to use any plugin. :-) You've asked for an piece of code for self construct. There it is (was). You need a kind of trigger to set the icon. So i thought the right moment is, when a new battery value is reported. There you could integrate the code piece. But if you don't ...
by bewo
Thursday 16 April 2020 20:01
Forum: LUA
Topic: customicon script
Replies: 21
Views: 2429

Re: customicon script

Ok... I use the icons for mixed things. One of this is a vacuum robot. See script details (if needed here): https://www.domoticz.com/forum/viewtopic.php?t=15047#p232887 Here's the piece of code for set different icons: -- Batteriestatus (Symbol und Stand) aktualisieren: batterie_device = Roboter ...
by bewo
Thursday 16 April 2020 15:55
Forum: LUA
Topic: Script to import CumulusMX Data from an http call
Replies: 2
Views: 1256

Re: Script to import CumulusMX Data from an http call

I think the output shown is an "normal" json string. So it's no problem to read and update devices. The script above has to be updated urgent. An "if true" argument is - in my opinion - an "programming ghost train". What informations should be updated? Only temperature, humidity and pressure as in ...