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

Mhink this is my branch not yours #134

Merged
merged 3 commits into from
Apr 12, 2018

Conversation

MatthewHink
Copy link
Contributor

This commit keeps fan control working and is a replacement for this: 76600c2

I will crush /squash this down.

vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ kubectl get pods -o wide
NAME                            READY     STATUS    RESTARTS   AGE       IP             NODE
auto-fan-7bd6975f9-fb6s9        1/1       Running   0          16m       10.193.2.2     vec2-c1-wrigley
i2c-plugin-0                    1/1       Running   0          16m       10.244.5.228   vec6-c1-wrigley
i2c-plugin-1                    1/1       Running   0          16m       10.244.4.221   vec4-c1-wrigley
i2c-plugin-2                    1/1       Running   0          16m       10.244.2.221   vec5-c1-wrigley
i2c-plugin-3                    1/1       Running   0          16m       10.244.1.208   vec2-c1-wrigley
i2c-plugin-4                    1/1       Running   0          16m       10.244.3.230   vec3-c1-wrigley
i2c-plugin-5                    1/1       Running   0          16m       10.244.0.181   vec1-c1-wrigley
rs485-plugin-5bc59f5b6d-8fbj2   1/1       Running   0          16m       10.244.2.220   vec5-c1-wrigley
synse-7bbbc65598-8tnm4          1/1       Running   0          16m       10.193.2.4     vec4-c1-wrigley
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ export FAN_IP=10.193.2.2
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ export SYNSE_IP=10.193.2.4
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${FAN_IP}:4997/vaporcore/1.0/fan
{
  "direction": "forward",
  "fan_mode": "auto",
  "fan_speed_setting": 0,
  "speed_rpm": 0.0
}vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${FAN_IP}:4997/vaporcore/1.0/fan/manual/0
{
  "fan_mode": "manual",
  "fan_speed_setting": 0,
  "speed_rpm": 0
}vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${FAN_IP}:4997/vaporcore/1.0/fan
{
  "direction": "forward",
  "fan_mode": "manual",
  "fan_speed_setting": 0,
  "speed_rpm": 0.0
}vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${SYNSE_IP}:5000/synse/2.0/read/chamber/vec/961e1b0ae21c404a0a6a7e47224570ec
{
  "type":"fan",
  "data":{
    "fan_speed":{
      "value":0.0,
      "timestamp":"2018-04-12T18:05:08.329829102Z",
      "unit":{
        "symbol":"RPM",
        "name":"revolutions per minute"
      }
    },
    "direction":{
      "value":"forward",
      "timestamp":"2018-04-12T18:05:08.329832723Z",
      "unit":null
    },
    "max_rpm":{
      "value":"1755",
      "timestamp":"2018-04-12T18:05:08.329834845Z",
      "unit":null
    },
    "min_rpm":{
      "value":"175",
      "timestamp":"2018-04-12T18:05:08.329836779Z",
      "unit":null
    }
  }
}
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${SYNSE_IP}:5000/synse/2.0/fan/chamber/vec/961e1b0ae21c404a0a6a7e47224570ec?speed=200
[
  {
    "context":{
      "action":"speed",
      "raw":[
        "200"
      ]
    },
    "transaction":"bb7pvpppr5tg00fh8m70"
  }
]
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${SYNSE_IP}:5000/synse/2.0/read/chamber/vec/961e1b0ae21c404a0a6a7e47224570ec
{
  "type":"fan",
  "data":{
    "fan_speed":{
      "value":198.0,
      "timestamp":"2018-04-12T18:05:31.907969899Z",
      "unit":{
        "symbol":"RPM",
        "name":"revolutions per minute"
      }
    },
    "direction":{
      "value":"forward",
      "timestamp":"2018-04-12T18:05:31.907973375Z",
      "unit":null
    },
    "max_rpm":{
      "value":"1755",
      "timestamp":"2018-04-12T18:05:31.907975588Z",
      "unit":null
    },
    "min_rpm":{
      "value":"175",
      "timestamp":"2018-04-12T18:05:31.90797743Z",
      "unit":null
    }
  }
}
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${SYNSE_IP}:5000/synse/2.0/fan/chamber/vec/961e1b0ae21c404a0a6a7e47224570ec?speed_percent=25
[
  {
    "context":{
      "action":"speed_percent",
      "raw":[
        "25"
      ]
    },
    "transaction":"bb7pvuhpr5tg00fh8m7g"
  }
]
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${SYNSE_IP}:5000/synse/2.0/read/chamber/vec/961e1b0ae21c404a0a6a7e47224570ec
{
  "type":"fan",
  "data":{
    "fan_speed":{
      "value":438.0,
      "timestamp":"2018-04-12T18:05:48.935732985Z",
      "unit":{
        "symbol":"RPM",
        "name":"revolutions per minute"
      }
    },
    "direction":{
      "value":"forward",
      "timestamp":"2018-04-12T18:05:48.935736417Z",
      "unit":null
    },
    "max_rpm":{
      "value":"1755",
      "timestamp":"2018-04-12T18:05:48.935738653Z",
      "unit":null
    },
    "min_rpm":{
      "value":"175",
      "timestamp":"2018-04-12T18:05:48.935740327Z",
      "unit":null
    }
  }
}
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$ curl http://${SYNSE_IP}:5000/synse/2.0/read/chamber/vec/961e1b0ae21c404a0a6a7e47224570ec
{
  "type":"fan",
  "data":{
    "fan_speed":{
      "value":438.0,
      "timestamp":"2018-04-12T18:07:49.445695255Z",
      "unit":{
        "symbol":"RPM",
        "name":"revolutions per minute"
      }
    },
    "direction":{
      "value":"forward",
      "timestamp":"2018-04-12T18:07:49.445700076Z",
      "unit":null
    },
    "max_rpm":{
      "value":"1755",
      "timestamp":"2018-04-12T18:07:49.445703188Z",
      "unit":null
    },
    "min_rpm":{
      "value":"175",
      "timestamp":"2018-04-12T18:07:49.445706377Z",
      "unit":null
    }
  }
}
vapor@vec1-c1-wrigley:~/src/vec-testbed/poc$

@codecov-io
Copy link

codecov-io commented Apr 12, 2018

Codecov Report

Merging #134 into master will decrease coverage by 0.55%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
- Coverage   88.98%   88.42%   -0.56%     
==========================================
  Files          40       40              
  Lines        1080     1097      +17     
==========================================
+ Hits          961      970       +9     
- Misses        119      127       +8
Impacted Files Coverage Δ
synse/commands/write.py 100% <100%> (ø) ⬆️
synse/routes/aliases.py 89.02% <63.63%> (-9.49%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee6f566...f918cfd. Read the comment docs.

Copy link
Contributor

@edaniszewski edaniszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems fine if it gets things moving. It looks like in the output in the other PR, read urls were being used for writing (instead of led urls), so that may have been the cause of the failure.. the implementation between the two branches is different, but it seems like all the underlying logic is still the same so I'm confused why the other was not setting correctly.

@MatthewHink MatthewHink merged commit 6f421a3 into master Apr 12, 2018
@edaniszewski edaniszewski deleted the mhink-this-is-my-branch-not-yours branch April 24, 2018 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants