Looking forward to deploy docker on the cloud https://github.com/ladybug-tools/honeybee-server-daylight, I’m preparing my cases and building the json recipe.
I’m not so fluent on python and have been stuck for a while on handling dictionaries. The HBObjects python component is returning a tree instead of lists of lists.
@OlivierDambron, Is there a reason that you don’t use the to_json method of daylight factor recipe? Assuming you call objects input as hb_objects and make it list access and flatten the data this code should work.
analysisRecipe.hb_objects = hb_objects
a = analysisRecipe.to_json()
Hi @OlivierDambron! I’ll post an example script taking different recipes and prepping them to be sent to a server (local or on the cloud) from a single grasshopper node. I’ll post it on this thread tomorrow.
@mostapha, which is the best place for me to dump such an example? Is it one for Hydra? Also, how do I go about adding nodes to the honeybee[+] grasshopper rep on GitHub?
I would say since it’s still under development sharing it here is the best approach for now. We want to have it on Hydra once more people can use it.
Send a PR to this repository. You can use export ladybug component to create the userobject and export the source code as far as you follow the rules. You can use any of the current components as the starting point. Here is an example:
You should import the recipe and initiate the class first. In your script you’re calling the module. A good starting point would be using the Daylight Factor recipe component.
from honeybee.radiance.recipe.daylightfactor.gridbased import GridBased
analysisRecipe = GridBased(_analysisGrids, _radiancePar_)
analysisRecipe.hb_objects = hb_objects
a = analysisRecipe.to_json()