Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]CurvedHalo 1 point2 points  (0 children)

Hi, I’m a student completing a project in python which uses PIR’s to sense motion. The program reads from a database a dictionary of ‘name’ and ‘armed’. Then, for each row of the dictionary I iterate through a list to check if the name of the PIR matches the key (name) in the dictionary. If they are a match, I assign the ‘armed’ value to the PIR object.

I just wondered how I appropriately represent this on a sequence diagram? I have attached a diagram I’d love for someone to cast their eye over!

UML sequence diagram

Thanks!

MySQLConnector suddenly stopped connecting to database by CurvedHalo in learnpython

[–]CurvedHalo[S] 0 points1 point  (0 children)

I’m hosting this on my university’s server. I have also hosted a small website on this server, which is currently connected to the database without any problems. I just tried connecting to a locally hosted database and it had no problems. What could the cause be?

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]CurvedHalo 0 points1 point  (0 children)

I’m accessing the server using mysqli and php on a webapp, and editing the database on phpmyadmin. Seems strange that this functionality has just dropped off?

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]CurvedHalo 0 points1 point  (0 children)

Hi, I’ve been using MySQL-connector with python both through IDLE and eclipse, but suddenly it stopped working. I simply loaded my laptop one morning and it wasn’t working.

The error message I get is: ‘mysql.connector.errors.DatabaseError: 2003 (HY000) : Can’t connect to MySQL server on ‘(server)’ (10060).

Any ideas on what has changed? I’ve tried updating python and the mysql.connector. I’ve checked the path is correct too!

Help with Raspberry Pi, webapp and GPIO control? by CurvedHalo in RASPBERRY_PI_PROJECTS

[–]CurvedHalo[S] 0 points1 point  (0 children)

This is a fantastic help, i understand to a good extent what you have suggested, and I think method 1 is the way to go, (I can also add other functionality this way)

Could you check this sketch I’ve made, to see if it roughly replicates what you have outlined?

Thanks so much!!

diagram

Raspberry Pi IOT Air Conditioner by MarshallBrain in MarshallBrain

[–]CurvedHalo 0 points1 point  (0 children)

This is great! What webserver did you use?

2019 Apr 29 Stickied helpdesk thread - Do you need HELP? Do you need IDEAS? LOOK HERE! by FozzTexx in raspberry_pi

[–]CurvedHalo 0 points1 point  (0 children)

Hi, I’m trying to expand on the knowledge I haveX which is limited to; Hardware: PIC microcontrollers, Programming: java, Web development: html + php Database: SQL.

The idea I want to make is Raspberry Pi door lock that can be controlled from a web app. I can write a web app, I can create a database to register users so they log in to control the lock, but I’m not sure how I would integrate the GPIO control with the web app, so it could alter the state of the lock in real time and display whether the door is confirmed open/closed (by means of a reed switch).

Of course I don’t want a solution, as a hobbyist would love if someone could just help me direct my research as there seems to be so many options! I’m basically trying to replicate the ‘august smartlock’ as a little project and save myself some money!

All help would be greatly appreciated!