Go to advanced search

by marciokoko
Sat Sep 19, 2020 1:11 pm
Forum: General discussion
Topic: RPi disconnects from router possibly due to configuration
Replies: 13
Views: 585

Re: RPi disconnects from router possibly due to configuration

ok im not positive but the rpi got back on the network without me rebooting it. So i didnt get a chance to buy a long cable to run from the router to the rpi and then today its back on still on the adapters. I just went to check on the screen of the pi and its where i left it yesterday so it didnt r...
by marciokoko
Fri Sep 18, 2020 9:38 pm
Forum: General discussion
Topic: RPi disconnects from router possibly due to configuration
Replies: 13
Views: 585

Re: RPi disconnects from router possibly due to configuration

ok i ran your command and got this. So it is asking for a new lease but it doesnt seem to get one for some reason.

So it defaults to its local. But i know if i reboot this rpi, itll ask for a lease and get one.
IMG_7799.JPG
IMG_7799.JPG (85.3 KiB) Viewed 140 times
IMG_7798.JPG
IMG_7798.JPG (109.5 KiB) Viewed 140 times
by marciokoko
Fri Sep 18, 2020 2:39 pm
Forum: General discussion
Topic: RPi disconnects from router possibly due to configuration
Replies: 13
Views: 585

Re: RPi disconnects from router possibly due to configuration

ok i tried this last bit of code but it doesnt work either. I added a screen to the rpi and its working fine; i mean its not hung up or anything like that. What can I try on the pi to debug and find out what might be the issue? Since its not stuck or hung up, I can go into terminal and issue command...
by marciokoko
Sat Sep 05, 2020 8:42 pm
Forum: General discussion
Topic: How to create tmux session with variable in name?
Replies: 1
Views: 141

How to create tmux session with variable in name?

Currently I create a tmux session using this command: tmux new -d -s mqttListen 'python /home/pi/Documents/python/mqttReceive.py' \; set -t mqttListen remain-on-exit on; how could I create the session with variable in the name "mqttListenX" where X is either an incremental number or maybe a timestamp.
by marciokoko
Sat Sep 05, 2020 3:42 am
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

Re: How to disable wireless interface from /etc/network/interfaces

iwconfig: pi@raspberrypi:~ $ iwconfig wlan0 IEEE 802.11bgn ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on lo no wireless extensions. eth0 no wireless extensions. usb0 no wireless extensions. dhcpcd.conf # A...
by marciokoko
Fri Sep 04, 2020 10:07 pm
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

Re: How to disable wireless interface from /etc/network/interfaces

Ok what will this take care of? Just preventing the wifi connectivity right? Yes. You need to put /etc/network/interfaces back to whatever it was before you edited it On mine interfaces only has one active line source-directory /etc/network/interfaces.d And in my case /etc/network/interfaces.d dire...
by marciokoko
Fri Sep 04, 2020 5:29 pm
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

Re: How to disable wireless interface from /etc/network/interfaces

Ok and in the crontab then I should probably change this: */5 * * * * /bin/ping -q -c10 192.168.1.1 > /dev/null 2>&1 || (/sbin/ifdown --force wlan0 ;/sbin/ifup wlan0 ;/usr/bin/logger wifi on wlan0 restarted via crontab) to this: */5 * * * * /bin/ping -q -c10 192.168.1.1 > /dev/null 2>&1 || (/sbin/if...
by marciokoko
Fri Sep 04, 2020 5:21 pm
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

Re: How to disable wireless interface from /etc/network/interfaces

pidd wrote:
Fri Sep 04, 2020 4:55 pm
You can put the following at the end of /etc/dhcpcd.conf

Code: Select all

denyinterfaces wlan0
then

either reboot or

Code: Select all

sudo systemctl restart dhcpcd

Ok what will this take care of? Just preventing the wifi connectivity right?
by marciokoko
Fri Sep 04, 2020 5:19 pm
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

Re: How to disable wireless interface from /etc/network/interfaces

rc.local is basically executed whenever systemd thinks its time to do so. Nothing says network is up when rc.local is executed. On raspios if you want to launch services, create a custom systemd unit file (that depends on target network.online, or something like that) Again. Remove what you added t...
by marciokoko
Fri Sep 04, 2020 4:26 pm
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

Re: How to disable wireless interface from /etc/network/interfaces

ok what do you recommend; here is my issue: I have a rpi connected to my router via a powerline adapter. The rpi runs 2 python scripts that I need to run constantly. So Ive added this to my rc.local: # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n"...
by marciokoko
Fri Sep 04, 2020 2:52 pm
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

Re: How to disable wireless interface from /etc/network/interfaces

Thanks. I would like to do it in the network/interfaces/ if possible because I want an easier way to reactivate it when necessary.
by marciokoko
Fri Sep 04, 2020 2:20 am
Forum: General discussion
Topic: How to disable wireless interface from /etc/network/interfaces
Replies: 14
Views: 832

How to disable wireless interface from /etc/network/interfaces

Id like to know what to edit to disable my wifi from /etc/network/interfaces? # interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces...
by marciokoko
Wed Sep 02, 2020 2:12 am
Forum: General discussion
Topic: RPi disconnects from router possibly due to configuration
Replies: 13
Views: 585

Re: RPi disconnects from router possibly due to configuration

ok so i tried the checkwifi.sh with the systemctl restart dhcpcd and this line: */5 * * * * /bin/ping -q -c10 192.168.0.1 > /dev/null 2>&1 || (/sbin/ifdown --force wlan0 ;/sbin/ifup wlan0 ;/usr/bin/logger wifi on wlan0 restarted via crontab) in the crontab...since i moved back to ethernet, I replace...
by marciokoko
Fri Aug 28, 2020 2:35 am
Forum: General discussion
Topic: RPi disconnects from router possibly due to configuration
Replies: 13
Views: 585

Re: RPi disconnects from router possibly due to configuration

Ok today in the morning I tried this script which I found last night and it didnt work. I actually typed in the script last night, rebooted the pi and this morning it was already off the network so whatever it does, it doesnt fix the problem. [it might actually have made it worse]. #!/bin/bash #ping...
by marciokoko
Thu Aug 27, 2020 11:17 am
Forum: General discussion
Topic: RPi disconnects from router possibly due to configuration
Replies: 13
Views: 585

Re: RPi disconnects from router possibly due to configuration

It's not the UPS issue I'm worries about but thanks.

It's not a delay issue when rebooting because when I reboot the pi manually it reconnect just fine.

OK do you have such a script to reconnect?

Thx
by marciokoko
Thu Aug 27, 2020 1:11 am
Forum: General discussion
Topic: RPi disconnects from router possibly due to configuration
Replies: 13
Views: 585

RPi disconnects from router possibly due to configuration

I originally noticed the issue when the rpi would disconnect from my router after a power outage which are quite common where I live. I have home assistant installed and the scripts would not run, I was unable to ping the rpi from terminal and the raspberry pi IP address which has a reserved number ...
by marciokoko
Thu Aug 20, 2020 9:37 pm
Forum: General discussion
Topic: Rpi3 not getting ip from dhcp router
Replies: 6
Views: 232

Re: Rpi3 not getting ip from dhcp router

OK so it turns out that there must be something wrong with my UPS. But it must be something that happened internally to the UPS with a recent brown out or surge because it has worked for over five years with the powerline adapter connected to the UPS and not until today did that begin to fail. I con...
by marciokoko
Thu Aug 20, 2020 4:11 pm
Forum: General discussion
Topic: Rpi3 not getting ip from dhcp router
Replies: 6
Views: 232

Rpi3 not getting ip from dhcp router

I have a RPi3 which is connected via a powerline adapter to the router. It has been working fine for years like that. Last night I could no longer ssh into it. When I checked I realized it was not on the routers DHCP list any longer, for which by the way it has a reserved IP address for its Mac. I t...
by marciokoko
Wed Jul 08, 2020 2:25 am
Forum: General discussion
Topic: Rpi2-hassio restart tmux session issue
Replies: 1
Views: 162

Re: Rpi2-hassio restart tmux session issue

My rc.local has this: # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi #added2rebootRunTmuxReconnectSchedule echo > /tmp/test1.txt sleep 10 tmux new -d -s mqttListen 'python /home/pi/Documents/python/mqttReceive.py' \; set -t mqttListen r...
by marciokoko
Thu Jun 18, 2020 7:56 pm
Forum: Troubleshooting
Topic: Network issues causing rpi to drop from router dhcp
Replies: 0
Views: 91

Network issues causing rpi to drop from router dhcp

So I need to debug what is causing this to happen. It seems to be related to whenever the power goes and comes back (although Im not entirely sure). Ive got hassio on rpi running my ha and it all works gr8. Every now and then though, when I load my UI I get a connection refused which turns out in no...
by marciokoko
Wed Mar 11, 2020 12:41 pm
Forum: General discussion
Topic: Rpi2-hassio restart tmux session issue
Replies: 1
Views: 162

Rpi2-hassio restart tmux session issue

I run Hass.io with lovelace interface on rpi2 with IP .117. HA v0.103.5. It has 2 scripts that run on startup from the rc.local file: #1 makes a python script run called tsrb430.py which runs continuously in order to check if needs to run py scripts that turn my lights on and off via a ble relay boa...
by marciokoko
Sun Jan 05, 2020 4:35 pm
Forum: General discussion
Topic: bluepy c.write(1) proper writing
Replies: 5
Views: 363

Re: bluepy c.write(1) proper writing

you mean c.write(chr(1))?

Cause it didn't work.
by marciokoko
Sun Jan 05, 2020 2:47 pm
Forum: General discussion
Topic: bluepy c.write(1) proper writing
Replies: 5
Views: 363

Re: bluepy c.write(1) proper writing

Yes but that makes it a string and so the relay doesn't activate since it expects a decimal.
by marciokoko
Sun Jan 05, 2020 5:01 am
Forum: General discussion
Topic: bluepy c.write(1) proper writing
Replies: 5
Views: 363

bluepy c.write(1) proper writing

i need my python script to send a decimal 1 to the ble device. If I use: #!/usr/bin/env python import bluepy.btle as btle print ("outside") def letsgobaby(): print ("turning1on") p = btle.Peripheral("bb:00:00:15:27:19") #zl-rc04a # GET SERVICES services=p.getServices() for service in services: print...
by marciokoko
Tue Sep 17, 2019 10:08 pm
Forum: Other
Topic: [hassio] Why is my rpi2 with hassio hanging
Replies: 1
Views: 1730

[hassio] Why is my rpi2 with hassio hanging

Where could I find log files for my rpi2 with hassio installed? It seems to be hanging lately and I can't figure out why. I don't have a screen attached to it but all of a sudden I try to access it's ui and I get no reponse from it and today I couldn't even ping it even after reconnecting the ethern...

Go to advanced search