servo rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

servo rules

#1 Post by asuz » 01 May 2020, 12:05

Hi to all,
How can I move a servo motor 0 to 180 degree - 180 degree to 0 degree three times at a certain time(by schedule)? I cannot script by myself is there any help?
Last edited by asuz on 01 May 2020, 14:06, edited 1 time in total.

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

Re: servo rules

#2 Post by Ath » 01 May 2020, 13:04

asuz wrote: 01 May 2020, 12:05 I cannot make a rule is there any help?
Do you mean you have Rules still disabled (default setting on a cleanly installed device) in Advanced config, or you don't know how to write rules?
/Ton (PayPal.me)

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: servo rules

#3 Post by asuz » 01 May 2020, 14:04

Ath wrote: 01 May 2020, 13:04
asuz wrote: 01 May 2020, 12:05 I cannot make a rule is there any help?
Do you mean you have Rules still disabled (default setting on a cleanly installed device) in Advanced config, or you don't know how to write rules?
Rules section is enabled, I mean that how to script the my scenario.

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

Re: servo rules

#4 Post by Ath » 02 May 2020, 13:13

I'd go for something along these lines:
Assumptions:
Action times: 08:00, 15:00, 22:00
GPIO: 15
Servo movement: 0-180 degrees, (some only support -90 to 90 or -135 to 135 degrees, as stated in the documentation)

Code: Select all

final script is below...
Last edited by Ath on 03 May 2020, 16:39, edited 1 time in total.
/Ton (PayPal.me)

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

Re: servo rules

#5 Post by Ath » 02 May 2020, 14:05

Ath wrote: 02 May 2020, 13:13 I'd go for something along these lines:
What I was trying to say was: I didn't test that code :D

The servo command is a bit tricky, it seems, you need to give the servo command some time to move the actual servo, I ended up with this:

Code: Select all

final script is below...
Last edited by Ath on 03 May 2020, 16:38, edited 1 time in total.
/Ton (PayPal.me)

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: servo rules

#6 Post by asuz » 02 May 2020, 22:48

What I was trying to say was: I didn't test that code :D

The servo command is a bit tricky, it seems, you need to give the servo command some time to move the actual servo, I ended up with this:
Thanks for your reply; I test and modify the second script and result is servo goes to 180 degree and come back to 0 degree and goes to 180 and stay there so how can bring it to 0 and go to 180 and come back to 0 again. Here is modified script. Can you check it?

Code: Select all

on ServoAction do
  servo,1,4,180
  timerset,8,1  // Extend as needed if the servo doesn't make it to its endpoint before returning movement
endon

on ServoReturn do
  servo,1,4,0
  timerset,7,1
endon

on ServoDone do
  servo,1,4,360 // Turn it back off
endon

on Rules#Timer=7 do
  asyncevent,ServoDone
endon

on Rules#Timer=8 do
  asyncevent,ServoReturn
endon

// Schedule
on Clock#Time=All,23:37 do
  event,ServoAction
endon
on Clock#Time=All,15:00 do
  event,ServoAction
endon
on Clock#Time=All,22:00 do
  event,ServoAction
endon

// Initialization
on System#Boot do
  servo,1,4,0 // to starting position
endon

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

Re: servo rules

#7 Post by Ath » 03 May 2020, 10:08

In the 'on ServoDone do' event the value has to be 9000 to turn off the servo, not 360. That 360 will bring the servo as close to 360 as it can, being 180...
/Ton (PayPal.me)

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: servo rules

#8 Post by asuz » 03 May 2020, 13:19

Ath wrote: 03 May 2020, 10:08 In the 'on ServoDone do' event the value has to be 9000 to turn off the servo, not 360. That 360 will bring the servo as close to 360 as it can, being 180...

Code: Select all

on ServoDone do
  servo,1,4,9000 // Turn it back off
endon
Not works only servo stay at the beginning point:(

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

Re: servo rules

#9 Post by Ath » 03 May 2020, 14:09

Hmm, this is getting a bit weird.

A few questions:

What type of servo are you using, because the code I shared is actually tested on a MG995R, that can move from 0 to ~180 degrees.
What version of ESPEasy are you running? It should best be a 2020 made release (20200410 seems very stable atm), though the last couple of builds of 2019 are also alright. Releases like the 'Stable' R120 are in fact not very stable...

And a suggestion:
You can increase the timerset,8,1 to timerset,8,3 (or even 5) to give the servo some more time to actually move to its 'destination' of ~180 degrees before it is commanded back to 0
/Ton (PayPal.me)

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: servo rules

#10 Post by asuz » 03 May 2020, 14:33

Ath wrote: 03 May 2020, 14:09 Hmm, this is getting a bit weird.

A few questions:

What type of servo are you using, because the code I shared is actually tested on a MG995R, that can move from 0 to ~180 degrees.
What version of ESPEasy are you running? It should best be a 2020 made release (20200410 seems very stable atm), though the last couple of builds of 2019 are also alright. Releases like the 'Stable' R120 are in fact not very stable...

And a suggestion:
You can increase the timerset,8,1 to timerset,8,3 (or even 5) to give the servo some more time to actually move to its 'destination' of ~180 degrees before it is commanded back to 0
*I am using MG90S
*I install ESP_Easy_mega-20200426_normal_ESP8266_4M1M to the LoLin NodeMCU V3 ESP8266
*Maybe it helps here is the logs. I do not understand what the WD : Uptime 2 ConnectFailures 0 FreeMem 22584 WiFiStatus 3 refers at the end of the logs?

Code: Select all

70809: EVENT: Clock#Time=Sun,15:31
70825: ACT  : event,ServoAction
70826: Command: event
70827: EVENT: ServoAction
70831: ACT  : servo,1,4,180
70832: Command: servo
70834: SW   : GPIO 4 Servo set to 180
70836: ACT  : timerset,8,5
70837: Command: timerset
76809: EVENT: Rules#Timer=8
76850: ACT  : asyncevent,ServoReturn
76852: Command: asyncevent
76923: EVENT: ServoReturn
76954: ACT  : servo,1,4,0
76956: Command: servo
76957: SW   : GPIO 4 Servo set to 0
76960: ACT  : timerset,7,1
76961: Command: timerset
78809: EVENT: Rules#Timer=7
78847: ACT  : asyncevent,ServoDone
78849: Command: asyncevent
78923: EVENT: ServoDone
78959: ACT  : servo,1,4,9000
78960: Command: servo
78961: SW   : GPIO 4 Servo set to 9000
93365: WD   : Uptime 2 ConnectFailures 0 FreeMem 22584 WiFiStatus 3

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

Re: servo rules

#11 Post by Ath » 03 May 2020, 14:45

That WD log line is just the WatchDog that logs some of the current status in INFO log mode, nothing to worry about.

Is your servo now moving as expected?

If not, lets try some manual commands: (you'd find that on the Tools page, don't copy the quotes I used)
entering the command "servo,1,4,180" should move the servo to its 180 degree position, does that work as expected?
after that:
entering the command "servo,1,4,0" should move the servo to its initial position, does that work as expected?
and then:
entering the command "servo,1,4,9000" should set the servo to silent mode (the humming stops), does that work as expected?
/Ton (PayPal.me)

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: servo rules

#12 Post by asuz » 03 May 2020, 15:00

Ath wrote: 03 May 2020, 14:45 That WD log line is just the WatchDog that logs some of the current status in INFO log mode, nothing to worry about.

Is your servo now moving as expected?

If not, lets try some manual commands: (you'd find that on the Tools page, don't copy the quotes I used)
entering the command "servo,1,4,180" should move the servo to its 180 degree position, does that work as expected?
after that:
entering the command "servo,1,4,0" should move the servo to its initial position, does that work as expected?
and then:
entering the command "servo,1,4,9000" should set the servo to silent mode (the humming stops), does that work as expected?
first http://192.168.1.84/control?cmd=Servo,1,4,180 to move the servo 180. When I try to move the servo axis, its locked and no not let me move (I think you mean it by humming)
second http://192.168.1.84/control?cmd=Servo,1,4,0 to move the servo to the 0 and the same locked feelings as above
last http://192.168.1.84/control?cmd=Servo,1,4,9000 the axis let me to move easily I do not feel and force to stop me.

Maybe tomorrow I will need to test the system with the different servo

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: servo rules

#13 Post by asuz » 03 May 2020, 16:03

Ath wrote: 03 May 2020, 14:45 That WD log line is just the WatchDog that logs some of the current status in INFO log mode, nothing to worry about.

Is your servo now moving as expected?

If not, lets try some manual commands: (you'd find that on the Tools page, don't copy the quotes I used)
entering the command "servo,1,4,180" should move the servo to its 180 degree position, does that work as expected?
after that:
entering the command "servo,1,4,0" should move the servo to its initial position, does that work as expected?
and then:
entering the command "servo,1,4,9000" should set the servo to silent mode (the humming stops), does that work as expected?

Dear Ath, I read the all the messages and I realise that there is a misunderstanding about my starting topic.
I asked that;
How can I move a servo motor 0 to 180 degree - 180 degree to 0 degree three times at a certain time(by schedule)? I cannot script by myself is there any help?
I mean that 0-180,180-0 (first movement) and 0-180,180-0 (second movement) and 0-180,180-0 (third movement) do the three movement thee times a day not one movement three times a day.
I am really sorry for not being able to fully express my problem and I apologize for the late notice that you misunderstood my question.I am really sorry about it.
I hope this time I express my question.

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

Re: servo rules

#14 Post by Ath » 03 May 2020, 16:37

Well, that's not a biggie, I can fix that :o
I've used a Dummy device so I could monitor it in the Devices page, but we can also use a uservar (let,1,x and [Var#1], there are 16 available) as I've done below:

Code: Select all

on ServoAction do
  servo,1,4,180
  timerset,8,1  // Extend as needed if the servo doesn't make it to its endpoint before returning movement
endon

on ServoReturn do
  servo,1,4,0
  timerset,7,1
endon

on ServoDone do
  servo,1,4,9000 // Turn it back off
  let,1,[Var#1]-1  // Decrease by 1
  if [Var#1] > 0  // More to do?
    event,ServoAction
  endif
endon

on Rules#Timer=7 do
  asyncevent,ServoDone
endon

on Rules#Timer=8 do
  asyncevent,ServoReturn
endon

// Schedule
on Clock#Time=All,23:37 do
  let,1,3  // Number of left/right (or in/out) moves to make
  event,ServoAction
endon
on Clock#Time=All,15:00 do
  let,1,3
  event,ServoAction
endon
on Clock#Time=All,22:00 do
  let,1,3
  event,ServoAction
endon

// Initialization
on System#Boot do
  servo,1,4,0 // to starting position
endon
/Ton (PayPal.me)

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: servo rules

#15 Post by asuz » 03 May 2020, 16:50

Ath wrote: 03 May 2020, 16:37 Well, that's not a biggie, I can fix that :o
I've used a Dummy device so I could monitor it in the Devices page, but we can also use a uservar (let,1,x and [Var#1], there are 16 available) as I've done below:
Perfect,Greatttttttt, it is my ( actually your :) )automatic feeding project for my fish in the aquarium. I am grateful to you both for myself and for my fish in the aquarium. Thank you very muchhhhhhh :)

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

Re: servo rules

#16 Post by Ath » 03 May 2020, 19:47

asuz wrote: 03 May 2020, 16:50 Perfect
You're welcome :)
/Ton (PayPal.me)

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#17 Post by RonnyF » 24 Oct 2020, 12:54

Hello to all,

Since this is my first post in this forum, I hope that it is okay to ask a hopefully referring question to the main topic.

I try to control two Servos and a Speaker connected to a DFPlayer Mini Board with help of a Wemos D1 Mini. The Servo control does work out of the box with all the "normal" builds, but I found out that the MP3-Player-support is only available in "test" builds. But when I flash a test build, the Servo command seems to be executed (gives ok reply), but no action happens. Unfortunately I cannot test, if the MP3-Player works in the test build, since I still have a problem with my SD-Card I guess, but at least the command shows "ok" when submitted.

It was tested with several builds out of 20200929 and 20201022.

Any help is appreciated, sound and Servo-control in the same build would be awesome :)

Best regards,
Ronny

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

Re: servo rules

#18 Post by Ath » 24 Oct 2020, 13:39

What GPIO's have you connected the servo's and mp3 device on?
The test build should actually execute the servo commands just the same as the normal builds, what exact build did you install (filename of the .bin file please)
/Ton (PayPal.me)

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

Re: servo rules

#19 Post by TD-er » 24 Oct 2020, 14:08

The "test" builds have a flag set to limit build size and one of the things left out to reduce size is the servo functionality.

I think it is better to create a custom build yourself including just the plugins you need (and controllers)

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

Re: servo rules

#20 Post by Ath » 24 Oct 2020, 15:34

TD-er wrote: 24 Oct 2020, 14:08 The "test" builds have a flag set to limit build size and one of the things left out to reduce size is the servo functionality.
Ah, "another one bites the dust" :) another reason to try and get the user-defined build-service up and running.
/Ton (PayPal.me)

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#21 Post by RonnyF » 24 Oct 2020, 15:48

Hello,

Thank you for the fast reply! I was hoping that I just made a mistake, but your explanation is exactly what I also encountered when trying different builds... I always used the 1M4M-build of the two mentioned releases, and tried both the „test“ and the „test-beta“ versions of them.
Is there an explanation on how to get the Servo-function activated also in test builds? Which files need to be moved or which actions have to be executed in order to get the Servos working? I don‘t need any further functionality than just those two - I promise ;)

If this information is needed, I used basically the same ports as described in the wiki:
5V - VCC of Servos and MP3-Board
G - Ground of Servos and MP3-Board
D2(GPIO4) - Data Servo 1
D0(GPIO16) - Data Servo 2
D7(GPIO13) - RX MP3-Board

Best regards,
Ronny

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

Re: servo rules

#22 Post by TD-er » 24 Oct 2020, 20:24

If you can build it yourself, just build the "custom" build and add the wanted plugins to tools/pio/pre_custom_esp8266.py (or something like that)

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#23 Post by RonnyF » 24 Oct 2020, 23:48

Unfortunately, I don’t know how to create a custom build on my own... Would it be possible, to include the Servos in one of the next test builds? Since there currently is a problem with commands in the newest builds, I can‘t use them anyway..

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

Re: servo rules

#24 Post by TD-er » 25 Oct 2020, 00:21

Please list the plugins + controllers you need and I will create a test build for you.

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#25 Post by RonnyF » 25 Oct 2020, 00:29

Awesome, thank you so much! Basically, it is just everything I need for driving two servos and one DFPlayer-Mini board with an ESP8266 on a Wemos D1 Mini board. I use http-Requests for driving the Servos and the MP3-board. If this is not enough information, I can have a look on it tomorrow if I can find out what exactly I use in my solution, but the only thing I really configure in the end is the name and the port of the player.

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

Re: servo rules

#26 Post by TD-er » 25 Oct 2020, 01:02

Can you try this test build? https://www.dropbox.com/s/sya6oznauqu2t ... d.zip?dl=0
I made a 4M flash version with just the "normal" build including P065-MP3
For the 1M build I just added some plugins:

Code: Select all

  env.Append(CPPDEFINES=[
    "CONTROLLER_SET_ALL",
    "NOTIFIER_SET_NONE",
#    "PLUGIN_BUILD_NORMAL",
    "USES_P001",  # Switch
    "USES_P002",  # ADC
    "USES_P004",  # Dallas DS18b20
    "USES_P028",  # BME280
    "USES_P036",  # FrameOLED
    "USES_P059",  # Encoder
    "USES_P081",  # Cron
    "USES_P065",  # MP3
    "FEATURE_I2CMULTIPLEXER",

    "USE_SETTINGS_ARCHIVE"
  ])

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#27 Post by RonnyF » 25 Oct 2020, 19:02

Thank you for the build, but is this still the current build having the problem that every command gets the response „Command unknown“? With this build, no commands are working :(

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

Re: servo rules

#28 Post by TD-er » 25 Oct 2020, 21:06

What commands do you send and from where?

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#29 Post by RonnyF » 25 Oct 2020, 21:21

I try to send
Servo,<No>,<GPIO>,<angle>
Play,1

And tried ist as commands directly in the UI and as http-requests. I think there was a post „dashboard broken“ describing this behaviour. But it would also be totally fine to have a custom build from a version a month ago, I am running the test and normal builds for 4M1M from Release 20200929 and one is handling Servos and the other one the MP3 board without problems. So a combination of the 20200929 normal build plus the MP3-Addon should do it.

Another question: is the virtual coffee sponsoring still working? I definitely owe something for this awesome free software!

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

Re: servo rules

#30 Post by TD-er » 25 Oct 2020, 23:19

Looking into the problem with the commands right now.
There seems to be something broken in the processing of these commands.

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

Re: servo rules

#31 Post by TD-er » 25 Oct 2020, 23:29

OK, the "servo" command will only be accepted if you have the "switch" plugin active and enabled.
This is needed as the servo command is part of the switch plugin (which is one thing on my todo list to split, yet another reminder of why it really should be split)

You don't need to setup anything for this task, as long as there is at least one task with the "switch" plugin assigned to it and enabled.

Edit:
About the MP3 player plugin.
You need to have the plugin assigned to a task, enabled and selected a GPIO as serial communicatoin (Only sending from ESP, no communication back)


About the sponsoring, coffee, etc. See the icons at the top of the readme: https://github.com/letscontrolit/ESPEasy

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

Re: servo rules

#32 Post by TD-er » 26 Oct 2020, 00:28

Made a new build for you, just to be sure the other recent fixes are included: https://www.dropbox.com/s/vnv9m99a5kzt7 ... d.zip?dl=0

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#33 Post by RonnyF » 26 Oct 2020, 07:57

Thank you for the explanation, it totally makes sense that the MP3-commands only give a valid answer after at least one task was created for them.
After adding the Switch plugin, the commands return valid answers, but the Servos still don't want to turn.. I also played around with assigning to an output, changing the output levels to high etc:

Image

Is there something else which needs to be activated? Sorry for causing so much work, I hope that there is not much missing now..

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

Re: servo rules

#34 Post by TD-er » 26 Oct 2020, 09:13

What is the exact command you give for the servo?
And is the servo working with the (latest) "normal" build?

The last nightly build, on which I also based your test build, is using the rather big pull request related to moving the GPIO commands to be internal commands.
Since that affects the switch plugin (which is also taking care of the servo), it might be there is a new bug introduced?

If it is introduced by that PR, then the build of 20201016 should not show this behavior. (see: https://github.com/letscontrolit/ESPEasy/releases )

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#35 Post by RonnyF » 26 Oct 2020, 09:59

I tried the following things now:

Command(s):
For example Servo,1,4,180
Releases:
20201022_normal_ESP8266_4M1M - works when adding and enabling the Switch-Event without further configuration
20201026_custom_ESP8266_4M1M - command is accepted, no action happens (Switch-Event used as mentioned above)
20200929_normal_ESP8266_4M1M - works without Switch-Event added

It really seems like something changed the behaviour within the last regular normal and the custom build..

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

Re: servo rules

#36 Post by TD-er » 26 Oct 2020, 10:04

Thanks for testing, will have a look at it

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: servo rules

#37 Post by leel1967l » 26 Oct 2020, 10:09

Hi @RonnyF,
I will look into it.

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

Re: servo rules

#38 Post by TD-er » 26 Oct 2020, 11:05

After a second look and a fresh cup of coffee, I noticed the USE_SERVO may not have been defined.

Can you check this test build: https://www.dropbox.com/s/9f9jsu6crry5t ... d.zip?dl=0

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

Re: servo rules

#39 Post by TD-er » 26 Oct 2020, 11:13

I just created a PR to prevent confusions like these in the future...
https://github.com/letscontrolit/ESPEasy/pull/3342

RonnyF
New user
Posts: 9
Joined: 24 Oct 2020, 12:05

Re: servo rules

#40 Post by RonnyF » 26 Oct 2020, 11:38

THANK YOU SO MUCH!!

It is working now, I can control both the Servos and the MP3-Board. Thank you for the brilliant and fast help, you really developed an awesome and user friendly tool and saved my project I am currently working on with help of ESPEasy.

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

Re: servo rules

#41 Post by TD-er » 26 Oct 2020, 11:45

Glad I could be of help.
And thank you for testing as questions like these also help in improving the software as it will soon include a proper error log when the servo command is used but the code not included in the build.

Multimull
New user
Posts: 5
Joined: 24 Oct 2020, 13:46

Re: servo rules

#42 Post by Multimull » 15 Nov 2020, 23:39

hi Guys,

I am tinkering to get a servo up&running, but Ive read that in the latest custom build no Switch plugin is compiled; all the Dropbox links to compiled versions WITH the switch/servo plugin are gone...

I juist upgraded to: ESP_Easy_mega_20201102_custom_ESP32_4M316k

But in the log I get message:
539677: ACT : Servo,1,4,0
539680: USE_SERVO not included in build
How can I fix this? I'am just starting with ESPeasy and not familiar with the compiling process yet...
thx!

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

Re: servo rules

#43 Post by TD-er » 16 Nov 2020, 08:44

I looked into the code and the USE_SERVO is undefined (and thus not included) in builds with:
- minimal OTA
- "Test" ESP32
- When "LIMIT_BUILD_SIZE" applies. (Testing and Dev builds)

So in a "Normal" 8266 build it should be included.
I noticed there doesn't appear to be a "normal" ESP32 build right now though.

Multimull
New user
Posts: 5
Joined: 24 Oct 2020, 13:46

Re: servo rules

#44 Post by Multimull » 16 Nov 2020, 20:30

Hi Tder
Right....Ive spend quite some time downloading and searching for an up to date NORMAL build...so now I know why...,;-)

Any idea where & when there will be a normal version available?

Ive been diving into ESPeasy for a few weeks now since you helped me to get the flashing right, and now Iam hooked...!
What a wonderfull platform! I came from Mysensors running 15 nodes in my campervan/RV. Investigating if I could migrate fully to ESPeasy, so far so good. The simplicity to use rules instead of coding in Arduino is so much easier for a low-level coder like myself, I cam focus on the architecture/concept much more now.
Have some ESPeasy nodes interfaced over MQTT to Openhab now and is working great! Documentation is a bit lacking but with some hours reading this forum and other blogs/vlogs you can get up to speed quickly!
Will report in more detail soon! Have some pretty cool applications in mind for the servo plugin: automatic roof hatch opening/closing based on Buienradar (rain predection), servo controlled lift for coffee machine, pressing mechanical lever of heating furnace, unlocking door latch, opening sewage tank disposal lever, just to name a few... ;-)

So looking forward to get started with the switch/servo plugin...

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

Re: servo rules

#45 Post by TD-er » 16 Nov 2020, 21:21

Just added a normal definition for ESP32, but I run into build issues for ESP32 for the servo.
So for sure it has never been tested by anyone on ESP32 as far as I know.

I will try to make a build and you may the first to test it :)

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

Re: servo rules

#46 Post by TD-er » 16 Nov 2020, 21:40

Zip file including the "factory" and the regular image for normal ESP32: https://www.dropbox.com/s/0l8et43scgo7x ... y.zip?dl=0

Multimull
New user
Posts: 5
Joined: 24 Oct 2020, 13:46

Re: servo rules

#47 Post by Multimull » 17 Nov 2020, 16:29

First simple test looks good! Rule below is functioning OK.
Will test in more extend next few days and will report back! Thx TDer for the quick response and providing the .bin files on short notice!

Code: Select all

On Switch#State Do
 if [Switch#State]=1
  Servo,1,4,30  
 else
  Servo,1,4,60  
 endif
EndOn

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 73 guests