Issue with dzVents in V.2020.2 (build 12913) [solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Issue with dzVents in V.2020.2 (build 12913) [solved]

Post by hestia »

Hello
I've installed
Version: 2020.2 (build 12913)
Build Hash: c9dabef7f-modified
Compile Date: 2021-02-03 08:40:45
dzVents Version: 3.1.4
on 04-Feb
and since this I've experienced 3 things:
2 scripts falls into new errors that didn't occurred before, without modification ; there were running well since weeks and more
on one of those 2 scripts, I wanted to set LOG_DEBUG but no logs appeared!
Issue1: Error: EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
but these switch 1122 was indeed updated, so it was found!?

Issue2: an error in the check of a callback
the script is there
One click wakeup alarm in music with LMS
The error was relative to this part

Code: Select all

                dz.log('HTTPResponse CheckPlayer OK ' .. CheckPlayer, LOG_LEVEL)
                -- check if the player is playing
                local CheckPlaying=string.find(item.data,'Now Playing') 
                if CheckPlaying ~= nil then -- the player is playing
The result of the test was not the right one!
I could not investigate more with no log (issue3)
And also, the error seems to have disappeared when I copy/paste the script to another one

Nota: these error with the new version make me find another error! So I had to change the script yesterday

Issue3: no log with LOG_DEBUG, in the script of issue2

Code: Select all

 execute = function(dz, item, triggerInfo)
    _G.logMarker =  dz.moduleLabel -- set logmarker to scriptname
    --local LOG_LEVEL = dz.LOG_INFO -- normal 
    local LOG_LEVEL = dz.LOG_DEBUG
    --local LOG_LEVEL = dz.LOG_ERROR
    --local LOG_LEVEL = dz.LOG_FORCE
    print ('LOG_LEVEL ' .. LOG_LEVEL)
the print line gives LOG_LEVEL 4

I've restarted dz
Issue1 : still remains
Issue2 : seems to have disappeared or the copy/paste of the script to a new one
Issue3: still remains
No change in the settings
Screenshot 2021-02-06 112744.png
Screenshot 2021-02-06 112744.png (12.43 KiB) Viewed 1152 times
Last edited by hestia on Tuesday 09 February 2021 13:39, edited 1 time in total.
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

the error of the isssue1 happened after the end of the script, in the log
Spoiler: show
2021-02-06 12:23:23.775 Status: dzVents: Debug: Stores_V0R2: Constructed timed-command: Set Level 40
2021-02-06 12:23:23.775 Status: dzVents: Debug: Stores_V0R2: Constructed timed-command: Set Level 40 NOTRIGGER
2021-02-06 12:23:23.776 Status: dzVents: Info: Stores_V0R2: ------ Finished Stores_V0R2
2021-02-06 12:23:23.780 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 12:23:23.822 Error: EventSystem: Could not find device in system: ((ID=1203: Store Entrée (Closed) - Manual )
There is an afterSec in the script

Code: Select all

devBlind.open().afterSec(5).silent()
5 sec, more than the gap in the log
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Saturday 06 February 2021 11:29 dzVents Version: 3.1.4
and since this I've experienced 3 things:
What was the build you used before this one? The answer will help to identify what changed between these versions.

To make searching for the issue a bit simpler please use the standard mechanism for setting the log level and marker and set the dzVents loglevel a bit less strict.
A quick look at your script shows that on one line use dz.LOG_LEVEL which is undefined and therefore nil.

If the initial script only works after a copy / past into a new one then I can only guess it was not set to active in the database.

the command open().afterSec(5) is send by dzVents to the eventSystem immediately after the script finished. the afterSec is interpreted by the eventSystem.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

waaren wrote: Saturday 06 February 2021 12:36 What was the build you used before this one? The answer will help to identify what changed between these versions.
Just before it was Version: 2020.2 (build 12819) installed on 04/01/2021 and it was ok with previous ones from May 2020.
It was also ok with Version: 2020.2 (build 12192) in July. Both scripts are running everyday.
A quick look at your script shows that on one line use dz.LOG_LEVEL which is undefined and therefore nil.
Ooops. Thanks. Changed but no more log
To make searching for the issue a bit simpler please use the standard mechanism for setting the log level and marker and set the dzVents loglevel a bit less strict.
I've changed the logging from "Errors Only" to "Errors + minimal excecution info", then to "Errors + minimal excecution info + genric info" with no change to the log of the script
With "Debug (everything)" I could get a lot more
Spoiler: show
2021-02-06 13:43:03.484 Status: dzVents: Info: ------ Start internal script: Reveil_v1r2: Device: "Réveil - Dim. (Dummy)", Index: 1035
2021-02-06 13:43:03.485 Status: dzVents: Info: Reveil_v1r2: ==>> Reveil_v1r2 triggered by device
2021-02-06 13:43:03.487 Status: dzVents: Debug: Reveil_v1r2: Processing device-adapter for Musique Chambre: Logitech Media Server device
2021-02-06 13:43:03.488 Status: dzVents: Debug: Reveil_v1r2: Processing device-adapter for Musique Chambre: Switch device adapter
2021-02-06 13:43:03.489 Status: dzVents: Info: Reveil_v1r2: Reveil_v1r2 triggered by Réveil - Dim.
2021-02-06 13:43:03.492 Status: dzVents: Info: Reveil_v1r2: AlarmStatus OK: CANCELLED
2021-02-06 13:43:03.492 Status: dzVents: Info: Reveil_v1r2: Alarm status CANCELLED
2021-02-06 13:43:03.493 Status: dzVents: Info: Reveil_v1r2: Alarm date 2021-02-07 time 07:10:00
2021-02-06 13:43:03.493 Status: dzVents: Debug: Reveil_v1r2: Réveil - Dim. 6h55 nValue: 2
2021-02-06 13:43:03.494 Status: dzVents: Info: Reveil_v1r2: CalculateNextAlarmInfos F_wakeUpTimeHM 6h55
2021-02-06 13:43:03.494 Status: dzVents: Info: Reveil_v1r2: CheckWakeUpTime 6h55
2021-02-06 13:43:03.494 Status: dzVents: Info: Reveil_v1r2: CheckWupTime> hhmmTime 6h55 true
2021-02-06 13:43:03.495 Status: dzVents: Info: Reveil_v1r2: Wakeup time :6h55
2021-02-06 13:43:03.495 Status: dzVents: Info: Reveil_v1r2: ConvertWakeUpTime 6h55
2021-02-06 13:43:03.496 Status: dzVents: Info: Reveil_v1r2: ConvertWakeUpTime hhmmTime 6:55:00
2021-02-06 13:43:03.497 Status: dzVents: Info: Reveil_v1r2: Set alarm for tomorrow 6:55:00
2021-02-06 13:43:03.498 Status: dzVents: Debug: Reveil_v1r2: OpenURL: url = http://0.0.0.0:8080/json.htm?type=setus ... mimage=237
2021-02-06 13:43:03.499 Status: dzVents: Debug: Reveil_v1r2: OpenURL: method = GET
2021-02-06 13:43:03.499 Status: dzVents: Debug: Reveil_v1r2: OpenURL: post data = nil
2021-02-06 13:43:03.500 Status: dzVents: Debug: Reveil_v1r2: OpenURL: headers = nil
2021-02-06 13:43:03.500 Status: dzVents: Debug: Reveil_v1r2: OpenURL: callback = nil
2021-02-06 13:43:03.501 Status: dzVents: Debug: Reveil_v1r2: OpenURL: url = http://0.0.0.0:8080/json.htm?type=comma ... veil+-+Dim.
2021-02-06 13:43:03.501 Status: dzVents: Debug: Reveil_v1r2: OpenURL: method = GET
2021-02-06 13:43:03.502 Status: dzVents: Debug: Reveil_v1r2: OpenURL: post data = nil
2021-02-06 13:43:03.502 Status: dzVents: Debug: Reveil_v1r2: OpenURL: headers = nil
2021-02-06 13:43:03.503 Status: dzVents: Debug: Reveil_v1r2: OpenURL: callback = nil
2021-02-06 13:43:03.503 Status: dzVents: Debug: Reveil_v1r2: Constructed timed-command: Set Level 70
2021-02-06 13:43:03.504 Status: dzVents: Debug: Reveil_v1r2: Constructed timed-command: Set Level 70 NOTRIGGER
2021-02-06 13:43:03.505 Status: dzVents: Info: Reveil_v1r2: ------ Finished Reveil_v1r2
2021-02-06 13:43:03.505 Status: dzVents: !Info: Reveil_v1r2: Debug: Writing module summary to /home/pi/PROD_domoticz/scripts/dzVents/module.log
To set LOG_DEBUG in the script shouldn't be the same?
"marker"? I set "_G.logMarker = dz.moduleLabel" isn't it good?
For the other script, the full log
Spoiler: show
2021-02-06 13:53:46.405 Status: User: famille (IP: 192.168.9.201) initiated a switch command (1122/Brise Soleil (Open) - Manual /Set Level)
2021-02-06 13:53:46.498 Status: dzVents: Debug: Dumping domoticz data to /home/pi/PROD_domoticz/scripts/dzVents/domoticzData.lua
2021-02-06 13:53:46.644 Status: dzVents: Debug: Processing device-adapter for Brise Soleil (Open) - Manual : Switch device adapter
2021-02-06 13:53:46.644 Status: dzVents: Debug: dzVents version: 3.1.4
2021-02-06 13:53:46.644 Status: dzVents: Debug: Event triggers:
2021-02-06 13:53:46.644 Status: dzVents: Debug: - Device: Brise Soleil (Open) - Manual
2021-02-06 13:53:46.724 Status: dzVents: Info: Handling events for: "Brise Soleil (Open) - Manual ", value: "A"
2021-02-06 13:53:46.724 Status: dzVents: Info: ------ Start internal script: Stores_V0R2: Device: "Brise Soleil (Open) - Manual (Dummy)", Index: 1122
2021-02-06 13:53:46.727 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Parking: Temperature device adapter
2021-02-06 13:53:46.728 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Azimut du Soleil: Custom sensor device adapter
2021-02-06 13:53:46.730 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Elévation du Soleil: Custom sensor device adapter
2021-02-06 13:53:46.730 Status: dzVents: Debug: Stores_V0R2: Stores_V0R2 triggered by Brise Soleil (Open) - Manual
2021-02-06 13:53:46.732 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for BSO RFY: Switch device adapter
2021-02-06 13:53:46.732 Status: dzVents: Debug: Stores_V0R2: -->> Brise Soleil (Open) - Manual 1122
2021-02-06 13:53:46.733 Status: dzVents: Debug: Stores_V0R2: BSO RFY 673
2021-02-06 13:53:46.733 Status: dzVents: Debug: Stores_V0R2: Start Manual slat angle null
2021-02-06 13:53:46.736 Status: dzVents: Debug: Stores_V0R2: devDummyBlind level: 40 init auto mode
2021-02-06 13:53:46.737 Status: dzVents: Debug: Stores_V0R2: Auto mode execution
2021-02-06 13:53:46.738 Status: dzVents: Debug: Stores_V0R2: Auto Program changed to: Cold / Outside Temp: 8
2021-02-06 13:53:46.739 Status: dzVents: Debug: Stores_V0R2: Time to check if it is open
2021-02-06 13:53:46.739 Status: dzVents: Debug: Stores_V0R2: Solar Altitude=24
2021-02-06 13:53:46.739 Status: dzVents: Debug: Stores_V0R2: Constructed timed-command: Off
2021-02-06 13:53:46.739 Status: dzVents: Debug: Stores_V0R2: Auto Program: Cold / BSO RFY opening
2021-02-06 13:53:46.739 Status: dzVents: !Info: Stores_V0R2: lastBlindMode changed to Auto
2021-02-06 13:53:46.739 Status: dzVents: !Info: Stores_V0R2: newBlindProgram changed to Cold
2021-02-06 13:53:46.739 Status: dzVents: !Info: Stores_V0R2: BSO RFY opens
2021-02-06 13:53:46.739 Status: dzVents: Debug: Stores_V0R2: OpenURL: url = http://0.0.0.0:8080/json.htm?type=comma ... +Auto+Cold
2021-02-06 13:53:46.739 Status: dzVents: Debug: Stores_V0R2: OpenURL: method = GET
2021-02-06 13:53:46.739 Status: dzVents: Debug: Stores_V0R2: OpenURL: post data = nil
2021-02-06 13:53:46.740 Status: dzVents: Debug: Stores_V0R2: OpenURL: headers = nil
2021-02-06 13:53:46.740 Status: dzVents: Debug: Stores_V0R2: OpenURL: callback = nil
2021-02-06 13:53:46.740 Status: dzVents: Debug: Stores_V0R2: Constructed timed-command: Set Level 40
2021-02-06 13:53:46.741 Status: dzVents: Debug: Stores_V0R2: Constructed timed-command: Set Level 40 NOTRIGGER
2021-02-06 13:53:46.742 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Store Entrée (Open) - Auto Cold: Switch device adapter
2021-02-06 13:53:46.744 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Store entrée RFY: Switch device adapter
2021-02-06 13:53:46.745 Status: dzVents: Debug: Stores_V0R2: -->> Store Entrée (Open) - Auto Cold 1203
2021-02-06 13:53:46.745 Status: dzVents: Debug: Stores_V0R2: Store entrée RFY 953
2021-02-06 13:53:46.745 Status: dzVents: Debug: Stores_V0R2: Start Auto slat angle 90
2021-02-06 13:53:46.745 Status: dzVents: Debug: Stores_V0R2: Auto mode execution
2021-02-06 13:53:46.745 Status: dzVents: Debug: Stores_V0R2: Auto Program remains on: Cold / Outside Temp: 8
2021-02-06 13:53:46.745 Status: dzVents: Debug: Stores_V0R2: Solar Altitude=24
2021-02-06 13:53:46.745 Status: dzVents: Debug: Stores_V0R2: lastBlindMode NOT changed: Auto
2021-02-06 13:53:46.746 Status: dzVents: Debug: Stores_V0R2: newBlindProgram NOT changed: Cold
2021-02-06 13:53:46.746 Status: dzVents: Debug: Stores_V0R2: Store entrée RFY remains open
2021-02-06 13:53:46.747 Status: dzVents: Info: Stores_V0R2: ------ Finished Stores_V0R2
2021-02-06 13:53:46.747 Status: dzVents: !Info: Stores_V0R2: Debug: Writing module summary to /home/pi/PROD_domoticz/scripts/dzVents/module.log
2021-02-06 13:53:46.747 Status: dzVents: Debug: Commands sent to Domoticz:
2021-02-06 13:53:46.747 Status: dzVents: Debug: - BSO RFY = Off
2021-02-06 13:53:46.747 Status: dzVents: Debug: - OpenURL = {["URL"]="http://0.0.0.0:8080/json.htm?type=comma ... +Auto+Cold", ["method"]="GET"}
2021-02-06 13:53:46.747 Status: dzVents: Debug: - Brise Soleil (Open) - Manual = Set Level 40 NOTRIGGER
2021-02-06 13:53:46.747 Status: dzVents: Debug: =====================================================
2021-02-06 13:53:46.752 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 13:53:46.849 Status: dzVents: Debug: Dumping domoticz data to /home/pi/PROD_domoticz/scripts/dzVents/domoticzData.lua
2021-02-06 13:53:46.977 Status: dzVents: Debug: Processing device-adapter for BSO RFY: Switch device adapter
2021-02-06 13:53:46.978 Status: dzVents: Debug: dzVents version: 3.1.4
2021-02-06 13:53:46.978 Status: dzVents: Debug: Event triggers:
2021-02-06 13:53:46.978 Status: dzVents: Debug: - Device: BSO RFY
2021-02-06 13:53:46.805 Error: EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Manual )
2021-02-06 13:53:49.046 Status: dzVents: Debug: Dumping domoticz data to /home/pi/PROD_domoticz/scripts/dzVents/domoticzData.lua
the script itself rename the device in error

Code: Select all

       blindRename = blindRename .. ' ' .. newBlindProgram
                devDummyBlind.rename(blindRename)
                devDummyBlind.switchSelector(devDummyBlind.level).silent()
In the error message, I suppose the device is looked for with the ID onyl, not the name? "Could not find device in system: ((ID=1122: Brise Soleil (Open) - Manual )", because the name always changes...
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Saturday 06 February 2021 14:10 Just before it was Version: 2020.2 (build 12819) installed on 04/01/2021 and it was ok with previous ones from May 2020.
It was also ok with Version: 2020.2 (build 12192) in July. Both scripts are running everyday.
There was a change in the handling of openURL calls in build 12771 that might cause a timing problem between the rename() and the switchSelector(). Can you try again after adding an .afterSec(5) to the rename call?
To set LOG_DEBUG in the script shouldn't be the same?
No the LOG_DEBUG only set some debug logging in the script. If you set it dzVents wide is does dump debug information for all scripts and will display a lot more.

the logging section is to be used for setting the level and marker at a script level. Like

Code: Select all

logging = 
{
   level = domoticz.LOG_DEBUG,
    marker = 'script identifier', 
},
using this every domoticz.log('text', domoticz.LOG_DEBUG ) will be shown
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

waaren wrote: Saturday 06 February 2021 16:21 There was a change in the handling of openURL calls in build 12771 that might cause a timing problem between the rename() and the switchSelector(). Can you try again after adding an .afterSec(5) to the rename call?
In fact I put the switchSelector() to force a refresh after the rename(). So I don't want to rename() after the switchSelector().
Nevertheless, I put a afterSec(3) on the switchSelector()

Code: Select all

                devDummyBlind.rename(blindRename)
                devDummyBlind.switchSelector(devDummyBlind.level).silent().afterSec(3)
I didn't see the error, but the error wasn't systematic ; so I need to wait some time to be sure.

But as I did some testing around this, I find that sometimes dzVents missed a trigger. The log: first part ok, 2nd part missed
Spoiler: show
2021-02-06 17:44:26.339 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 17:44:28.663 Status: User: famille (IP: 192.168.9.201) initiated a switch command (1122/Brise Soleil (Closed) - Manual /Set Level)
2021-02-06 17:44:28.828 Status: dzVents: Info: Handling events for: "Brise Soleil (Closed) - Manual ", value: "&#9724"
2021-02-06 17:44:28.828 Status: dzVents: Info: ------ Start internal script: Stores_V0R2: Device: "Brise Soleil (Closed) - Manual (Dummy)", Index: 1122
2021-02-06 17:44:28.830 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Parking: Temperature device adapter
2021-02-06 17:44:28.832 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Azimut du Soleil: Custom sensor device adapter
2021-02-06 17:44:28.834 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Elévation du Soleil: Custom sensor device adapter
2021-02-06 17:44:28.834 Status: dzVents: Debug: Stores_V0R2: ==>> triggered by device 1122 Brise Soleil (Closed) - Manual

2021-02-06 17:44:43.103 Status: User: famille (IP: 192.168.9.201) initiated a switch command (1122/Brise Soleil (Closed) - Manual /Set Level)
2021-02-06 17:45:00.751 Status: dzVents: !Info: Auto_off_V0R2: 0 devices switched off ; 0 devices dimmed
2021-02-06 17:45:00.879 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 17:45:01.456 Status: dzVents: Info: Handling httpResponse-events for: "getWU"
2021-02-06 17:45:01.484 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 17:45:04.909 Status: dzVents: Info: Handling events for: "Lux Parking", value: "29"
2021-02-06 17:45:04.912 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 17:45:26.410 Status: dzVents: Info: Handling events for: "Cuve (128 cm)", value: "2999.0"
2021-02-06 17:45:26.417 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 17:45:27.490 Status: dzVents: Info: Handling events for: "Cuve % remplisage", value: "99.0"
2021-02-06 17:45:27.496 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 17:45:27.532 Status: EventSystem: reset all device statuses...
2021-02-06 17:45:28.040 Status: EventSystem: reset all device statuses...
2021-02-06 17:45:28.200 Status: dzVents: Info: Handling events for: "Parking", value: "7.00"
2021-02-06 17:45:28.201 Status: dzVents: Info: ------ Start internal script: Stores_V0R2: Device: "Parking (Dummy)", Index: 272
2021-02-06 17:45:28.203 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Azimut du Soleil: Custom sensor device adapter
2021-02-06 17:45:28.205 Status: dzVents: Debug: Stores_V0R2: Processing device-adapter for Elévation du Soleil: Custom sensor device adapter
2021-02-06 17:45:28.206 Status: dzVents: Debug: Stores_V0R2: ==>> triggered by device 272 Parking
I couldn't be sure it is relative to this version, because I usually don't use the switch ; but when I've tested this script, I didn't see this issue.

For the other script
using this every domoticz.log('text', domoticz.LOG_DEBUG ) will be shown
I think I did it

Code: Select all

return {
    logging =   {
                --domoticz.LOG_ERROR, --select one to override system log level normal = LOG_ERROR
                domoticz.LOG_DEBUG,
                --domoticz.LOG_INFO,
                --domoticz.LOG_ERROR,
                --domoticz.LOG_FORCE
                marker = 'Reveil_v1r2', 
                },
    on =    {
            timer = {function(dz)
                    if dz.time.rawDate == dz.variables(alarmDate_idx ).date.rawDate then
                        if dz.time.matchesRule('at ' .. dz.variables(alarmTime_idx).value) then -- check exact minutes
                            --print('Exact time checked ' .. dz.variables(alarmTime_idx).value)                            
                            return true
                        else -- check if the time was missed
                            local maxTime= dz.variables(alarmTime_idx).time.addMinutes(TIME_DELAY)
                            local checkTime=dz.time.matchesRule('between ' .. dz.variables(alarmTime_idx).time.hour .. ":" .. dz.variables(alarmTime_idx).time.minutes
                            .. ' and ' .. maxTime.hour .. ":" .. maxTime.minutes)
                            --print('alarmTime ' .. dz.variables(alarmTime_idx).time.hour .. ":" .. dz.variables(alarmTime_idx).time.minutes)
                            --print('maxTime ' .. maxTime.hour .. ':' .. maxTime.minutes, dz.LOG_DEBUG)
                            if checkTime and dz.variables(alarmStatus_idx).value ~= 'PLAY' then -- the time was missed, no alarm triggered!
                                print('Alarm missed ' .. dz.variables(alarmTime_idx).value)
                                return true
                            else
                                --print('Alarm not missed')
                            end
                        end
            	    else
            	        --print('NOT today')
            	    end
        	        return false
        	    end
    		},
            devices =   {
                        WAKEUPTIME_IDX
                        },
            httpResponses = {
                            CALLBACKPREFIX..'LMS_Play',
                            CALLBACKPREFIX..'LMS_Shuffle',
                            CALLBACKPREFIX..'LMS_Unshuf',
                            CALLBACKPREFIX..'LMS_Status'
                            }
            },



 execute = function(dz, item, triggerInfo)
    --_G.logMarker =  dz.moduleLabel -- set logmarker to scriptname
    --local LOG_LEVEL = dz.LOG_INFO -- normal 
    local LOG_LEVEL = dz.LOG_DEBUG
    --local LOG_LEVEL = dz.LOG_ERROR
    --local LOG_LEVEL = dz.LOG_FORCE

    dz.log('==>> triggered by ' ..  triggerInfo.type, LOG_LEVEL)
    --dz.log('==>> ' .. dz.moduleLabel .. ' triggered by ' ..  triggerInfo.type, LOG_LEVEL)
    
I've got this log
Spoiler: show
2021-02-06 18:56:13.656 Status: User: famille(IP: 192.168.9.201) initiated a switch command (1035/Réveil - Dim./Off)
2021-02-06 18:56:13.837 Status: dzVents: Info: Handling events for: "Réveil - Dim.", value: "6h40"
2021-02-06 18:56:13.838 Status: dzVents: Info: Reveil_v1r2: ------ Start internal script: Reveil_v1r2: Device: "Réveil - Dim. (Dummy)", Index: 1035
2021-02-06 18:56:13.844 Status: dzVents: Info: Reveil_v1r2: ------ Finished Reveil_v1r2
2021-02-06 18:56:13.847 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 18:56:13.878 Status: Set UserVariable alarmStatus = CANCELLED
2021-02-06 18:56:13.880 Status: Set UserVariable alarmDate = 7/2/2021
2021-02-06 18:56:13.881 Status: Set UserVariable alarmTime = 6:40
2021-02-06 18:56:13.882 Status: Set UserVariable alarmIndex = 1
2021-02-06 18:56:13.883 Status: EventSystem: reset all device statuses...
But not this line I should have had "==>> triggered by..."
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

I've just seen that I have other scripts with the same type of error

Code: Select all

2021-02-06 20:25:05.906 Error: EventSystem: Could not find device in system: ((ID=1145: Okta 19:00)
It is annoying... because several scripts could experience this issue, not only for me
Spoiler: show
Date,Time,Level,Host Name,Category,Program,Messages,
2021-02-06,20:25:05,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1145: Okta 19:00)
2021-02-06,18:25:06,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1145: Okta 17:00)
2021-02-06,17:35:05,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Closed) - Manual )
2021-02-06,17:30:10,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,17:27:11,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,17:24:30,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,17:23:30,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Closed) - Manual )
2021-02-06,17:22:05,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Closed) - Manual )
2021-02-06,17:13:36,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Closed) - Manual )
2021-02-06,17:10:55,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,13:53:46,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Manual )
2021-02-06,12:23:23,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1203: Store Entrée (Closed) - Manual )
2021-02-06,12:21:16,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,10:53:12,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,10:28:04,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,09:06:44,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Closed) - Manual )
2021-02-06,09:03:18,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Open) - Auto Cold)
2021-02-06,08:25:06,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1145: Okta 07:00)
2021-02-06,07:24:44,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1203: Store Entrée (Closed) - Auto Cold)
2021-02-06,07:24:44,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1122: Brise Soleil (Closed) - Auto Cold)
2021-02-05,22:25:05,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1145: Okta 21:00)
2021-02-05,10:25:06,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1145: Okta 09:00)
2021-02-05,10:00:04,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=11: Chauffage Studio)
2021-02-05,01:25:05,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1145: Okta 00:00)
2021-02-04,23:25:06,Error,dz,local6,domoticz,EventSystem: Could not find device in system: ((ID=1145: Okta 22:00)
No error before the installation of the new build
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Saturday 06 February 2021 19:15 But not this line I should have had "==>> triggered by..."
Can you try with this stripped down version to confirm it gets triggered every time the device gets updated? If that works you can add other parts of your version one by one and see where it starts missing the expected log line.

Code: Select all

return
{
    on =
    {
        devices =
        {
          1122,
        },
    },
    logging =
    {
        domoticz.LOG_DEBUG,
        marker = 'Reveil_v1r2',
    },

    execute = function(dz, item)
        dz.log('==>> triggered by ' ..  dz.utils.toStr(item), dz.LOG_DEBUG)
    end
}
Also can you confirm that you see the error message only when you renamed a device in the same dzVents cycle (can be multiple user scripts) but only 1 trigger of dzVents.lua
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

Can you try with this stripped down version to confirm it gets triggered every time the device gets updated?
I've tried bit could no reproduce the case, because it occurred only sometimes. So it will be difficult to add code and test to detect what is in cause.
I'll try again
Also can you confirm that you see the error message only when you renamed a device in the same dzVents cycle (can be multiple user scripts) but only 1 trigger of dzVents.lua
yes, all this devices are renamed in a dzVents script
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Saturday 06 February 2021 23:45
Can you try with this stripped down version to confirm it gets triggered every time the device gets updated?
I've tried bit could no reproduce the case, because it occurred only sometimes. So it will be difficult to add code and test to detect what is in cause.
I'll try again
I cannot reproduce this either.
yes, all this devices are renamed in a dzVents script
OK. I prepared PR 4619 for this. Once accepted and merged into a next build it will solve the issue of not finding the device because the name changed.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

OK. I prepared PR 4619 for this
Thanks waaren for the PR. I'll test it when available in a download.
I cannot reproduce this either.
Perhaps it is more relative to the GUI when clicking too often for testing, so not dzVents?
I think there could be an issue in the loggin GIU. I've double checked the log I've posted regarding the missing trigger
1/ in a file that was a copy/paste of dz logging GUI on the fly
Spoiler: show
2021-02-06 17:44:41.364 Status: EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua
2021-02-06 17:44:43.103 Status: User: famille (IP: 192.168.9.201) initiated a switch command (1122/Brise Soleil (Closed) - Manual /Set Level)
2021-02-06 17:45:00.751 Status: dzVents: !Info: Auto_off_V0R2: 0 devices switched off ; 0 devices dimmed
2/ in a logging server where the logs are sent (in reverse, and with no better precision than the second, and I'm not sure there is no mix up!)
Spoiler: show
06/02/2021 17:45:00 "dzVents: !Info: Auto_off_V0R2: 0 devices switched off 0 devices dimmed "
06/02/2021 17:44:43 "EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua "
06/02/2021 17:44:43 "dzVents: Info: Stores_V0R2: ------ Finished Stores_V0R2 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Store entrée RFY remains open "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: newBlindProgram NOT changed: Cold "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: lastBlindMode NOT changed: Auto "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: timeConditionsClose OK "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Solar Altitude=-1 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Auto Program remains on: Cold / Outside Temp: 7 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Auto mode execution "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Start Auto slat angle 90 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Store entrée RFY 953 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: -->> Store Entrée (Open) - Auto Cold 1203 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Processing device-adapter for Store entrée RFY: Switch device adapter "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Processing device-adapter for Store Entrée (Open) - Auto Cold: Switch device adapter "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: SlatAngle NOT changed: nul "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: newBlindProgram NOT changed: "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: lastBlindMode NOT changed: Manual "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: devDummyBlind level: 20 stop "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Constructed timed-command: Stop NOTRIGGER "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Constructed timed-command: Stop "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Start Manual slat angle null "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: BSO RFY 673 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: -->> Brise Soleil (Closed) - Manual 1122 "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Processing device-adapter for BSO RFY: Switch device adapter "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: ==>> triggered by device 1122 Brise Soleil (Closed) - Manual "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Processing device-adapter for Elévation du Soleil: Custom sensor device adapter "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Processing device-adapter for Azimut du Soleil: Custom sensor device adapter "
06/02/2021 17:44:43 "dzVents: Debug: Stores_V0R2: Processing device-adapter for Parking: Temperature device adapter "
06/02/2021 17:44:43 "dzVents: Info: ------ Start internal script: Stores_V0R2: Device: ""Brise Soleil (Closed) - Manual (Dummy)"", Index: 1122 "
06/02/2021 17:44:43 "dzVents: Info: Handling events for: ""Brise Soleil (Closed) - Manual "", value: ""&#9724"" "
06/02/2021 17:44:43 "User: famille (IP: 192.168.9.201) initiated a switch command (1122/Brise Soleil (Closed) - Manual /Set Level) "
06/02/2021 17:44:41 "EventSystem: Script event triggered: /home/pi/PROD_domoticz/dzVents/runtime/dzVents.lua "
And there, there are are more lines!
the logging section is to be used for setting the level and marker at a script level. Like
In fact I made a mistake! I've forgotten the word level in the logging section!!!
I've put it again and I got the right logging.
It would be convinient to have a syntax control... if "domoticz.LOG_" w/o the key word "level" ; at the present time no error.
Issue2: an error in the check of a callback
I still have this new error, I did some testing with the log but it didn't occured :-(
I have the log for tomorrow, al least to know what are the data received

Code: Select all

    local function CheckResponse() -- check http response -- 05/02/2021 -- move after PlayingKO to avoid error
        if item.callback == CALLBACKPREFIX..'LMS_Status' then
            -- check if the player is present (selected)
            --dz.log('item.data ' .. item.data, LOG_LEVEL)
            local CheckPlayer=string.find(item.data,'<option selected value="'..LMS_player)
            if CheckPlayer ~= nil then -- the player is present
                dz.log('HTTPResponse CheckPlayer OK ' .. CheckPlayer, LOG_LEVEL)
                -- check if the player is playing
                --dz.log('item.data ' .. item.data, LOG_LEVEL)
                local CheckPlaying=string.find(item.data,'Now Playing') 
                if CheckPlaying ~= nil then -- the player is playing
                    dz.log('HTTPResponse CheckPlaying OK ' .. CheckPlaying, LOG_LEVEL)
                else  -- the player is not playing
                    dz.log('item.data ' .. item.data, dz.LOG_FORCE)
                end    
            else -- the player is not present
                PlayingKO('Player')
            end
        end 
        return
    end
The bad answer was there "CheckPlaying=string.find(item.data,'Now Playing')"
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Sunday 07 February 2021 13:15
the logging section is to be used for setting the level and marker at a script level. Like
In fact I made a mistake! I've forgotten the word level in the logging section!!!
I've put it again and I got the right logging.
It would be convinient to have a syntax control... if "domoticz.LOG_" w/o the key word "level" ; at the present time no error.
Maybe convenient but wrong. It is perfectly valid to put whatever you like and / or omit what you don't want in the logging table as long as it is proper Lua. The Lua syntax checker will not continue the execution of the script if you violate any of the Lua syntax rules and this is not one of them.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Sunday 07 February 2021 13:15
OK. I prepared PR 4619 for this
Thanks waaren for the PR. I'll test it when available in a download.
PR is merged into builds >= 12924 (available in beta)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

waaren wrote: Monday 08 February 2021 10:15
hestia wrote: Sunday 07 February 2021 13:15
OK. I prepared PR 4619 for this
Thanks waaren for the PR. I'll test it when available in a download.
PR is merged into builds >= 12924 (available in beta)
Thanks waaren for this PR so quickly done
Last beta installed
Version: 2020.2 (build 12925) / Build Hash: ef790bae3-modified / Compile Date: 2021-02-08 08:25:00
It is between both ones referenced in the wiki :lol:
12926 4bb40f8b2 20210208 EventSystem Removing state when set unused, and calling Update single-state when set to used
12924 c468e44fd 20210208 EventSystem Merge PR 4619 from waaren; Get device record from database with ID as key
I did some basic testing and it seems ok. I let one day to let all scripts run several times to be more sure
Issue2: an error in the check of a callback
I think it's also due to the same
change in the handling of openURL calls in build 12771 that might cause a timing problem
because I use an url call to check if the player is playing after an url to launch the playing
Sometimes the 2nd url could arrive too early the let the player start really due to the optimization (http requests on seperate threads dzVents)
So I add some .afterSec() like this

Code: Select all

  dz.openURL({url = httpLMS .. urlParams, callback = CALLBACKPREFIX..urlCallback}).afterSec(p_afterSec)
The part could be closed tomorrow also. I'll check the other scripts to look it there could be the same issue.
Could be convenient to have "shuffle", "playlist" and "status" available in dzVents... I didn't find them when I write this script
Last edited by hestia on Tuesday 09 February 2021 13:31, edited 1 time in total.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Monday 08 February 2021 19:56 Could be convenient to have "shuffle", "playlist" and "status" available in dzVents... I didn't find them when I write this script
Will have a look if / how to make these (and the others commands) available via dzVents.
How do you send these commands now and what is the result?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

hestia wrote: Monday 08 February 2021 19:56 The part could be closed tomorrow also. I'll check the other scripts to look it there could be the same issue.
I've made a mistake in the script update :-( so the wake-up was not so good!
I've changed it in the morning and tested it. It's ok. The case in solved :-)
The tip is to make a .afterSec() if calling again an url to get the result of a previous ones, to be sure that the previous is really completed
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

waaren wrote: Tuesday 09 February 2021 0:10
hestia wrote: Monday 08 February 2021 19:56 Could be convenient to have "shuffle", "playlist" and "status" available in dzVents... I didn't find them when I write this script
Will have a look if / how to make these (and the others commands) available via dzVents.
How do you send these commands now and what is the result?
All is in the wake-up script, but perhaps you would like to have them extracted. But not is this topic?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by waaren »

hestia wrote: Tuesday 09 February 2021 13:41 All is in the wake-up script, but perhaps you would like to have them extracted. But not is this topic?
Is ok for me if you send them via PM
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Issue with dzVents in V.2020.2 (build 12913)

Post by hestia »

waaren wrote: Tuesday 09 February 2021 16:25
hestia wrote: Tuesday 09 February 2021 13:41 All is in the wake-up script, but perhaps you would like to have them extracted. But not is this topic?
Is ok for me if you send them via PM
PM sent
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest