Saturday, 4 January 2014

Three Lights in Three D Place!

I added two more rules. The first rule is in a light Thing/object to notify to its place that it's there. The link to the place is hard-coded for now until we get mutual discovery. The second rule is in the place and rather simplistically just adds any notified object at a fairly random location.

Here's what the Android app can then see, after starting up the place, then starting up the Pies - the three lights from yesterday, all automatically notified to, and located in the place object:


As you can see, I've touched them to set their colours. The actual LED behind one of them also changes, of course.

Next job is to advertise this place object instead of the third light, on my laptop. I've currently set a hard-coded URL and UID in the server and the Android app, but it should be auto-generated, like the light UIDs. Then I can get the lights to place themselves there - if they can somehow be coded to see BLE adverts like the Android app can.

Oh - that mysterious dark object in the background is a pretend light level sensor. When you set its light level below 100, all the lights come on white. This is the rule, which I discussed before. Eventually I hope to wire this into a Pi camera, which should be able to detect light levels, colour temperature and motion in a room.


No comments:

Post a comment