is there a way (hardware/software-combination) that I can use to control one or more "Philips Living Colors" lamps using a PC - e.g. a USB-stick that acts as the "remote". This way i could control the lamp through software (e.g. a web-app - over iPhone / remotely) or even create what Philips builds into some of their TVs and calls "ambilight" (graphics driver detecting the main color to control the lamp).
I guess this is more like a hardware than a software question - but I couldn't find anything about this online and I'm sure not to be the first to have come up with this idea right when I unpacked my LivingColors lamp yesterday ;)
There are two version of the LivingColors lamp, the Gen1 lamp can be controlled with a small kit, as far as i know the Gen2 can not be controlled with 3rd party products.
There is an Arduino shield that can control the Gen1 lamps, the article describing this is in Dutch. In short : the shield, and by extension the lamp, can be controlled by serial-over-USB. Google translate may help :
The hardware : http://www.knutsel.org/2010/04/11/assembling-the-cc2500-arduino-shield/
The link to the software is at the end of the post. (I can only post one link.)
There is a schema and software, enough information to build your own controller for Gen1 lamps.
Some remarks:
I am the a author of these posts.
The shields are sold as a kit in the Netherlands and Belgium (hence the dutch blog post).
The Gen2 uses IEEE802.15.4 (it says so in the manual) and is said to use encrypted Zigbee. Zigbee and encrypted Zigbee use IEEE802.15.4.
I should probably make a better translation of the posts.
[ 11 April 2010 edit : made translations of the blogposts in English and changed the links here ]
LivingColors uses an implementation of 802.15.4, the ‘ZigBee’ mesh-network wireless protocol designed for consumer appliances.
The second-gen LivingColors lamps can be persuaded to talk to the Philips Hue wireless bridge and integrate with a Hue setup. Much anecdotal information about how this is done can be had here:
http://www.everyhue.com/?page_id=38#/discussion/7/hue-and-living-colors
... for your purposes, integrating with Hue is your best bet, as the bridge exposes (as of yet, unofficially) a comprehensive RESTful JSON API, which is easily scripted — one of the better resources on using this API can be found here:
http://rsmck.co.uk/hue
I personally have had a good deal of fun doing what you are trying to do, with the Hue bridge and LivingColors lamps. Good luck!
I would too be interested by controlling my Living Colors from a computer, through a 2.4Ghz USB transmitter (mainly just for fun ;)
I have two Living Colors, a "Generation 1" and a "Generation 2", and the bad news is that the remote hardware and (maybe) the protocol have been totally modified by Philips in the process (probably to add the "fading effects" of the second generation). So it's even more complicated now, such a transmitter would have to deal with the 2 protocols.
Another link about what's inside the official controller
(in addition to the Elektor article given above) :
Gen 1 : http://www.knutsel.org/2009/01/01/livingcolors-1st-generation/
Gen 2 : http://www.knutsel.org/2009/12/01/philips-redesigns-livingcolors-breaks-compatibility/
Elektor (reverse engeneering of the procotol : http://www.ideetron.nl/Livcol/UK2008110661.pdf
I checked the Philips website where you can download the user documentation. The following trouble-shooting tip provides a clue:
LivingColors doesn’t respond quickly to the remote control.
- The communication between the remote control and the
LivingColors can be affected by heavy traffic on a wireless data
network, for example a wireless router.You should move Living-
Colors away from the wireless access point and switch your
wireless router to channels 8-11 for minimum interference.
So the controller uses wireless communication. It is clearly quite a sophisticated communication link, one controller can control up to 6 lights.
Unless it is a full WiFi link getting a computer to control the light would necessitate some heavy hardware hacking. Should it be a WiFi link it would be possible to write a driver.
If anyone has one these could they do a WiFi scan to see if the light and controller show up?
Related
I am working on a non-audio app for iOS and iPadOS and macOS. This question is specifically about iPadOS for now.
I purchased a generic "USB Volume Control" knob device. I am able to plug it into my (non M1) iPad Pro 12.9 and it does indeed control system volume (rotate), as well as things like rotate through tracks in the Music app (push and rotate), mute (push), etc. I have a second such device from another manufacturer on the way to test with as well.
What I'd really like to do is use it in a non-music context. To be able to capture the raw actions and interpret them in my app's subject domain (DCC model train control).
I have been able, on iPadOS but not iOS [as it doesn't have generic USB support as I understand it] to capture the volume changes by using AVAudioSession and KVO tracking the outputVolume property. I haven't yet figured out how to get the push and push-rotate yet but assume I just need to find the analogue functions in AVAudioSession or some other Apple class.
But I would rather not dink around with the Audio/Music classes and have to "re-purpose" them into my own control needs and was wondering if anyone knew of a way to be able to find and connect to the device and get the values directly.
As iPadOS now has pretty good generic USB support for all sorts of devices, I am hoping there is a way for me to provide service to/with/from those devices but I can't find information through normal internet searches. Poor Google-fu.
I looked at the External Accessory framework but my understanding is that only for MFi certified devices and my attempts to detect the devices have not worked as these are generic USB devices. (Unless there are generic protocols one can register for and make this work).
Thanks for any hints, pointers, admonishments, etc. RTFM is welcome if you tell me the M.
I was browsing through the capability of DIAL, and found out that it is very similar to UPnP, in-fact it uses UPnP protocol for device discovery (SSDP).
What dial is offering, actually a subset of UPnP protocol, isn’t it? Can't we use UPnP's SOAP for content sharing and communicating (launch app) instead of DIAL?
I'm not getting a clear picture where DIAL is fitting in the software stack (If I have UPnP supported already).
Please help me clear my confusion.
The new DIscovery And Launch (DIAL) standard builds on Universal Plug and Play (UPnP) but rather than trying to stream content from a device to the TV it asks the TV or set-top box to launch a suitable client to play back the content direct from source. That way, the digital rights management (DRM) issues are addressed while minimising the reliance in wireless bandwidth and removing the battery issue, but at the cost of creating a new standard.
More info here:
http://www.theregister.co.uk/2013/01/28/dial_youtube_netflix/
You are correct that UPnP could be used to accomplish what DIAL accomplishes.
DIAL apparently was developed quickly avoiding the UPnP standards development process. There was/is no reason that an UPnP device/service that implements application launch and has XML device/service description and SOAP actions could not be added to UPnP, and in fact there now is a UPnP multiscreen effort underway to do just that.
Advantages of DIAL: already defined; already being deployed; simpler than a UPnP device/service is likely to be.
Edited on April 29th, content changed
Hello everyone,
I recently bought a Sony Ericsson mobile phone and I would like to add a missing feature myself. In fact I cannot actually disable Internet connection in an easy way when roaming, which cost me a lot of money last time I moved away ... So I would like to develop a little application that would just replace the actual Internet configuration with a fake configuration to avoid auto-connections.
So what I would like to know is how can I access programmatically to my phone settings? I know that Sony Ericsson provides a SDK to run Java applications on its customised JVM. So what I am actually looking for is to know if they extended the J2ME functionality to fit their devices requirements.
This is not well documented so I am asking this question with the hope that someone here already had experience with development targeted for Sony Ericsson devices.
Thanks.
NB: This is a Sony Ericsson Elm which is based on the Sony Ericsson OS with SE Java Platform 8.5.
Edit: I accepted QuickRecipesOnSymbianOS answer as it gave me a clue on the only feature that could have helped me, but which is unfornatunately missing. The Sony Ericsson Java Platform is the only API I could use to develop real programs on my phone. But the JP-8.5 does not implement the JSR-307 package which could help me in managing APN. Thanks everyone for your help.
Well, I hope you got the great Vivaz phone, not the Satio.
In order to learn about Symbian OS C++, first go to the Foundation website.
Relevant plug: the latest introduction to Symbian OS C++ in book form is Quick Recipes on Symbian OS
For now, you won't find a better way than Symbian OS C++ to manipulate your handset access points.
JavaME simply doesn't have the correct APIs for this, at least not until JSR-307 is implemented.
I believe Qt isn't integrated quite tightly enough just yet either but that should change soon enough. Keep an eye on it.
Extending the Symbian Python runtime to do what you want would require some Symbian OS C++ anyway.
Yes you will need to use Symbian C++ to modify the CommDB, which holds the list of connections. It is quite painful to work with it directly, but there are some utility classes that can help you out. Take a look at CApSelect, CApDataHandler and CApAccessPointItem, all in the developer library.
And yes, these will work on all modern Symbian handsets, independent of brand.
Note: My answer below assumed it was about a symbian device. Since it was actually a J2me device none of the below applies
The easiest way to achieve what you want to do is probably to just remove all the "destinations" when you want to prevent auto connections. Otherwise the device will test each destination in turn until it finds one that works.
You can also set up your destinations so that they are not allowed to be used automatically. This setting must be done individually for each destination.
You can also group your destinations and set one of the groups to the default. If you set the default to an empty group you should not get any automatic connections.
Note that I have not tested any of these methods myself. When I roam I turn off automatic updates in the apps that use them. Some apps can even detect when you are roaming and avoid auto connects.
There are S60 apps available that improves the connection management of vanilla S60, but I do not know if any of them can help you with your problem.
If you are dead set on doing the programming yourself you have to use the C++ SDK for Symbian S60 available from Forum Nokia. Java ME does not allow you to manipulate the destinations of the device.
The Elm device should have (I haven't verified this) the access point API originally designed by Nokia. Not sure whether you can use it for the purpose you want though. The J2me developer guidelines available from developer.sonyericsson.com should have all the information you need.
I am having big trouble to communicate through USB, from a Mac to an external HID device. The hardware has been proven fine when running under the Windows XP platform, but I can't find a GOOD exemple of programming the HID with Cocoa / objective-C. Several exemples are available in the Apple center, but they are either poorly documented, or too much complex ( in term of software with mixed objective-C and C, making the file difficult to understand), or not up to date. Well, I must say that I am more an hardware electronic engineer than a software specialist !
So far, I can enumerate the USB port, identify my device using the HID Apple's tools ( I read PID and VID ), but I miserably fail to send a report and/or to read a report back from the external device.
I would certainelly appreciate if one of you has used the new Apple's HID API and can share some know how.
On the other hand, is there any "USB spy" tool operating with the Apple's OSX ?
Thank you so much for your help
Michael
So yes, you're going to have to dive down and write C, not Objective-C, to do your thing.
Luckily, there's an additional Apple resource to make the USB/HID Manager MUCH easier.
See the HID Utilities Sample/Library from Apple
You are not going to find an Objective-c interface for the HID. At least, not anything more than a wrapper. Because of dynamic binding and delayed messaging, Objective-c is poorly suited to programming time dependent task like device drivers or for communicating with same. You're going to have to work in C.
The Apple resources: Accessing Hardware From Applications,the HID Class Device Interface Guide are going to be your best resources. This tech note offers a good overview as well.
The Apple System profiler will scan you USB chain to see what devices are visible to the hardware itself.
Edit01:
Can't believe I forgot about /Developer/Applications/Utilities/IORegistryExplorer. It gives you a detailed breakdown of the entire hardware tree.
I'm writing a program that needs to take input from an XBox 360 controller. The input will then be sent wirelessly to an RC Helicopter that I am building.
So far, I've learned that this can be done using either the XInput library from DirectX, or the Input framework in XNA.
I'm wondering if there are any other options available. The scope of my program is rather small, and having to install a large gaming library like DirectX or XNA seems like excessive. Further, I'd like the program to be cross platform and not Microsoft specific.
Is there a simple lightweight way I can grab the controller input with something like Python?
Edit to answer some comments:
The copter will have 6 total propellers, arranged in 3 co-axial pairs. Basically, it will be very similar to this, only it will cost about $1,000 rather than $15,000. It will use an Arduino for onboard processing, and Zigbee for wireless control.
The 360 controller was selected because it is well designed. It is very ergonomic and has all of the control inputs needed. For those familiar with helicopter controls, the left joystick will control the collective, the right joystick with control the pitch and roll, and the analog triggers will control the yaw. The analog triggers are a big feature for the 360 controller. PS and most others do not have them.
I have a webpage for the project, but it is still pretty sparse. I do plan on documenting the whole design though, so eventually it will be interesting.
http://tricopter.googlecode.com
On a side note, would it kill Google to have a blog feature for googlecode projects?
I would like the 360 controller input program to run in both Linux and Windows if possible. Eventually though, I'd like to hook the controller directly to an embedded microcontroller board (such as Arduino) so that I don't have to go through a computer, but its not a high priority at the moment.
It is not all that difficult. As the earlier guy mentioned, you can use the SDL libraries to read the status of the xbox controller and then you can do whatever you'd like with it.
There is a SDL tutorial: http://sdl.beuc.net/sdl.wiki/Handling_Joysticks which is fairly useful.
Note that an Xbox controller has the following:
two joysticks:
left joystick is axis 0 & 1;
left trigger is axis 2;
right joystick is axis 3 & 4;
right trigger is axis 5
one hat (the D-pad)
11 SDL buttons
two of them are joystick center presses
two triggers (act as axis, see above)
The upcoming SDL v1.3 also will support force feedback (aka. haptic).
I assume, since this thread is several years old, you have already done something, so this post is primarily to inform future visitors.
PyGame can read joysticks, which is what the X360 controller shows up as on a PC.
Well, if you really don't want to add a dependency on DirectX, you can use the old Windows Joystick API -- Windows Multimedia -> Joystick Reference in the platform SDK.
The standard free cross plaform game library is Simple DirectMedia Layer, originally written to port Windows games to Unix (Linux) systems. It's a very basic, lightweight API that tends to support the minimal subset of features on each system, and it has bindings for most major languages. It has very basic joystick and gamepad support (no force feedback, for example) but it might be sufficient for your needs.
Perhaps the Mono.Xna library has added GamePad support, which would provide the cross platform functionality you were looking for:
http://code.google.com/p/monoxna/
As far as the concerns about the library being too heavy weight, sure, for this option it may be true ... however, it could open up opportunities to do some nice visualization in the future.
disclaimer: I'm not familiar with the status of the mono xna project, so it may not have added this feature yet. But still, 'tis an option :-)