Commit Graph

60 Commits

Author SHA1 Message Date
penfold42
a960894d14 Another option for Ws2812 - direct spi from the pi with 1 wire (#631)
* Removed -HUP so the default -TERM signal is sent instead.
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process

* reversing errant change to hyperion.systemd.sh

* This add a new device type - ws2812spi.

I've (ab)used the SPI interface to send the correct timing pulses to keep the ws2812 happy.
THE RATE IS IMPORTANT!
A FIXED CORE_CLK IS IMPORTANT!

Attach the SPI MOSI pin on the Pi to the DIN pin on your ws2812

        "device" :
        {
                "name"       : "MyPi",
                "type"       : "ws2812spi",
                "colorOrder" : "grb",
                "output"     : "/dev/spidev0.0",
                "rate"       : 3800000
        },

* updated hyperiond.test-binary

* Updated default SPI speed to the "correct" value.
My Pi was undervolted so was dropping the core clock confusing everything

* Code cleanups
explicitly set the final 3 bytes to 0

* Removed latchtime option - not applicable

* updated test binary


Former-commit-id: d3c19c8374999f7a554bb25ca181a8a483f86289
2016-05-15 18:39:17 +02:00
penfold42
c17e4894d9 Apa102 fix if the led strip has more physical LEDs than you want to configure with hyperion (#626)
* Removed -HUP so the default -TERM signal is sent instead.
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process

* reversing errant change to hyperion.systemd.sh

* started bug fixes for APA strips with more physical leds than configured

* 1st cut of changes to APA102.

now looks at config for "leds" which is the # of hardware leds in the strip.
This enables us to write the correct trailer length in the packet.

Also fixed a bug where switchoff was writing the wrong # of leds

* removed commented out old code

removed debug printf

* included prebuild test binary for Pi2

* Second attempt at the fix.
BEFORE:
If you have more physcial LEDs than defined in the "leds" "index" section of the config there is random junk added to the end of the strip.

WITH THIS FIX:
In the "device" section specify the number of physical leds with:
 "leds" : 212,
If this is greater than the number of led indexes, additional LEDs are set to black
If this is smaller than the number of led indexes, it is ignored

* included test binary

* Clean exit if the device config is missing or a non-supported device type is specified

Former-commit-id: 8ae96188fa74d91b13a921e7d5faf6d6ac1c42ee
2016-05-10 12:16:19 +02:00
penfold42
deed8066b0 Piblaster fix (#614)
* Removed -HUP so the default -TERM signal is sent instead.
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process

* reversing errant change to hyperion.systemd.sh

* Experimental changes to piblaster code to work how i think it should

It is now assumed that the PWM pins in groups of 3 correspond to RGB channels of the led.
                "assignment"       : "rgbrgbrgb",
Would result in:
//Channel number    GPIO number   Led channel
//      0               4             0 red
//      1              17             0 green
//      2              18             0 blue
//      4              27             1 red
//      5              21             1 green
//      6              22             1 blue
//      7              23             2 red
//      8              24             2 green
//      9              25             2 blue

* Ammend pwm channel mapping comments to match the code

* 1st cut of the new more flexible piblaster pin mapping support

it works but is still rough

* removed old "assignment" handling
- prints an error messaage if found and terminates

fixed the switchoff method

* removing iPins hard coded list of valid GPIO pins

* removed iPins array for switchOff function

* code cleanups

input validation

* Handle catching (and ignoring) SIGPIPE.
You can now kill and restart pi-blaster daemon and hyperiond will gracefully recover

* added a binary for testing

* Added sample config and my modified pi-blaster version to support more GPIOs

* moved hyperiond

* removed testing binaries

move sample configuration to the configs directory

* re enabled device config display

* removed sample configuration


Former-commit-id: 95e4d4ea2fb7cb5439e8cd597883a638da61a574
2016-04-29 16:00:33 +02:00
Rick164
02fef83bb8 AtmoOrb smoothing additions
* Updated smoothing options for AtmoOrb, can now choose between Orb external or Hyperion's internal smoothing.
With skipSmoothingDif you can set the maximum allowed color difference before overriding / clearing Orb smoothing during faster color change like for instance color <-> black.

* Updated inline documentation.

* Fixed command type typo in AtmoOrb device.

* Corrected variable spelling in AtmoOrb device.

* Make smoothing also match equal values for AtmoOrb smoothing differential


Former-commit-id: 3eede43c2f76fa324f0144aeac0526b8125ad149
2016-04-02 00:07:28 +02:00
brindosch
f332473b77 Merge remote-tracking branch 'refs/remotes/origin/Beta'
Former-commit-id: 5bdbda1406bb0ddb99440502584604b85b0f3063
2016-03-23 17:53:32 +01:00
brindosch
fa66c3b2b5 Rework log messages
Former-commit-id: eac93c0fd78fdf353e940d08df3cabf0b962a3e2
2016-03-23 17:40:45 +01:00
penfold42
a3204ae6be LedDeviceFile now defaults to /dev/null if the output is omitted.
Former-commit-id: eff12ec16d08ffa00287ed68238ab6b397f1c53d
2016-03-23 21:28:31 +11:00
penfold42
7dce3ab798 renamed the "Test" device to be "File"
No functional changes, but
- files have been renamed
- the device name is now "file" not "test"


Former-commit-id: 3fbc03c3fe1d764654c1d28ebb80562ce6276ab1
2016-03-23 21:12:34 +11:00
penfold42
6143075365 1. changed default number of pwm LEDs to 256
2. Adds support for level shifters that invert the data
Config option - "invert" (integer)
if omitted, do not invert
if == 0, do not invert
if !=0, invert


Former-commit-id: fd5b2863a85b11ac3a8444d1e02822f852feb556
2016-03-22 23:50:14 +11:00
brindosch
fb7445b545 Update
Former-commit-id: 3c6ac5d2f618cd7499c16bca950ff3d41f855318
2016-03-22 01:01:54 +01:00
Mark Walker
d2973ff20b Add ws281x driver parameter for PWM channel
The RPi 2 and 3 have two PWM channels and 3 PWM pins available to the
gpio header.  BCM18 and BCM12 run on PWM channel 0.  BCM13 runs on PWM
channel 1.  This change allows BCM13 to be used by allowing the PWM
channel to be specified.


Former-commit-id: 3693ab438c2b369e6307c262d32bba509409e5b9
2016-03-20 22:05:24 -07:00
RickDB
7adb339dea Updated orbIds config setting and sample config.
Former-commit-id: 350db40b53d04efbb43dc8c87c88bf2eb378fa6b
2016-03-15 18:37:55 +01:00
RickDB
f783c59185 Corrected indenting in LedDeviceFactory.cpp.
Former-commit-id: 31713a4a0ce9bd25fd1e39969bbb481363a80167
2016-03-15 12:06:24 +01:00
RickDB
bd1a45216a Initial AtmoOrb support including sample json config.
Former-commit-id: 51ad57afd39695095b5886966e8c71c4e47f269e
2016-03-14 20:19:19 +01:00
brindosch
e82643ff50 Merge pull request #533 from markwal/rpi_ws281x
Add new WS281x driver

Former-commit-id: 1264edf7f5e0bc29f091e72989ab7116b78056bf
2016-03-11 19:10:13 +01:00
brindosch
385d5a896d Cleanup and bugfixes
Former-commit-id: 8622ff7fb963eb7c52e816f1c779e9e9869ece53
2016-03-11 19:06:36 +01:00
Mark Walker
78e606a1c4 Add new WS281x driver
Add a new WS281x driver which is a wrapper around jgarff's ws281x library which
works on Pi B+, Pi 2, Pi Zero and probably Pi 3 as well.

jgarff's ws281x library is included as a submodule


Former-commit-id: e473dfd36d31b14598da5e56e4b8bf9f2aa7bb24
2016-03-08 20:41:13 -08:00
penfold42
3bd03e73ff Merge branch 'master' of https://github.com/penfold42/hyperion
merge to local


Former-commit-id: ebba9a31b2139201b75dc098eba8c8ee9d630ebf
2016-02-13 23:01:04 +11:00
penfold42
ca24450618 added configurable latchtime for 2801 SPI driver
Former-commit-id: a10b0bd24a85580b021c735b30ebd2635180a514
2016-02-13 23:00:31 +11:00
wisc
773222192d fixed upd merge conflicts and fadecandy compiler warning
Former-commit-id: cb9506a68deff80a331f6455c3cb8fa783a2140e
2016-02-10 00:57:21 +01:00
redpanther
b6060d392e make opc channel available in via config.
Former-commit-id: 6a065cd049e29d7184a3aa1454de0fe1855e9941
2016-01-27 10:44:51 +01:00
penfold42
382f22f23c add udp protocol support
Former-commit-id: a92810f14cf2af15710a38246a742ca2b94fd3bd
2016-01-06 20:40:48 +11:00
redpanther
7f5a664864 set fadecandy default port to original fcserver port number
tune debug output of fadecandy device


Former-commit-id: 651459e5294ce5721ebe3bb2a6acdc1d096d9cfb
2016-01-04 12:26:06 +01:00
redpanther
13715202d8 add fadecandy led device
Former-commit-id: 490fd3ee66041b35b95d2c7ec110cc70e4c01d8d
2016-01-04 12:16:44 +01:00
NicoHood
3595709099 Adapted Paintpack to HIDDevice API
Former-commit-id: 06101f0e99fbe99f8994193cea337b400acbafe3
2015-11-08 17:30:12 +01:00
NicoHood
29d3209d7d Added Raw HID device
Former-commit-id: bd36530b6b63959ee4d83693e396cbb0af70ddb3
2015-11-08 17:29:53 +01:00
tociek
33edcddb1b APA102 device for use with Adalight (nominaly for ws2801)
Former-commit-id: 7fb9e8e84518be9387ea9feca11e93a8a5389e4f
2015-10-13 19:11:01 +02:00
ntim
f83802f2b1 Corrected type of json array value index
Former-commit-id: f766365fc3be4d1b62c36ce05e8a6d818f73dede
2015-03-07 09:58:48 +01:00
Tim Niggemann
ecea6e55ea Added light ids to device config.
Former-commit-id: 601616b0d7509b0e8ebb5226f00af5028fa905b5
2015-03-03 15:45:09 +01:00
tvdzwan
b1f62cca40 Merge pull request #253 from aufano/master
Carsten Atmolight support

Former-commit-id: a1a3c245a037e3d9604cff6c5a228e9f2842a7fb
2015-02-23 15:38:02 +01:00
aufano
be3f3a968c Carsten Atmolight support
http://ca.rstenpresser.de/index.php/atmo-main.html

Former-commit-id: cd543a063af50455e3e92fc9e89c2503bef95188
2015-02-04 21:49:33 +01:00
Tim Niggemann
dfc2e6bfb5 Default setting of transition time to 100 ms.
Former-commit-id: c0981e09494c59456f45325cdcacf9bfa6e26c99
2015-02-01 15:56:51 +01:00
Tim Niggemann
9d506b888d Added config options for username and transitiontime
Former-commit-id: 2ae179c670fda838115d985f40d970e10ef002ef
2015-02-01 15:29:40 +01:00
T. van der Zwan
1bb93da59b Added support for AmbiLED-HD device (http://www.ambiledhd.com)
Former-commit-id: 60ec75898a04b5ca993242d0aef6edc01997fe82
2015-01-05 14:28:21 +01:00
wayland
a4bcdcc10a Added APA102 device to factory
Former-commit-id: 4d7c8889aee2ca7b75c0e0ec90e9b5833257324d
2014-12-03 18:41:44 +01:00
wayland
205fe8ab66 Added APA102 device to factory
Former-commit-id: ecea592ddf97bdcc2c54d12af194c15d6c09966a
2014-12-03 09:34:48 +01:00
T. van der Zwan
8ad0e88e2f Minor reformat of code to match hyperion-style. Added ws2812b as option to disable for devices without dma-pwm
Former-commit-id: 579f4426285fb537706a22af446f5280748f2ab7
2014-09-19 16:37:58 +02:00
David Brodski
39ddfca5c0 Rename WS2812s to WS2812b (spelling error)
Former-commit-id: 83c92c9ef99d45b8683860f199a14952c05d0f5d
2014-09-17 21:20:36 +02:00
David Brodski
042d4b6e91 Added LedDevice for "ws2812s" leds
To activate: use led device "ws2812s" in the hyperion configuration


Former-commit-id: 0b5ee38679fe353f43bb4a347882d056ca237128
2014-09-16 00:17:23 +02:00
ntim
507a237f47 Merge branch 'master' into support_for_philips_hue
Conflicts:
	libsrc/leddevice/LedDevicePhilipsHue.cpp
	libsrc/leddevice/LedDevicePhilipsHue.h

Former-commit-id: 5f0b05cce12ca5c42ac2cdd94b9418d6eaef0f57
2014-08-18 17:08:21 +02:00
Tim Niggemann
dbd7a86665 Moved color logic to lamp class.
Former-commit-id: f450eebc8c9d0f29dc053f2115dac6576a5fa591
2014-07-16 20:22:37 +02:00
Tim Niggemann
b055578759 Added config switch for turing off the lamps if the color black is written.
Former-commit-id: bb4f4bc74c035c10a8dc678a11052ea276ea0149
2014-07-16 11:49:34 +02:00
Gamadril
1d046ab35a Added support for tpm2 protocol. One frame used for all LEDs
Former-commit-id: 5b2ed33a50d90999c6f9508ba3782ad73838fb56
2014-06-15 02:19:09 +02:00
johan
3eb29146dd Added a possible delay after connecting an Adalight device
Former-commit-id: 756fae2ebc57455bf6360dc96bf2ae5469460172
2014-05-04 11:31:13 +02:00
ntim
88c523518a Initial commit of support for the Philips Hue system.
Former-commit-id: 5b7d802c326151ee96a5b950badb01e94adfe7f3
2014-04-27 12:59:44 +02:00
johan
62291adb52 Merge branch 'master' of https://github.com/tvdzwan/hyperion
Former-commit-id: 4763dcd03897ee85df068d9f7dc4a5954cbb1a4f
2014-03-09 11:42:20 +01:00
johan
e22c720e68 Add hyperion-usbasp led devices
Remove all WS281x direct UART code (does not work reliable)


Former-commit-id: cd8103058d4ce0cd3280c7a2c5370397a14acf5c
2014-03-09 11:36:46 +01:00
Bjoern Bilger
2b683fdfaa add support for tinkerforge
Former-commit-id: 8dbd3d915f70ace8d1b27602f0d76a2a546ac043
2014-03-04 20:38:54 +01:00
Johan
99b3719cee STL include added
Former-commit-id: b99ccce4ac849914e0528ddf6255d52ba47b09c7
2014-02-07 14:55:54 +01:00
T. van der Zwan
af08b9b5d0 Fixed bug in x86 compile
Former-commit-id: 022ed458e14a9692387ce382dbafb4cec4002c8e
2014-01-18 22:57:47 +00:00