rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

rules

#1 Post by frank » 05 Nov 2023, 16:24

I want to send values from my SDM 630 via rules to Domoticz. I tried this rule:

on Laadpaal#V_L1 do
SendToHTTP 192.168.1.167,8888,/json.htm?type=command&param=udevice&idx=938&nvalue=0&svalue=[Laadpaal#V_L1] //Own made up IDX 123456

endon

The ESP sends the value to Domoticz but Domoticz doen't receive. Is it possible that this is due to pasword settings?

This is the log in the ESP:

18522417: EVENT: Laadpaal#V_L1=230.76
18522427: ACT : SendToHTTP 192.168.1.167,8888,/json.htm?type=command¶m=udevice&idx=938&nvalue=0&svalue=230.76

User avatar
Ath
Normal user
Posts: 3520
Joined: 10 Jun 2018, 12:06
Location: NL

Re: rules

#2 Post by Ath » 05 Nov 2023, 16:35

Like I said in the other thread, you'd best use one of the Domoticz controllers, in your case the HTTP variant will work the easiest. There you can conveniently set the username/password.

Also check the logs in Domoticz, to see what's actually being received there
/Ton (PayPal.me)

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: rules

#3 Post by frank » 05 Nov 2023, 16:40

could you give me an example for this?

User avatar
Ath
Normal user
Posts: 3520
Joined: 10 Jun 2018, 12:06
Location: NL

Re: rules

#4 Post by Ath » 05 Nov 2023, 17:25

Well, in the Controllers tab of ESPEasy you can add a controller, select Domoticz HTTP from the combobox, and wait until the page is reloaded.
Then fill in the IP-address, port, username and password for your Domoticz server, and check Enabled at the bottom before hitting Submit.

Then return to your Devices page, and edit the Task (Device) for the SDM task you want to send to Domoticz. Near the bottom of the page you'll find the Send to Controller list, where you will have to enable the checkbox and enter the Domoticz IDX number, then save the settings by clicking Submit.

At every Interval the data will be sent to Domoticz, as you intended ;)
/Ton (PayPal.me)

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: rules

#5 Post by frank » 05 Nov 2023, 20:08

we are talking in circels unfortunally.
that is wat is working but i have to split the valeus to use them in Domoticz

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: rules

#6 Post by TD-er » 05 Nov 2023, 20:18

You could act on the events via rules.
The event values are in the same order as you defined the task values for a task.

So let's assume you have a task called eastron1.
Just mark the checkbox to send all task values in a single event (event will be like: "eastron1#All=123.4,56.7,89.0")

A rules block could be like this:

Code: Select all

On eastron1#All do
  // Use the %eventvalueN% values to send to Domoticz with their own IDX value.
  
  LogEntry,"Eastron1 values: %eventvalue1% , %eventvalue2%, %eventvalue3%, %eventvalue4%"
endon

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 41 guests