Go to advanced search

by marciokoko
Wed Oct 31, 2018 12:28 am
Forum: Troubleshooting
Topic: Python code isnt being run, I think
Replies: 2
Views: 201

Re: Python code isnt being run, I think

thanks!
by marciokoko
Tue Oct 30, 2018 10:40 pm
Forum: Troubleshooting
Topic: Python code isnt being run, I think
Replies: 2
Views: 201

Python code isnt being run, I think

I have one python file calling another. The file is called, but not completely. In the called file I had to include the actual code inside of if __name__ == "__main__": because otherwise when the caller py imports the called file, the code gets run, and that cannot happen because I need to only call...
by marciokoko
Mon Oct 29, 2018 7:38 pm
Forum: Beginners
Topic: Running 2 python scripts from rc.local on boot
Replies: 3
Views: 312

Re: Running 2 python scripts from rc.local on boot

Great thanks! What would be some pros and cons of running it as systemd in your experience, aside from what I read about a particular sequence of events which might affect timing of services, which in my case wouldnt be an issue?

Thx again
by marciokoko
Mon Oct 29, 2018 1:05 am
Forum: Beginners
Topic: Running 2 python scripts from rc.local on boot
Replies: 3
Views: 312

Running 2 python scripts from rc.local on boot

I currently have this: #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this ...
by marciokoko
Sun Oct 28, 2018 10:40 pm
Forum: Beginners
Topic: Logo on ssh terminal login of a rpi
Replies: 7
Views: 359

Re: Logo on ssh terminal login of a rpi

Thanks I used the motd file because the terminal header isn't very noticeable.
by marciokoko
Sun Oct 28, 2018 5:57 pm
Forum: Beginners
Topic: Logo on ssh terminal login of a rpi
Replies: 7
Views: 359

Logo on ssh terminal login of a rpi

Is there a way to have my ssh terminal display a 'logo' like the character based ones from some online servers that makes it readily available to confirm that the server you're logged into is the right one? I mean, thats not the purpose of the logos, but it helps because i have 2 rpis on my home net...
by marciokoko
Sat Oct 27, 2018 9:43 pm
Forum: Troubleshooting
Topic: Installing python3 on rpi2
Replies: 6
Views: 232

Re: Installing python3 on rpi2

Yeah so ill keep raspbian jessie on my working home setup (production) and test around hass.io directly on rpi2.

Thanks
by marciokoko
Sat Oct 27, 2018 7:41 pm
Forum: Troubleshooting
Topic: Installing python3 on rpi2
Replies: 6
Views: 232

Re: Installing python3 on rpi2

Ok, because i think the other option I had which was to burn the hass.io image onto the SD and use THAT to boot my rpi: https://www.home-assistant.io/getting-started/ perhaps isnt the best option because from the size of the downloaded file of hass.io, which is 149MB, it seems i would be using my rp...
by marciokoko
Sat Oct 27, 2018 1:18 pm
Forum: Troubleshooting
Topic: Installing python3 on rpi2
Replies: 6
Views: 232

Installing python3 on rpi2

I had python 2.7.9, when I did python --version i would get that. I ran: sudo apt-get install python3 python3-venv python3-pip and in the end i ran python --version and still got 2.7.9. So googled around and found and did: python3 --version and i get 3.4.2 Does that mean I have both? But more import...
by marciokoko
Fri Oct 26, 2018 3:16 pm
Forum: Beginners
Topic: Interfacing rpi3 with Apple's HomeKit
Replies: 0
Views: 158

Interfacing rpi3 with Apple's HomeKit

Hi Does anyone know of examples of interfacing rpi3 with Apple's home kit? For example, I have a rpi3 that controls a relay board via ble. Id like to know if I could either: 1. Interface directly with the ble relay board, which is probably whats intended. 2. Interface with the rpi3 so that I can con...
by marciokoko
Thu Oct 18, 2018 1:16 am
Forum: Beginners
Topic: If else code for time domain
Replies: 1
Views: 88

If else code for time domain

<t>So I want the rpi3 connected to my relay board to turn lights on and off. I have the on time at 17 hrs and the off time at 6 hrs. My code is: def relayToggle(self): timestringON = AIHome.results['Relay1ON'] timestringOFF=AIHome.results['Relay1OFF'] print timestringON print timestringOFF hoursON,m...
by marciokoko
Mon Sep 17, 2018 11:18 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1606

Re: Reading response from BLE device on rpi3

I have this code so far: #!/usr/bin/env python import bluepy.btle as btle #Delegate methods class ReadDelegate(btle.DefaultDelegate): def __init__(self): btle.DefaultDelegate.__init__(self) def handleNotification(self, cHandle, data): print("Here is the data...") print("A notification was received: ...
by marciokoko
Tue Sep 11, 2018 9:57 pm
Forum: Beginners
Topic: Can i power a rpi3 and a 5” lcd from 1 power adapter?
Replies: 12
Views: 411

Re: Can i power a rpi3 and a 5” lcd from 1 power adapter?

Ok wait, im still confused. I currently have my rpi3 connected to a 5" hdmi using an hdmi-adaptor that came with the screen and I power the rpi3 which I assume in turn powers the screen via the gpio pin stack, since I dont believe hdmi connectors provide power.

I dont want my rpi3 to burn out
by marciokoko
Tue Sep 11, 2018 9:29 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1606

Re: Reading response from BLE device on rpi3

Ok I tried this readline() instead of read() and i get this error: Hallo from Peripheral discovering services Hello Service <uuid=Generic Attribute handleStart=12 handleEnd=15> Service <uuid=Generic Access handleStart=1 handleEnd=11> commonName= 0000ffe0-0000-1000-8000-00805f9b34fb commonName= ffe0 ...
by marciokoko
Tue Sep 11, 2018 7:41 pm
Forum: Beginners
Topic: Can i power a rpi3 and a 5” lcd from 1 power adapter?
Replies: 12
Views: 411

Re: Can i power a rpi3 and a 5” lcd from 1 power adapter?

So you had the pi connected to the screen how, exactly?
by marciokoko
Tue Sep 11, 2018 4:32 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1606

Re: Reading response from BLE device on rpi3

So I took this part of the python code: s = p.getServiceByUUID("0000ffe0-0000-1000-8000-00805f9b34fb") c = s.getCharacteristics()[0] c.write("[") x = c.read() #parse read with helper functions######################### responseBits = convert_hex_to_bin_str (x) and inserted a print x right between the...
by marciokoko
Sun Sep 09, 2018 3:06 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1606

Re: Reading response from BLE device on rpi3

Thanks I dont believe its a python issue as I havent been able to get the ble relay board (device) to respond or be able to read its characteristic data via bluetoothctl either. This is what I know so far: 1. The ble device (relayboard) can talk to any of the BLE android apps out there and I can rea...
by marciokoko
Sat Sep 08, 2018 1:09 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1606

Re: Reading response from BLE device on rpi3

Please I need help writing python to read response from a ble device.
by marciokoko
Sat Sep 08, 2018 12:42 am
Forum: Troubleshooting
Topic: Ssh doesnt work but ping does
Replies: 1
Views: 75

Ssh doesnt work but ping does

So I have this network the rpi3 is on. Sometimes I can ssh into it just fine, but others like now, I can ping the IP just fine and it responds 25ms etc. But when I try to ssh via terminal, the terminal just hangs after I enter the ssh command... Any ideas why? It seems the rpi3 Gets dropped from the...
by marciokoko
Tue Aug 14, 2018 11:08 pm
Forum: Python
Topic: Internet connection Python code help
Replies: 0
Views: 151

Internet connection Python code help

I have this code where 1. init calls a scheduler for every hour, 2. fetchUpdate does the connecting 3. relayToggle parses response and executes toggle As you can see in the fetchUpdate() I have a comment which is what im trying to implement now. So if internet connection fails, I should get an error...
by marciokoko
Mon Aug 13, 2018 2:21 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1606

Re: Reading response from BLE device on rpi3

Hello? Help please
by marciokoko
Wed Aug 01, 2018 5:52 pm
Forum: Troubleshooting
Topic: Raspberry pi 3 time sync on reboot
Replies: 3
Views: 140

Re: Raspberry pi 3 time sync on reboot

So it may have actually NOT updated correctly after the blackout (due to wireless vs wired connection issues) and when it tried the update ntp server it failed.

So when I saw the July 31st maybe it was still the saved time instead of the ntp updated time.
by marciokoko
Wed Aug 01, 2018 2:47 pm
Forum: Troubleshooting
Topic: Raspberry pi 3 time sync on reboot
Replies: 3
Views: 140

Raspberry pi 3 time sync on reboot

Hi guys I have this rpi3 which I thought I had configured to sync to the internet servers on reboot I'm case of power failure. It had been a while since a power failure to test it but we got a long one a few days ago. (Before that we had some but they were short-lived so perhaps the time difference ...
by marciokoko
Mon Jul 30, 2018 5:02 pm
Forum: Beginners
Topic: Using bluetoothctl commands doesnt work for me
Replies: 4
Views: 206

Re: Using bluetoothctl commands doesnt work for me

Thanks @Douglas6, I posted back in the original thread. This post was actually meant to be for Invalid Commands error I was getting. The solution to that seems to be that I had to be inside the menu gatt for those commands to work. I was trying to make them work from the main menu.
by marciokoko
Mon Jul 30, 2018 5:01 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1606

Re: Reading response from BLE device on rpi3

ok so i backed up from scripting the commands to using bluetoothctl to make sure they work again. I tried notifications in this way but i still get 00. Is there a special way to read notifications with bluetoothctl? [BT Bee-BLE:/service0010/char0011]# notify on [CHG] Attribute /org/bluez/hci0/dev_00...

Go to advanced search