-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommands.txt
55 lines (45 loc) · 7.84 KB
/
commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{"cmd":"ping"}
{"cmd":"get_config","value":true,"user":"admin","pass":"admin"}
{"cmd":"set_pwm_channel","id":0,"state":true,"user":"admin","pass":"admin"}
{"cmd":"login","user":"admin","pass":"admin"}
{"cmd":"set_pwm_channel","id":0,"state":true}
{"cmd":"set_pwm_channel","id":0,"duty":0.99}
{"cmd":"set_pwm_channel","id":0,"duty":0.5}
{"cmd":"set_pwm_channel","id":0,"duty":0.1}
{"cmd":"set_pwm_channel","id":0,"state":false}
curl -i -d '{"cmd":"ping"}' -H "Content-Type: application/json" -X POST http://firstreef.local/api/endpoint
curl -i -d '{"cmd":"set_pwm_channel","user":"admin","pass":"admin","id":0,"state":true}' -H "Content-Type: application/json" -X POST http://firstreef.local/api/endpoint
curl -i -d '{"cmd":"set_pwm_channel","user":"admin","pass":"admin","id":0,"state":true}' -H "Content-Type: application/json" -X POST http://firstreef.local/api/endpoint
curl -i -d '{"cmd": "set_pwm_channel","user":"admin","pass":"admin","id":7, "state": true}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -d '{"cmd": "set_pwm_channel","user":"admin","pass":"admin","id":7, "state": false}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -d '{"cmd": "set_pwm_channel","user":"admin","pass":"admin","id":7,"duty":1}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -d '{"cmd": "set_pwm_channel","user":"admin","pass":"admin","id":7,"duty":0.5}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -d '{"cmd": "set_pwm_channel","user":"admin","pass":"admin","id":7,"duty":0}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -d '{"cmd": "fade_pwm_channel","user":"admin","pass":"admin","id":7,"duty":1, "millis": 3000}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -d '{"cmd": "fade_pwm_channel","user":"admin","pass":"admin","id":7,"duty":0.5, "millis": 3000}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -d '{"cmd": "fade_pwm_channel","user":"admin","pass":"admin","id":7,"duty":0, "millis": 3000}' -H "Content-Type: application/json" -X POST http://8chrb.local/api/endpoint
curl -i -X GET http://firstreef.local/api/config
curl -i -X GET http://firstreef.local/api/config?user=admin&pass=admin
curl -i -X GET http://firstreef.local/api/stats?user=admin&pass=admin
curl -i -X GET http://firstreef.local/api/update?user=admin&pass=admin
git grep -lz YB_HAS_OUTPUT_CHANNELS | xargs -0 sed -i '' -e 's/YB_HAS_OUTPUT_CHANNELS/YB_HAS_PWM_CHANNELS/g'
git grep -lz YB_OUTPUT_CHANNEL_COUNT | xargs -0 sed -i '' -e 's/YB_OUTPUT_CHANNEL_COUNT/YB_PWM_CHANNEL_COUNT/g'
git grep -lz YB_OUTPUT_CHANNEL_PINS | xargs -0 sed -i '' -e 's/YB_OUTPUT_CHANNEL_PINS/YB_PWM_CHANNEL_PINS/g'
git grep -lz YB_OUTPUT_CHANNEL_PWM_FREQUENCY | xargs -0 sed -i '' -e 's/YB_OUTPUT_CHANNEL_PWM_FREQUENCY/YB_PWM_CHANNEL_FREQUENCY/g'
git grep -lz YB_OUTPUT_CHANNEL_PWM_RESOLUTION | xargs -0 sed -i '' -e 's/YB_OUTPUT_CHANNEL_PWM_RESOLUTION/YB_PWM_CHANNEL_RESOLUTION/g'
git grep -lz YB_OUTPUT_CHANNEL_ADC_DRIVER_MCP3208 | xargs -0 sed -i '' -e 's/YB_OUTPUT_CHANNEL_ADC_DRIVER_MCP3208/YB_PWM_CHANNEL_ADC_DRIVER_MCP3208/g'
git grep -lz YB_OUTPUT_CHANNEL_ADC_CS | xargs -0 sed -i '' -e 's/YB_OUTPUT_CHANNEL_ADC_CS/YB_PWM_CHANNEL_ADC_CS/g'
git grep -lz OutputChannel | xargs -0 sed -i '' -e 's/OutputChannel/PWMChannel/g'
git grep -lz output_channels | xargs -0 sed -i '' -e 's/output_channels/pwm_channels/g'
git grep -lz YB_HAS_DIGITAL_INPUT_CHANNELS | xargs -0 sed -i '' -e 's/YB_HAS_DIGITAL_INPUT_CHANNELS/YB_HAS_INPUT_CHANNELS/g'
git grep -lz YB_DEBOUNCE_RATE_MS | xargs -0 sed -i '' -e 's/YB_DEBOUNCE_RATE_MS/YB_INPUT_DEBOUNCE_RATE_MS/g'
git grep -lz YB_HAS_ADC | xargs -0 sed -i '' -e 's/YB_HAS_ADC/YB_HAS_ADC_CHANNELS/g'
git grep -lz YB_HAS_RGB_OUTPUT | xargs -0 sed -i '' -e 's/YB_HAS_RGB_OUTPUT/YB_HAS_RGB_CHANNELS/g'
curl -i -d '{"cmd":"ping"}' -H "Content-Type: application/json" -X POST https://rgbinput.local/api/endpoint
#from: https://mongoose.ws/documentation/tutorials/tls/#self-signed-certificates
#generate self signed key:
openssl req -nodes -new -x509 -keyout key.pem -out cert.pem
#commands to get, enable, and disable ssl:
curl -i -k -d '{"cmd": "get_app_config","user":"admin","pass":"admin"}' -H "Content-Type: application/json" -X POST https://yarrboard.local/api/endpoint
curl -i -k -d '{"cmd":"set_app_config","user":"admin","pass":"admin","require_login":true,"app_user":"admin","app_pass":"admin","app_enable_api":true,"app_enable_serial":false,"app_enable_ssl":true,"server_cert":"-----BEGIN CERTIFICATE-----\nMIIDPjCCAiYCCQCKEulPvfjSszANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCc2QxCzAJBgNVBAcMAmRzMQswCQYDVQQKDAJkczELMAkGA1UE\nCwwCZHMxCzAJBgNVBAMMAmRzMREwDwYJKoZIhvcNAQkBFgJkczAeFw0yMzExMTcx\nNzM1MjNaFw0yMzEyMTcxNz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9Swuxyg9MmEyX\nK1eaw0gx1asZMgAdlX/uPsc6glCcU+fMR8b9xteVbhZNechyKERqRt+OcJMHHDaH\nfPLFMJxuaVAwR2T0YUlDpvJg7XVdof8V7t7drQ5oU5W7qLYMk6UFOH/LAoGBAIAx\nc1YJU8LRyoJ35ACe8MRTHjJhrufXwAZJsaIIwcTSLPOqWOnWs7WRwItpcGCMoxIA\nM3miy8kwxDIbbk/dRc/VdAyjNYGrdOMgLihXtQNNQhvQDn+fF8gCKt7tTdf+dblA\n5XnCExg3/96k+eNNdQi2YDILwKdD0esrSL/6tVBRAoGAf3NxvUVfreEJTounLWCR\n1jiSP3pP506CLN9+q3ngYse99tzcU4nEGigLxPvNuGfO7ItLnWa2RoiBKKlvRoyx\nNwLWnXBZvkJ2JQn5ve5LDY+9BI4Z+6XGrJQx+us/aSkyaVvUx2wpW2z9RJgfLrd9\nJk4UwHHrSXJN0k6h4Q4Pecs=\n-----END PRIVATE KEY-----\n"}' -H "Content-Type: application/json" -X POST https://yarrboard.local/api/endpoint
curl -i -k -d '{"cmd":"set_app_config","user":"admin","pass":"admin","require_login":true,"app_user":"admin","app_pass":"admin","app_enable_api":true,"app_enable_serial":false,"app_enable_ssl":false,"server_cert":"","server_key":""}' -H "Content-Type: application/json" -X POST https://yarrboard.local/api/endpoint