Got it all working. Very good work!
There were 2 things:
1. I'm running on the latest Beta of Domoticz. Ever since mid december this is not working in the Beta:
local lat = dz.settings.location.latitude
local long = dz.settings.location.longitude
Gives two times a zero!
So I added right below:
lat = 52.15603148339703
long = 5.372035503387451
[I found this problem with your "Dutch Stookwijzer" script. So I was prepared.]
2. In Global Data I Added under data:
airplanes = { initial = {} },
Has to be:
ap_table = { initial = {} },
Found the first name somewhere higher up in the posts.
But I'm very glad now. Everything is working.
Although I have some doubles in the list and CSV.
Maybe I hve to narrow down the distance
Willem
Thanks.
Script for Airplanes.live api
Moderator: leecollings
-
- Posts: 26
- Joined: Monday 21 December 2020 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Script for Airplanes.live api
--
RP5 - Bookworm - Domoticz 2024.7 and Latest Beta - Z-Wave JS UI. On Docker
Willem
--
RP5 - Bookworm - Domoticz 2024.7 and Latest Beta - Z-Wave JS UI. On Docker
Willem
--
- waltervl
- Posts: 5409
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Script for Airplanes.live api
When I put this in my domoticz script is is working and logging normal values:WBeulink wrote: ↑Tuesday 21 January 2025 17:17 Got it all working. Very good work!
There were 2 things:
1. I'm running on the latest Beta of Domoticz. Ever since mid december this is not working in the Beta:
local lat = dz.settings.location.latitude
local long = dz.settings.location.longitude
Gives two times a zero!
Code: Select all
execute = function(domoticz, device)
domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
domoticz.log('Location lat ' .. domoticz.settings.location.latitude .. ' longitude: ' .. domoticz.settings.location.longitude , domoticz.LOG_INFO)
end
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 241
- Joined: Thursday 14 March 2024 10:11
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Script for Airplanes.live api
1. About the lat & long
No need to say that the dz.settings.location.latitude amd dz.settings.location.longitude are working here.
waltervl was first. ( I guess he is here day and night

Curious to know: Are Latitude and Longitude entered in your Setup - Settings - System under Location?
Also look at other earlier post about the 0,0.
2. About the table,
I remember that I changed this in de beginning. May be I did not rename it in all places, but I am glad you found the solution.
Found and changed this in my earlier posts and publications of the script, where it is also present.
NB. You might not have ran into it, but change also the line
Code: Select all
_d.initialize('airplanes') -- Re-initialize the table
Code: Select all
_d.initialize('ap_table') -- Re-initialize the table
Domoticz in Ubuntu virtual machine on Synology DS718+ behind FRITZ!Box.
Using: EvoHome; MELCloud; P1 meter; Z-Stick GEN5; Z-Wave-js-ui; MQTT; Greenwave powernodes 1+6; Fibaro switch, plugs, smoke; FRITZ!DECT 200. Scripts listed in profile interests.
Using: EvoHome; MELCloud; P1 meter; Z-Stick GEN5; Z-Wave-js-ui; MQTT; Greenwave powernodes 1+6; Fibaro switch, plugs, smoke; FRITZ!DECT 200. Scripts listed in profile interests.
-
- Posts: 26
- Joined: Monday 21 December 2020 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Script for Airplanes.live api
_d.initialize('ap_table') -- Re-initialize the table
This was OK in my script ('ap-table') but the line was commented out.
Now it isn't anymore. Let's see .......
This was OK in my script ('ap-table') but the line was commented out.
Now it isn't anymore. Let's see .......
--
RP5 - Bookworm - Domoticz 2024.7 and Latest Beta - Z-Wave JS UI. On Docker
Willem
--
RP5 - Bookworm - Domoticz 2024.7 and Latest Beta - Z-Wave JS UI. On Docker
Willem
--
-
- Posts: 241
- Joined: Thursday 14 March 2024 10:11
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Script for Airplanes.live api
No. That line was indeed correct and commented out and only used for reset, when table was mixed up to clean up (old records that are not deleted properly).Should not be needed anymore.
Futher down you can find the line that I mentioned.
Domoticz in Ubuntu virtual machine on Synology DS718+ behind FRITZ!Box.
Using: EvoHome; MELCloud; P1 meter; Z-Stick GEN5; Z-Wave-js-ui; MQTT; Greenwave powernodes 1+6; Fibaro switch, plugs, smoke; FRITZ!DECT 200. Scripts listed in profile interests.
Using: EvoHome; MELCloud; P1 meter; Z-Stick GEN5; Z-Wave-js-ui; MQTT; Greenwave powernodes 1+6; Fibaro switch, plugs, smoke; FRITZ!DECT 200. Scripts listed in profile interests.
-
- Posts: 26
- Joined: Monday 21 December 2020 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Script for Airplanes.live api
Found indeed. Thanks.
--
RP5 - Bookworm - Domoticz 2024.7 and Latest Beta - Z-Wave JS UI. On Docker
Willem
--
RP5 - Bookworm - Domoticz 2024.7 and Latest Beta - Z-Wave JS UI. On Docker
Willem
--
Who is online
Users browsing this forum: No registered users and 0 guests