Wire up the cheap broadlink devices to aws-iot
- A1
- RM2 (only IR)
To start either:
npm install
export AWS_ACCESS_KEY_ID=xxx
export AWS_REGION=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_IOT_ENDPOINT_HOST=xxx
npm start
Or to use Docker:
docker run \
--rm \
--net host \
-e AWS_ACCESS_KEY_ID=xxx \
-e AWS_REGION=xxx \
-e AWS_SECRET_ACCESS_KEY=xxx \
-e AWS_IOT_ENDPOINT_HOST=xxx \
chrisns/iot-broadlink
Or to use Docker stack:
export AWS_ACCESS_KEY_ID=xxx
export AWS_REGION=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_IOT_ENDPOINT_HOST=xxx
docker deploy --compose-file docker-compose.yml ble
Publish:
{
"state": {
"desired": {
"enterLearning":true
}
}
}
Push the button on the original remote; then publish:
{
"state": {
"desired": {
"checkData":true
}
}
}
You'll then find:
{
"reported": {
"lastreceived": "&\u0000SOMETHING LIKE THIS\u0000"
}
}
You can then send that code back to test you can now control that device:
{
"state": {
"desired": {
"sendData": "&\u0000SOMETHING LIKE THIS\u0000"
}
}
}
And now rejoice for you have iot-ified an IR device.