Search found 71 matches

by costo
Tuesday 13 May 2025 21:28
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

Hi habahabahaba,
your example brought me to the solution

yes you are right, I have to learn dzVents, but its not easy to teach an old horse a new trick.

More than 50 years ago I learned coding using punchcards.
each card was a line and had max 80 characters, so variables needed short names.
in the ...
by costo
Monday 12 May 2025 22:43
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

thanks habahabahaba, your input is very helpfull.

Most of the things work.
I still use a uservariable, just as in the LUA script, maybe in dzVents there is a better way but for now the uservariable is ok.

reading from the uservariable is like this:
local wAverage30 = domoticz.variables('CAcpm ...
by costo
Monday 12 May 2025 16:14
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

So I got a basic working dzVents script

local IP = '192.168.178.26' -- uRadmonitor sensor IP

return {
active = true,

on = {
timer = { 'every minute' },
httpResponses = { 'cpmRetrieved' } -- matches callback string below
},

execute = function(domoticz, item)

if (item.isTimer) then ...
by costo
Monday 12 May 2025 13:16
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

YES !!!
That does the trick

thank you thank you thank you
by costo
Monday 12 May 2025 12:04
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

For completeness this is the LUA script that works fine for many years

-- Script to calculate average CPM
local idxUptime = 14 -- idx of Uptime
local idxCpm = 15 -- idx of simpel cpm1
local idxWA = 16 -- idx of wAverage30
local idxTemp = 13 -- idx of Tempsensor
local cpm = " " -- counts in last ...
by costo
Monday 12 May 2025 11:55
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

Using this:

if (item.ok and item.isJSON) then -- statusCode == 2xx

domoticz.log(item.data,domoticz.LOG_FORCE)
print ('cpm = '..item.data.data.cpm)
end

which gives an error in the print() line so apparently the data is recognized as json .

In the link jparser.org I can put the data line and ...
by costo
Monday 12 May 2025 0:22
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

negative, both lines give an Error : attempt to index a nil value (global 'dz') or (field 'data')

print (item.data) prints the line as seen in the browser,
{"data":{ "id":"12000059","type":"1","detector":"SI29BG","cpm":9,"temperature":29.31,"uptime": 1407157}}

print (item.data.id),
print (item ...
by costo
Sunday 11 May 2025 23:34
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

Re: Convert LUA script into dzVents

If I write 'domoticz.log('status = ' .. Count) ' then i see this error

2025-05-11 23:29:00.346 Error: dzVents: An error occurred when calling event handler cpm_dzvents
2025-05-11 23:29:00.346 Error: dzVents: ...moticz/scripts/dzVents/generated_scripts/cpm_dzvents.lua:26: attempt to concatenate a ...
by costo
Sunday 11 May 2025 22:19
Forum: dzVents
Topic: (SOLVED) Convert LUA script into dzVents
Replies: 15
Views: 2252

(SOLVED) Convert LUA script into dzVents

New to dzVents, made a LUA script a few years ago to extract cpm, temperatue and uptime
this script works fine but I'm trying to convert this script into dzVents.

The uRadmonitor sensor on '192.168.178.26/j' generates this json format line
{"data":{ "id":"12000059","type":"1","detector":"SI29BG ...
by costo
Saturday 26 April 2025 18:20
Forum: Installation, Compiling, Permissions, Security and Starting
Topic: Updating from RasPI/D2022.1 to thin-client/D2024.7
Replies: 3
Views: 2090

Re: Updating from RasPI/D2022.1 to thin-client/D2024.7

Yes I have several user variables defined.
Only one is active at the moment in a small script and there is no problem with that.
6 other user variables are defined for in-active scripts, i can delete them .
by costo
Saturday 26 April 2025 14:17
Forum: Installation, Compiling, Permissions, Security and Starting
Topic: Updating from RasPI/D2022.1 to thin-client/D2024.7
Replies: 3
Views: 2090

Re: Updating from RasPI/D2022.1 to thin-client/D2024.7

As no one mentioned any issues/problems i did the swap,.
Restore the old 2022.1 database into Domoticz 2024.7

I got 3 dB errors which give me a headache, Can this become a problem later ?

----------------------------
I got this in the logfile:

2025-04-26 13:38:47.161 Status: Restore Database ...
by costo
Friday 25 April 2025 12:43
Forum: Installation, Compiling, Permissions, Security and Starting
Topic: Updating from RasPI/D2022.1 to thin-client/D2024.7
Replies: 3
Views: 2090

Updating from RasPI/D2022.1 to thin-client/D2024.7

I'm updating to a completely new setup.

My old setup:
Raspberry Pi3b with Raspbian 10 (buster)
Domoticz 2022.1 (build 14498)
RFLink433 and a lot of virtual devices on ESPEasy.

My new setup:
thin client HP-t530 (4Gbmem/128GbSSD) with extra wifi module
Linux Mint Cinnamon 22.1
Installed Domoticz ...
by costo
Wednesday 23 April 2025 23:31
Forum: Other questions and discussions
Topic: (Solved) External website protection
Replies: 4
Views: 3399

Re: External website protection

@walterv
thanks for your helpfull information, I created a user and now it works as intended.

@HvdW
thanks for your help but I'm on a thinclient now, pihole is not an option anymore i think
For the moment I use fail2ban for protect me from hackers attempts.
by costo
Wednesday 23 April 2025 15:12
Forum: Other questions and discussions
Topic: (Solved) External website protection
Replies: 4
Views: 3399

(Solved) External website protection

Until now I use 2022.1 on a Raspberry PI3B
Now I'm going to use a ThinClient HP-T530 with Mint-22.1 and Domoticz 2024.7

So Far, So Good and now I want to enable external website access.

In 2022.1 under settings I see a 'Website Protection' to define a Login Page with user/password.
In 2024.7 this ...
by costo
Friday 31 January 2025 17:12
Forum: Installation, Compiling, Permissions, Security and Starting
Topic: Missing Menu-Buttons when accessing Domoticz over the internet.
Replies: 2
Views: 4822

Re: Missing Menu-Buttons when accessing Domoticz over the internet.

thanks watervl,

I did not realize I had a different password/username for accessing the web interface.
I corrected it and now it is working as it is intended.
by costo
Friday 31 January 2025 15:04
Forum: Installation, Compiling, Permissions, Security and Starting
Topic: Missing Menu-Buttons when accessing Domoticz over the internet.
Replies: 2
Views: 4822

Missing Menu-Buttons when accessing Domoticz over the internet.

When connecting local , at home, i can see and access all menu's.
When I connect over the internet, I can see and access only two menu buttons, Dashboard and Setup.

It does not matter if I connect with a phone or a laptop. It happens with Firefox and with Chromium browser.
So it may be some setting ...
by costo
Thursday 08 February 2024 18:55
Forum: Other questions and discussions
Topic: Strange entry in my logfile
Replies: 9
Views: 1042

Re: Strange entry in my logfile



I have changed the 8080 port externally to a different high number port, all in IPv4
Ofcourse access to the Pi and to domoticz is protected with a password.


Opening http to the outside/WAN, that's kind of playing russian roulette with 5 bullets in the barrel: That's all un-ciphered including ...
by costo
Thursday 08 February 2024 18:43
Forum: Other questions and discussions
Topic: Strange entry in my logfile
Replies: 9
Views: 1042

Re: Strange entry in my logfile

waltervl wrote: Thursday 08 February 2024 11:18 IP 172.233.57.39 could be an internal Docker IP. Is Domoticz running in a docker environment?
Nope , Domoticz runs on a Raspi3B with only Domoticz installed
by costo
Monday 05 February 2024 13:14
Forum: Other questions and discussions
Topic: Strange entry in my logfile
Replies: 9
Views: 1042

Strange entry in my logfile

I have my Domoticz run on a raspberry pi 3B.
On my Fritz!Box router I have made my raspberry accessable from the internet. I sometimes see messages like this in the logfile:
2024-02-04 19:23:21.793 Error: Error parsing http request address: ::ffff:172.233.57.39
but not so much that I worry about ...
by costo
Sunday 03 February 2019 11:36
Forum: Other questions and discussions
Topic: Can I convert database from beta back to stable 4.97 ?
Replies: 3
Views: 797

Re: Can I convert database from beta back to stable 4.97 ?


In general this is not a good idea and Database schema's are different. Between current Beta and 4.9700 the devicestatus table did not change but there has been a change in the hardware table. So just copying these tables between databases will probably not work.


It's a pity that stable version ...