IG Occupancy Sensor

So a couple months ago I had hacked together a little light dependent resistor (LDR) and a WildFire to post light level readings to Xively.com. Its output provided a very good heuristic for determining whether the space was occupied. Alexy also wrote a bit of PHP that was hypothetically usable as a wordpress plugin that read the sensor status from Xively and could be integrated into the main IG website somehow.

The astute observer will have noticed that the hardware got taken away. Long story short it mysteriously stopped working after about 2-3 weeks, and I since think I understand why - basically I unwittingly implemented a software pattern that was doomed to eventually brick the Wi-Fi module. Anyway, I since think I have come up with better hardware and softwares and I’m planning to re-install it in the space in the not too distant future.

What I don’t really have the time / inspiration / skills to do right now is presentation level stuff. Be it integrating Alexy’s code into our WordPress site to indicate whether IG is open, or doing other derivative project based on the same idea (IG phone app anyone?). I really want us to have our own little Internet of Things in IG that we can build up over time, and this little project is about as simple as that gets. Does this interest others?

Im interested in helping with user experience. Like, I’m in tburg, I see the lights at IG are on, how to I know they will still be on when I drive in. Interested in filling that gap.

I’d rather build a good mobile web experience than a platform dependent app unless there’s real functionality that needs to be in the app, which I think would be just geolocation stuff or needing to save data locally? If we don’t need that, I think the web is the way to go.

I would help code if you guys are designing.

When you’re ready maybe you could put alexy’s work in github?

@starsplatter OK I just uploaded Alexy’s thing here. I created a WebDev group on GitHub under IthacaGenerator added you to it, and we can either of us can add additional members to that group.

cloned! thanks! let me know when the sensor end is up again or if there’s sometime that you want to work on it.

Speaking of iot, where do i see the aqe online? Thanks for installing @vicatcu !

aqe = Air Quality Egg?

yeah

I’m thinking about coming in Sunday afternoon or during Claire’s staff time if you guys are going to be around this weekend.

We could play with embedding the aqe output in the site first.

1 Like

I think I wrote the URL to the Xively feed on the box on the shelf. Next time I’m around I can transcribe it into this discussion or start a new one (or someone else can). Unfortunately I’m out of town at the moment.

https://xively.com/feeds/93036

IT’S… ALIVE

The light meter is running and the Xively URL is here. The Light datastream is the ADC reading from a voltage divider between an LDR and a 22k resistor. “High” values (e.g. above 150) are when the lights are on in the front room, “Low” values (e.g. below 50) are when the lights are off in the front room. The Counter feed is a liveness / reset indication. Both these values get posted about once every 10 seconds. @starsplatter if you want to try and integrate something into the site, I think we’re in a hardware-stable condition.

On a side note, I was thinking about maybe adding another one of these to the back room (e.g. “Light2/Counter2”), I’m not sure whether the condition of “light is off in the front room but on in the back room” is detectable with the single sensor. Maybe not relevant though. Thoughts?

1 Like

I should note that access parameters and doc refs for Xively:

Thanks!

Claire and I are teaching a class at the library on Tuesday, I probably won’t get to this until after that.

So I messed around with this tonight and found a tutorial so I can get a value back and yay.

@Xanthe_Matychak did you want to talk more about what you would want the user experience for this to be?

Sure! All I can speak to is my own xp. Sharing in case it’s useful:

AT HOME (in tburg). If I wanna know when IG is occupied, I look at the cal on ithacagenerator.org from my laptop. The sensor would confirm or negate that intel.

DOWNTOWN. If I’m downtown w out key, I send an email to the google group. Or I’d text Laurence. If I were to check the sensor, it would be on my phone

I feel a little worried about seeing the sensor as too authoritative but maybe we’ll just see how it goes.

Do we worry at all about making this too publicly available? Should it be right out front or something you need to know about to get to?

On the front vs back room I don’t know… I tend to turn on all the lights because I find it creepy to leave the back room dark, so I’m not sure how often one set is on without the other.

I’m not concerned about this information being openly/obviously presented to the public (e.g. on the homepage of the website).

Lets consider the possibility of a bad guy using the information that the lights are out as part of a nefarious plan to, for example, break into the space. They still have to physically break into the space (through multiple locked doors). They could also have gleaned the lights were off by stopping by and looking in the door (i.e. the one they are about to break into). So I don’t think it makes the space any less secure than it is today.

It’s main utility is, on the other hand, connected to the ease with which you can see it. So I would vote for not obscuring the presentation.

I think adding moar sensors would be cool (over time). Whether/how we integrate them into a unified/cohesive presentation is a separate matter. An additional light sensor in the back room would be trivial. Adding a PIR motion sensor to the WildFire so it reports an additional datastream would also be cool.

For now I think we should just focus on presenting the one sensor that we have, and we can re-evaluate architecture/presentation later (if/when we add sensors).