Hello,
I have tried to search for an answer but without success;
This Blockly block updates a parameter (0219) with fixed value = 100 and works OK. But I want to use an existing user variable instead of the fixed value in the URL. Is this possible in Blockly and what would I write as "val=" ???
Thanks a lot in advance!
Help with Blockly...
Moderator: leecollings
-
- Posts: 300
- Joined: Thursday 01 November 2018 19:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.6
- Location: Portugal
- Contact:
Re: Help with Blockly...
First create a new global variable in setup>user variables. Give it type "float". Then set it to 100 in Blockly using Logic>Set and Devices>User variables and choosing from the 4 options corresponding to the first letter of your variable.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
-
- Posts: 42
- Joined: Thursday 14 September 2023 19:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 16341
- Location: Stockholm
- Contact:
Re: Help with Blockly...
Hello,
Thank you "solarboy" for your reply. I already have a Blockly that updates the user variable. Now, what I want to do is use thatvariable as the value ("val=") in the http request but I dont know how to correctly format it....
/fjuppe
Thank you "solarboy" for your reply. I already have a Blockly that updates the user variable. Now, what I want to do is use thatvariable as the value ("val=") in the http request but I dont know how to correctly format it....
/fjuppe
-
- Posts: 347
- Joined: Sunday 03 July 2016 16:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.3
- Location: Netherlands
- Contact:
Re: Help with Blockly...
not a direct answer but I would advice to use dzVents being very flexible. And yes it has a learning curve .....
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
-
- Posts: 42
- Joined: Thursday 14 September 2023 19:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 16341
- Location: Stockholm
- Contact:
Re: Help with Blockly...
Hello,
I finally got dzVents to work. This is the code for setpoint to Husdata (heatpump interface). To set temperature, you must multiply with 10. To set 10 degrees, send 100. I dont check for same value because I dont use the timer....
I finally got dzVents to work. This is the code for setpoint to Husdata (heatpump interface). To set temperature, you must multiply with 10. To set 10 degrees, send 100. I dont check for same value because I dont use the timer....
Code: Select all
return {
on = {
devices = { 'Set Pool Temp' },
--timer = { 'on every 2 minutes' }
},
execute = function(domoticz, device)
local setpoint = domoticz.devices('Set Pool Temp').setPoint
local NewParallel = (setpoint)*10
--local ActualParallel = tonumber(domoticz.devices('Parallel').state)
--if NewParallel/10 ~= ActualParallel then
domoticz.openURL('http://xxxx.tplinkdns.com:xx/api/set?idx=0219&val=' .. NewParallel)
--end
end
}
-
- Posts: 347
- Joined: Sunday 03 July 2016 16:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.3
- Location: Netherlands
- Contact:
Re: Help with Blockly...
happy it works now
once you know the basics of dzVents it's very easy and powerfull
once you know the basics of dzVents it's very easy and powerfull
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
-
- Posts: 42
- Joined: Thursday 14 September 2023 19:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 16341
- Location: Stockholm
- Contact:
Re: Help with Blockly...
Thank you for your push against dzVents…
Who is online
Users browsing this forum: No registered users and 1 guest