Skip to content
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
wants to merge 4 commits into
base: social
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions workflows/social/LightTest.bonsai
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>
Comment on lines +10 to +12
Copy link
Collaborator

@glopesdev glopesdev Jan 29, 2024

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?

<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>&gt;tcp://172.24.158.103:4303</EventSocket>
<RoomName></RoomName>
<LightEvents>LightEvents</LightEvents>
<LightCommands>LightCommands</LightCommands>
<CommandSocket>&gt;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>