How to check an osCommand in dzVents

Moderator: leecollings

Post Reply
User avatar
McMelloW
Posts: 435
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

How to check an osCommand in dzVents

Post by McMelloW »

Hello to all

I have a data-logger running and every 2 minutes i take a copy of the memory contents. This IP-address is dynamic and there is no room to make it a fixe IP-address. Sometimes the data-logger receives a new IP-address in my LAN and then I don't notice this
The copy of the memory is done with the following line in a dzVents script.

Code: Select all

domoticz.utils.osCommand('wget -nv -N -P /tmp/ 192.168.xxx.yyy/current/current_packets.vbus')
How can I check when this wget failed, because of a wrong IP-address
Greetings McMelloW
User avatar
waltervl
Posts: 7023
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: How to check an osCommand in dzVents

Post by waltervl »

Check the documentation on executeShellCommand()
It has option to check result (error code etc)

https://www.domoticz.com/wiki/DzVents:_ ... tion_3.1.0
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
McMelloW
Posts: 435
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: How to check an osCommand in dzVents

Post by McMelloW »

waltervl wrote: Monday 08 July 2024 22:53 Check the documentation on executeShellCommand()
It has option to check result (error code etc)

https://www.domoticz.com/wiki/DzVents:_ ... tion_3.1.0
Thanks, I will dig into this example.
Greetings McMelloW
Kedi
Posts: 622
Joined: Monday 20 March 2023 14:41
Target OS: Linux
Domoticz version: latest
Location: Somewhere in NL
Contact:

Re: How to check an osCommand in dzVents

Post by Kedi »

Most routers have the possibility to assign an IP-address to a MAC-address.
Is that a possibility?
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
McMelloW
Posts: 435
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: How to check an osCommand in dzVents

Post by McMelloW »

Kedi wrote: Tuesday 09 July 2024 16:44 Most routers have the possibility to assign an IP-address to a MAC-address.
Is that a possibility?
My router can only 10 fixed IP-addresses. So I have to make a choice.
Greetings McMelloW
User avatar
habahabahaba
Posts: 285
Joined: Saturday 18 March 2023 14:44
Target OS: Windows
Domoticz version: 2024.4
Contact:

Re: How to check an osCommand in dzVents

Post by habahabahaba »

Is it possible to make data-logger send some data to domoticz?
User avatar
McMelloW
Posts: 435
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: How to check an osCommand in dzVents

Post by McMelloW »

habahabahaba wrote: Thursday 11 July 2024 16:36 Is it possible to make data-logger send some data to domoticz?
No this data logger does not send any thing. You have to get it
Greetings McMelloW
Post Reply