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.
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.
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
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
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 (?)
@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
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')
[ . . . ]