Farmware MoveAbsolute and ExecuteSequence not working

I have tested my Farmware on FBOS 9.1.0 it works fine and runs a bit faster. Thank you both for helping me out!!! I am growing again :). @RickCarlino I can live with the 30sec timeout.

1 Like

Iā€™m glad that you are operational again @whitecaps.

For anyone that does have a problem with the 30 second timeout and is finding this thread via search, Iā€™ve created an example library of how to solve the problem with an off-device software package.

2 Likes

Just curious : What specific Farmware packageā€™s performance are you reporting there ?

With your "Hello Farmware Test" Farmware package ( demo as provided in this thread )
I tested execution to completion as a little under 30s. ( Roughly 500% ā€œfasterā€ )

I use a Raspberry Pi 3 Model B Plus, but doubt whether the speedup is much due to that :confused:

Hey @jsimmonds I havenā€™t tested it on my Hello Farmware test but will do when I get back home on Wednesday.

I am running it on my more complex Grid code. As I need to spin up Farmware for each grid movement it does take around 2-3 seconds to start.

I still time out on my longer movements i.e. moving the x axis past 2 meters (could speed up the steppers lol), but I can just try except pass on the error and all good!

I donā€™t get a timeout on my first few device calls so thatā€™s a big improvement.

@RickCarlino I wonder a ways down the roadmap when youā€™re through this transition period. If it is feasible to introduce a sequence shape that calls out to an embedded javascript code block or an api. That might be a good long term alternative to Farmware.

Yay, I like that too . . a microservices consumer solution :slight_smile:
I think I saw code that does this already using HTTPS POSTs.

I also noticed that. Iā€™ll see if I can discover where that time is being ā€œwastedā€. Python should be up and executing well before then (?)

1 Like

@whitecaps Thatā€™s an interesting idea and Iā€™d like to hear more about it. What would the API look like? How do you imagine it working overall? Would this be similar to the assert block, but for Javascript?

Found this import statement is the biggest contributor by far :slight_smile:

from farmware_tools import get_config_value, device

Uses elapsed 3.165 seconds ! ( on a RaspberryPi 3 Model B Plus )
@whitecaps if you have Python 3 skill, this might be one for you.

@jsimmonds I will add that to my trello backlog and Iā€™ll post anything I find. Thank you for pointing me in the right direction.

@whitecaps Happy if that helps you. All I did was a simple-minded time report around that import , e.g.

#!/usr/bin/env python

'''Hello Farmware Test

A simple Farmware example that tells FarmBot to log 5 new messages.
'''

from datetime import datetime
from sys import stderr
print('{} start'.format(datetime.now().time().isoformat('milliseconds')), file=stderr, flush=True)
from farmware_tools import get_config_value, device
print('{} starting'.format(datetime.now().time().isoformat('milliseconds')), file=stderr, flush=True)

INPUT_VALUE = get_config_value(farmware_name='Hello Farmware Test', config_name='input', value_type=str)
device.log(message='Hello Farmware! Test input was: {}'.format(INPUT_VALUE), message_type='success')
[ . . . ]
1 Like