Ionică Bizău

Jun 14, 2020 07:57
Thank you so much.
Jun 14, 2020 07:57
Yes, that worked! <3 Thank you very much. You can post an answer.
Jun 14, 2020 07:54
@tlfong01 Checking now using NO
Jun 14, 2020 04:59
Why?
Jun 14, 2020 03:41
@tlfong01 Those relays have a control to toggle the NO/NC, but obviously the problem is the same. I have a basic understanding of AC, of course. The problem is that I don't know how to make the pi to have by default an OUT pin set to LOW. I think that would solve the problem.
Jun 12, 2020 13:28
@tlfong01 Sorry, but there is no neutral output. The outputs are for open/closed and common.
Jun 12, 2020 12:10
I am really sorry if I hurt you, I did not want to do that. What I wanted to point out is that I already have a script setting the output of the relay. The issue is not in the actual script logic but in the way I should use the pi and the other hardware stuff. I feel I miss some hardware to get this done, but I am not sure.
Jun 12, 2020 08:59
If I use LOW, if the pi gets disconnected, the bulb turns on
Jun 12, 2020 08:58
What I wrote in the question is that the issue is that if I use HIGH to turn the bulb on, it will remain on after shutdown, and will turn off only when my script sets it back to LOW.
Jun 12, 2020 08:58
Well, that works
Jun 12, 2020 08:53
That will simply toggle the pin.
Jun 12, 2020 08:53
I understand that, but I don't understand what we expect.
Jun 12, 2020 08:48
Should I configure the hardware to turn on the light when it is HIGH?
Jun 12, 2020 08:30
Because the relay is either ON or OFF.
Jun 12, 2020 08:30
Sorry, I still fail to undertstand how the rezistor will help in this circuit.
Jun 12, 2020 08:30
@tlfong01 I added details about the circuit and relay.
Jun 12, 2020 08:30
@tlfong01 Thank you very much for this information. What I still don't understand is what I am trying to do is possible or I need more hardware to get this done.
Jun 12, 2020 08:30
@tlfong01 Well, that is my question about: if I use BCM8, unless the pi is running and output is HIGH, the bulb will be on. The problem here is that if the pi is disconnected, the bulb will turn on. If I use BCM4, the bulb will turn on when pi is restarted and will remain on until I set the mode to OUT.
Jun 12, 2020 08:30
@tlfong01 Sorry, from the last comment I understand that IN and OUT 1 are going to turn on the bulb. So, is it possible to configure an OUT 0 by default?
Jun 12, 2020 08:30
@tlfong01 That is an amazing answer, but my case is a little bit different. Is it possible to change the default state of the pins? I think an OUT 0 would help, meaning, that mode is set by default to OUT, but current is LOW.
Jun 12, 2020 08:30
@tlfong01 I think the issue is that even after I shut down the pi, the relay still gets current from the pins. I tried using BCM 8, which has OUT 1 by default and use LOW to turn on the bulb, and it works in the sense that after the pi is restarted the bulb turns off, but after turning off the pi, the relay is still in the same position.
 
Jun 12, 2020 13:19
@Milliways What should I use instead of a relay to get this done (turn on a light bulb programatically, but making sure it stays turned off if my program does not run)?
Jun 12, 2020 13:19
@tlfong01 I added details about the circuit and relay.
Jun 12, 2020 13:19
@tlfong01 Thank you very much for this information. What I still don't understand is what I am trying to do is possible or I need more hardware to get this done.
Jun 12, 2020 13:19
@tlfong01 Well, that is my question about: if I use BCM8, unless the pi is running and output is HIGH, the bulb will be on. The problem here is that if the pi is disconnected, the bulb will turn on. If I use BCM4, the bulb will turn on when pi is restarted and will remain on until I set the mode to OUT.
Jun 12, 2020 13:19
@tlfong01 Sorry, from the last comment I understand that IN and OUT 1 are going to turn on the bulb. So, is it possible to configure an OUT 0 by default?
Jun 12, 2020 13:19
@tlfong01 That is an amazing answer, but my case is a little bit different. Is it possible to change the default state of the pins? I think an OUT 0 would help, meaning, that mode is set by default to OUT, but current is LOW.
Jun 12, 2020 13:19
@tlfong01 I think the issue is that even after I shut down the pi, the relay still gets current from the pins. I tried using BCM 8, which has OUT 1 by default and use LOW to turn on the bulb, and it works in the sense that after the pi is restarted the bulb turns off, but after turning off the pi, the relay is still in the same position.
 

 Ask Ubuntu General Room

Normally: General discussion around Ask Ubuntu, Ubuntu & offic...
Aug 6, 2019 06:54
Hello wonderful people! :-)
 
Mar 11, 2019 08:36
I talked to Apple via Twitter but they can't help me since I don't have a phone number from a country where Apple phone support is available.
Mar 11, 2019 08:35
^ Hi everyone! I'm wondering if any of you could help me here...
Mar 11, 2019 08:35
5
Q: Books automatically deletes my books when offline, and when there is enough space on device

Ionică BizăuThere is something strange going on with Books on iPad and iPhone. It keeps deleting some books locally, keeping them in the cloud. It's frustrating because it happens when I'm offline and I simply lose the access to them. Why is this happening at all? And how can I stop it? I enabled syncing ...

 
Apr 23, 2018 18:38
And I was like... all right... gonna start from scratch again.
Apr 23, 2018 18:38
This is what a bot collected in 3 months.
Apr 23, 2018 18:37
31M records.
Apr 23, 2018 18:37
OK, full database recovered.
Apr 23, 2018 18:26
Oh, and there is the Mongo stuff. I hope to recover that too. Hahaha
Apr 23, 2018 18:26
Thanks a lot.
Apr 23, 2018 18:24
I will make a backup once I get the others.
Apr 23, 2018 18:24
Yes, I have.
Apr 23, 2018 18:23
order by desc limit 1
Apr 23, 2018 18:23
According to my astronomical calculations, that was on Friday, when things got bad. Hahaha
Apr 23, 2018 18:23
See ^
Apr 23, 2018 18:23
mysql> select * from ActivityEvents order by created_at desc limit 1;
+----------+------+--------+---------------------+---------------------+-----------+
| id       | raw  | active | created_at          | updated_at          | friend_id |
+----------+------+--------+---------------------+---------------------+-----------+
| 29276780 |      |      1 | 2018-04-20 13:26:03 | 2018-04-20 13:26:03 |         3 |
+----------+------+--------+---------------------+---------------------+-----------+
1 row in set (6.28 sec)
Apr 23, 2018 18:22
Now checking the integrity
Apr 23, 2018 18:22
In the backup I had only 10M documents
Apr 23, 2018 18:22
And look ^
Apr 23, 2018 18:21
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '42' at line 1
mysql> select count(*) from ActivityEvents;
+----------+
| count(*) |
+----------+
| 29260671 |
Apr 23, 2018 18:21
then it hanged a while and I waited