Replies: 11 comments 15 replies
-
Do you need to use script for other reasons? Alternatively can also have device 1 rule the sequence with those ruletimer and sending either an event command or event the WebSend command through device 2 |
Beta Was this translation helpful? Give feedback.
-
Thanks for fast reply! |
Beta Was this translation helpful? Give feedback.
-
Thanks for all your feedback. I will try to setup some rules on the 1st device managing 2 variables to be set at 20 sec and 40 sec offset based on Time#Minute Timer trigger. I hope I can use these variables in the script for reliable Websend trigger. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately I cannot use Rules in the Console as I was used to do on the 2nd device (Wlan ESP8266 smart plug). Does anybody know, where to place the Rules in the Script? |
Beta Was this translation helpful? Give feedback.
-
Seems I can only use Script with unreliable timer trigger in device 1 and Rules via Console with reliable Time#Minute trigger in device 2. |
Beta Was this translation helpful? Give feedback.
-
Sorry for mixing the device numbers 1 and 2! Obviously the Wlan Socket with reliable rules(originally described as device 1) cannot use Scripts and the bitShake esp8266 need to run with Script exclusively.Now I would send from the Script a command to device 1 to trigger the minute based websend. At the moment I don't know how to send the command to the device in the same network (192.168.1.x). Furthermore how to build the rule trigger based on the sent command. Mit freundlichen GrüßenEdgar Weiter
|
Beta Was this translation helpful? Give feedback.
-
According to scripting docs, >S section is least precise, upsecs next best, and using t:timer1=20 is most precise. Maybe try using script timers. I have used the ms timers and that seemed pretty accurate. Section execution was within 2ms and could be calibrated. But really, best bet would be to trigger device 2 from Device 1. so
define device2 with a dummy relay so you can use the trigger in section >E
|
Beta Was this translation helpful? Give feedback.
-
Sorry, wrong adresses in the description of Device 1 and Device 2. Below the corrected: Rule2 Device 2 (Household meter ESP8266 192.168.1.213) : power_solar=0 '>S print power_solar : %power_solar% if upsecs%20==0 As already mentioned the Websend from Device 1 seems to work (just Rule1 enabled): After the Weblog 3 activation of Device 2 I could confirm the wrong command from the websend of Device 1(192.168.1.63): It seems that the variable "power_solar" in device 2 is not properly detected for transfer of the value from Device 1(power_solar=67). Any idea how to get the variables from Device 1 and Device 2 matching for transfer? |
Beta Was this translation helpful? Give feedback.
-
I read it, but I cannot understand. |
Beta Was this translation helpful? Give feedback.
-
I will try this. |
Beta Was this translation helpful? Give feedback.
-
Yes I have no MQTT server. I will try this next week. My house roof collapsed and I have other problems at the moment... Mit freundlichen GrüßenEdgar Weiter
|
Beta Was this translation helpful? Give feedback.
-
I have two devices sending data to the same Thingspeak Channel.
The time interval between two messages must be minimum 15 seconds otherwise the later websend becomes ignored.
Device 1 is sending minute exact data by reliable time trigger rule "On Time#Minute.." (very reliable).
Device 2 should send via Script every minute 2 data with 20 and 40 seconds offset to Device 1 sent data.
For Device 2 I used basically 20 seconds upsecs trigger skipping the Websend around Time#Minute trigger of Device 1:
">S
if upsecs%20=0..."
Unfortunately the upsecs timer is unreliable and once a day the trigger shifts by several seconds causing overlapping Websend of Device 1 and Device 2. Partially the minute based data of Device 1 is then not send at all.
Can anybody help to built reliable trigger for Websend on Device 2 Script?
Beta Was this translation helpful? Give feedback.
All reactions