so you can use
domoticz.executeShellCommand('curl ...')
Search found 187 matches
- Sunday 22 December 2024 19:37
- Forum: dzVents
- Topic: posting data
- Replies: 26
- Views: 566
- Sunday 22 December 2024 13:05
- Forum: dzVents
- Topic: posting data
- Replies: 26
- Views: 566
Re: posting data
So... may be its Docker problem?
- Friday 20 December 2024 7:04
- Forum: dzVents
- Topic: posting data
- Replies: 26
- Views: 566
Re: posting data
Made some test with Node-red. 1. Out: postData = { idx = 101, status = Off, level = 15, param1 = qweqwe, qwer = werewqr, open = true } In: {"idx":101,"level":15,"open":true} Lost some data 2. Out: postData = { idx = '101', status = On, level = '15', param1 = 'qweqwe', qwer = 'werewqr', open = 'true ...
- Thursday 19 December 2024 19:39
- Forum: dzVents
- Topic: posting data
- Replies: 26
- Views: 566
Re: posting data
My opinion: {"idx":108,"level":15,"status":"On"} - almost the correct json format except 108 and 15 So every posting param must be a string Try postData = { idx = tostring(switch.idx), status = switch.state, level = tostring(switch.level) }
- Thursday 19 December 2024 17:34
- Forum: dzVents
- Topic: posting data
- Replies: 26
- Views: 566
Re: posting data
Wiki
Posting data should be a string.
Is it?
My code is:
It works but i have only 1 param to post.
Posting data should be a string.
Is it?
My code is:
Code: Select all
domoticz.openURL({
url = APIURL,
method = 'POST',
postData = { msgtoAlice = postString }
}).afterSec(1)
- Friday 13 December 2024 19:28
- Forum: Utility
- Topic: Dynamic Price for Energy - How-To ?
- Replies: 13
- Views: 356
Re: Dynamic Price for Energy - How-To ?
Show the full code.
What is the trigger for the script? Time or device?
if domoticz.time.matchesRule('at 22:10') then - you are trying to catch the event at the exact time.
What if to give some difference like
if domoticz.time.matchesRule('at 22:09-22:11') then ... ?
What is the trigger for the script? Time or device?
if domoticz.time.matchesRule('at 22:10') then - you are trying to catch the event at the exact time.
What if to give some difference like
if domoticz.time.matchesRule('at 22:09-22:11') then ... ?
- Friday 13 December 2024 13:20
- Forum: General Discussion
- Topic: Weather Notifications
- Replies: 1
- Views: 87
- Thursday 12 December 2024 8:15
- Forum: PHP and all others
- Topic: Get idx from switch
- Replies: 11
- Views: 321
Re: Get idx from switch
You can store some data in User Variables in settings menu and call them from script.
- Sunday 08 December 2024 12:53
- Forum: dzVents
- Topic: How can I retrieve Costs T1 and Costs T2
- Replies: 10
- Views: 259
Re: How can I retrieve Costs T1 and Costs T2
So why dont you want to take them from json answer ?
- Friday 06 December 2024 6:04
- Forum: General Discussion
- Topic: telegram double account
- Replies: 5
- Views: 561
Re: telegram double account
Yes.
I'm usin Dzvents script for that
I'm usin Dzvents script for that
- Tuesday 29 October 2024 18:19
- Forum: LUA
- Topic: Script examples (Lua)
- Replies: 138
- Views: 154690
Re: Script examples (Lua)
I think we all know that its usefull to know sometimes how long a "switch" is on. Yes, thats right. Thats my solution: return { on = { timer = {'Every 20 minutes'}, }, logging = { level = domoticz.LOG_INFO, marker = 'Check backdoor lights', }, execute = function(domoticz, item) local switch ...
- Friday 25 October 2024 19:42
- Forum: dzVents
- Topic: OpenUrl question
- Replies: 2
- Views: 473
Re: OpenUrl question
You can try smth like this (curl is needed): local handler1 = io.popen('curl -s -o /dev/null -w "%{http_code}" "URL_to_check" ') local response1 = handler1:read('*a') if (response1 == "200") then -- if OK end
- Saturday 28 September 2024 19:13
- Forum: Zigbee
- Topic: SONOFF ZigBee 3.0 USB Dongle Plus (ZBDongle-E)
- Replies: 6
- Views: 846
Re: SONOFF ZigBee 3.0 USB Dongle Plus (ZBDongle-E)
Thats normal issue for Dongle E-version. Have the same and everything works
- Saturday 28 September 2024 11:13
- Forum: Zigbee
- Topic: SONOFF ZigBee 3.0 USB Dongle Plus (ZBDongle-E)
- Replies: 6
- Views: 846
Re: SONOFF ZigBee 3.0 USB Dongle Plus (ZBDongle-E)
So if you just bought the new SONOFF ZBDongle-E you have the older one that worked?
Did you just replace them or reinstall dongle and plugin?
Did you just replace them or reinstall dongle and plugin?
- Monday 23 September 2024 10:48
- Forum: General Discussion
- Topic: how to use virtual switch,switch,media player ?
- Replies: 9
- Views: 480
Re: how to use virtual switch,switch,media player ?
Thats my virtual Selector Switch. I can put thare up to 10 buttons = up to 10 commands.- Monday 23 September 2024 10:41
- Forum: General Discussion
- Topic: how to use virtual switch,switch,media player ?
- Replies: 9
- Views: 480
Re: how to use virtual switch,switch,media player ?
Sorry, i gave you example for the virtual switch, i dont know such device as virtual device (media player). May be you are using some plugin...
Anyway
one switch = one button
one selector switch = several buttons
Anyway
one switch = one button
one selector switch = several buttons
- Saturday 21 September 2024 17:11
- Forum: General Discussion
- Topic: how to use virtual switch,switch,media player ?
- Replies: 9
- Views: 480
Re: how to use virtual switch,switch,media player ?
Try this local devId = 87 -- change to your switch IDx return { on = { devices = {devId}, -- IDx of your virtual switch httpResponses = { 'MediaPlayer' -- must match with Callback } }, logging = { level = domoticz.LOG_INFO, marker = 'TV control', }, execute = function(domoticz, device) local volUp ...
- Saturday 21 September 2024 14:00
- Forum: General Discussion
- Topic: how to use virtual switch,switch,media player ?
- Replies: 9
- Views: 480
Re: how to use virtual switch,switch,media player ?
In my case i have a virtual switch type of Selector for my TV. But my IR controller needs internet so i need curl installed . return { on = { devices = {87}, -- IDx of your virtual switch httpResponses = { 'TVcontrol_trigger' -- must match with Callback } }, logging = { level = domoticz.LOG_INFO ...
- Wednesday 18 September 2024 8:20
- Forum: General Discussion
- Topic: how to use virtual switch,switch,media player ?
- Replies: 9
- Views: 480
Re: how to use virtual switch,switch,media player ?
You have to write dzVents script actioned by your virtual switch.
So there you write all commands
So there you write all commands
- Wednesday 04 September 2024 9:51
- Forum: Other questions and discussions
- Topic: JSON call behind Nginx reverse proxy
- Replies: 15
- Views: 677
Re: JSON call behind Nginx reverse proxy
Hi.
Are you using zigbee plugin and what is the version of Domoticz?
https://zigbeefordomoticz.github.io/wik ... pi-command
Are you using zigbee plugin and what is the version of Domoticz?
https://zigbeefordomoticz.github.io/wik ... pi-command