Domotics user variable

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Dick60
Normal user
Posts: 243
Joined: 11 Feb 2018, 17:35
Location: The Netherlands

Domotics user variable

#1 Post by Dick60 » 14 Aug 2018, 19:44

I am not able to send the value of an ESp keypad device into a user vari in Domoticz.
What I have is the Rule:

If [keypad#ScanCode] = 2.00
TaskValueSet 1,1,[keypad#ScanCode]
SendTo HTTP 192.168.1.123,8080,/json.htm?type=command&param=updateuservariable&vname=Varkeypad&vtype=2&vvalue=[keypad#ScanCode]
Endif



The IP is a temp IP of my Domoticz server, The user var in domoticz is called Varkeypad as a string


The logfile show
3098184 : ScanCode=0x2
3098203 : EVENT: keypad#ScanCode=2.00
3098366 : ACT : TaskValueSet 1,1,2
3098409 : ACT : SendTo HTTP 192.168.1.123,8080,/json.htm?
type=command¶m=updateuservariable&vname=Varkeypad&vtype=2&vvalue=2




Why is there no value in the Varkeypad in Domoticz??

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Domotics user variable

#2 Post by grovkillen » 14 Aug 2018, 19:51

The space between "SendTo" and "HTTP" should be removed.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Dick60
Normal user
Posts: 243
Joined: 11 Feb 2018, 17:35
Location: The Netherlands

Re: Domotics user variable

#3 Post by Dick60 » 14 Aug 2018, 20:20

thanks, I removed the space but still no update of the user var in Domoticz.
Any more suggestions?
I know the IP is ok and the name of the Var as wel.

cyberclwn
Normal user
Posts: 21
Joined: 25 Aug 2017, 21:19

Re: Domotics user variable

#4 Post by cyberclwn » 14 Aug 2018, 22:11

Hi,

I think this should be your line:

Code: Select all

SendToHTTP 192.168.1.123,8080,/json.htm?type=command&param=updateuservariable&vname=Varkeypad&vtype=string&vvalue=[keypad#ScanCode]
Not sure if they changed it, but last time i used this it was not the number of the type, but the name.

Dick60
Normal user
Posts: 243
Joined: 11 Feb 2018, 17:35
Location: The Netherlands

Re: Domotics user variable

#5 Post by Dick60 » 15 Aug 2018, 21:23

Still no progress. This is what I have:

On keypad#ScanCode Do
If [keypad#ScanCode] = 8.00
TaskValueSet 1,1,[keypad#ScanCode]
SendToHTTP 192.168.1.123,8080,/json.htm?type=command&param=updateuservariable&vname=Varkeypad&vtype=String&vvalue=25
Endif
Endon

If I put
http://192.168.1.123:8080/json.htm?type ... &vvalue=21
in my browser, the user var in Domoticz is be updated but using the script from my ESP is not updating. The dummy field is updated but the Var not.

Meek
Normal user
Posts: 59
Joined: 31 Oct 2017, 15:50
Contact:

Re: Domotics user variable

#6 Post by Meek » 15 Aug 2018, 22:27

In Domoticz, you might want to try to accepts “instructions” within Domoticz without login credentials from the local network.

In Domoticz goto -> SETUP -> SETTINGS ->
In the option field “Local Networks (no username/password):” insert your IP range ( 192.168.1.* ).

Perhaps this might get you further.

Dick60
Normal user
Posts: 243
Joined: 11 Feb 2018, 17:35
Location: The Netherlands

Re: Domotics user variable

#7 Post by Dick60 » 16 Aug 2018, 20:53

The IP adding in Domoticz did the job. Now it is working! Thanks all for the good suggestions.
:D :D :D

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests