-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test workflow for the ceiling lights calibration #482
Open
aspaNeuro
wants to merge
4
commits into
social
Choose a base branch
from
480-create-simple-bonsai-workflow-for-testing-the-ceiling-lights-calibration
base: social
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f3054d9
Add a test light workflow
aspaNeuro ffaa3dd
Add a timer to trigger light commands in each 15s
aspaNeuro 3e6b67c
Create fake synchronizer to emulate the events from clock synchroniz…
aspaNeuro be9172f
Remove the value from room name property
aspaNeuro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<WorkflowBuilder Version="2.8.1" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core" | ||
xmlns:harp="clr-namespace:Bonsai.Harp;assembly=Bonsai.Harp" | ||
xmlns:aeon-env="clr-namespace:Aeon.Environment;assembly=Aeon.Environment" | ||
xmlns="https://bonsai-rx.org/2018/workflow"> | ||
<Workflow> | ||
<Nodes> | ||
<Expression xsi:type="GroupWorkflow"> | ||
<Name>FakeSynchronizer</Name> | ||
<Workflow> | ||
<Nodes> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="rx:Timer"> | ||
<rx:DueTime>PT0S</rx:DueTime> | ||
<rx:Period>PT1S</rx:Period> | ||
</Combinator> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="rx:Timestamp" /> | ||
</Expression> | ||
<Expression xsi:type="MemberSelector"> | ||
<Selector>Timestamp.UtcDateTime.TimeOfDay.TotalSeconds</Selector> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="rx:Zip" /> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="harp:CreateTimestamped" /> | ||
</Expression> | ||
<Expression xsi:type="harp:CreateMessage"> | ||
<harp:MessageType>Write</harp:MessageType> | ||
<harp:Payload xsi:type="harp:CreateTimestampedClockConfigurationPayload"> | ||
<harp:ClockConfiguration>None</harp:ClockConfiguration> | ||
</harp:Payload> | ||
</Expression> | ||
<Expression xsi:type="rx:PublishSubject"> | ||
<Name>SynchronizerEvents</Name> | ||
</Expression> | ||
<Expression xsi:type="WorkflowOutput" /> | ||
</Nodes> | ||
<Edges> | ||
<Edge From="0" To="1" Label="Source1" /> | ||
<Edge From="0" To="3" Label="Source1" /> | ||
<Edge From="1" To="2" Label="Source1" /> | ||
<Edge From="2" To="3" Label="Source2" /> | ||
<Edge From="3" To="4" Label="Source1" /> | ||
<Edge From="4" To="5" Label="Source1" /> | ||
<Edge From="5" To="6" Label="Source1" /> | ||
<Edge From="6" To="7" Label="Source1" /> | ||
</Edges> | ||
</Workflow> | ||
</Expression> | ||
<Expression xsi:type="ExternalizedMapping"> | ||
<Property Name="EventSocket" /> | ||
<Property Name="RoomName" /> | ||
<Property Name="LightEvents" /> | ||
<Property Name="LightCommands" /> | ||
<Property Name="CommandSocket" /> | ||
</Expression> | ||
<Expression xsi:type="IncludeWorkflow" Path="Aeon.Environment:LightClient.bonsai"> | ||
<EventSocket>>tcp://172.24.158.103:4303</EventSocket> | ||
<RoomName></RoomName> | ||
<LightEvents>LightEvents</LightEvents> | ||
<LightCommands>LightCommands</LightCommands> | ||
<CommandSocket>>tcp://172.24.158.103:4304</CommandSocket> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="rx:Timer"> | ||
<rx:DueTime>PT0S</rx:DueTime> | ||
<rx:Period>PT15S</rx:Period> | ||
</Combinator> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="aeon-env:CreateRoomLightPreset"> | ||
<aeon-env:ColdWhite>40</aeon-env:ColdWhite> | ||
<aeon-env:WarmWhite>0</aeon-env:WarmWhite> | ||
<aeon-env:Red>0</aeon-env:Red> | ||
</Combinator> | ||
</Expression> | ||
<Expression xsi:type="MulticastSubject"> | ||
<Name>LightCommands</Name> | ||
</Expression> | ||
</Nodes> | ||
<Edges> | ||
<Edge From="1" To="2" Label="Source1" /> | ||
<Edge From="3" To="4" Label="Source1" /> | ||
<Edge From="4" To="5" Label="Source1" /> | ||
</Edges> | ||
</Workflow> | ||
</WorkflowBuilder> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aspaNeuro Why not simply use the synchronizer on AEON3? I guess what I was thinking here is we would always calibrate all the lights in the room at the same time from AEON3 where the actual server and light controller is, so there is no need to do this remotely, but maybe I am missing something?