Giter Club home page Giter Club logo

sp108e-ha's Introduction

sp108e-ha

This project is here because I didn't find anywhere on Internet the solution for controlling a SP108e led controller threw Home Assistant. There is a forum where we discuss this subject : https://community.home-assistant.io/t/sp108e-digital-wifi-light-strip-controller

For the moment, the python script and associated flow only controls ON/OFF state of the SP108e. You have then to define the color and brightness of the SP108e once with the official app and then use my script.

Setup

  • One RPi that runs NodeRed (RPi1) with fixed ip address
  • One RPi that runs HA (RPi2)

Installation

On RPi1:

  • Put the python script (included here) in a "/home/pi/scripts/" folder.
  • Edit the python file and change the CONTROLLER_IP value to have your SP108e ip address.
  • In NodeRed, import the flow (included here).

On RPi2:

  • Add these lines to configuration.yaml (changing the line 'resource' with the IP address of the RPi1) :
switch:
 - platform: rest
   name: LedsTV
   resource: http://ip_address_Rpi1:1880/ledstv
   body_on: '{"active": "true"}'
   body_off: '{"active": "false"}'
   is_on_template: '{{ value_json.is_active }}'
   headers:
     Content-Type: application/json
   verify_ssl: false
  • Add a button with this model :
entity: switch.ledstv
hold_action:
  action: more-info
icon_height: 40px
show_icon: true
show_name: true
tap_action:
  action: toggle
type: button

Should work and tell you the state of the SP108E (on/off)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.