Live data from Hacker News

Overengineering a way to know if people are in my university's CS lab

amoses.dev

61–70 of 90 posts

Re: Overengineering a way to know if people are in my university's CS lab

#63

Love the motivation! Reminds me of the first stuff I built back in my university days. One thing from and old cranky dev that I notice: it would seem the yml you post has redundancies: either have 4 endpoints, no payload or 4 different payloads, one endpoint (the endpoint itself can tell you what you need to do) However, from the express script it looks like you arrived at this in the final solution anyway. Not sure…

Hi! Author here. The yml is from a configuration in Home Assistant. Whenever it received an event from the sensors, it would fire the corresponding POST request (which you have to specify ahead of time, hence the configuration being a little redundant). The main reason for switching to the Express setup is that I was having a few random people look at the code & send their own requests to fudge what the status appear…

You can read and write HA entities via HTTP API so I think you could have done this with nothing but HA, but either way it's a fun project :)

One of my more fun HA project was scraping my snow removal service's tractor tracking API and passing the result for the closest tractor into HA so I can be notified (by voice with Alexa and/or push notification) when there's one nearby in case I need to move the car.

Re: Overengineering a way to know if people are in my university's CS lab

#64
post #37

Earlier quoted context omitted.

I had finger running on login to `finger stacy` I was at SDSU on a very large SunOS system and she was at a private school and I assume that computer was a bit more limited. `Finger Stacy` would run every minute and typically be running for 15 minutes max... that is until I moved into the dorms and my machine was online all the time. A few weeks go by and I get an email from the SDSU admin requesting that I stop fing…

fdisk or mount?

Sincerely doubt he had permissions for either operation. ;)

Re: Overengineering a way to know if people are in my university's CS lab

#65
post #36

Earlier quoted context omitted.

I am, in fact, suggesting you do this.

> I'm not suggesting you don't do this I hope this is intentional

>> I'm not suggesting you don't do this

> I hope this is intentional

I mean, it's not unintentional..

Re: Overengineering a way to know if people are in my university's CS lab

#67
post #63

Earlier quoted context omitted.

Hi! Author here. The yml is from a configuration in Home Assistant. Whenever it received an event from the sensors, it would fire the corresponding POST request (which you have to specify ahead of time, hence the configuration being a little redundant). The main reason for switching to the Express setup is that I was having a few random people look at the code & send their own requests to fudge what the status appear…

You can read and write HA entities via HTTP API so I think you could have done this with nothing but HA, but either way it's a fun project :) One of my more fun HA project was scraping my snow removal service's tractor tracking API and passing the result for the closest tractor into HA so I can be notified (by voice with Alexa and/or push notification) when there's one nearby in case I need to move the car.

Do you mean outside of the API that I talk about in the article? If I exposed the HA API via the frontend, users would be able to just take the bearer token and do whatever they wanted with it (even deleting the entities used for the doors). That's why the express server is sitting in the middle to only expose the relevant information (proxying w/ the bearer token, which the end users have no access to)
Post reply on HN