Go to advanced search

by joseplaselva
Fri Feb 07, 2020 4:34 pm
Forum: Python
Topic: How to connect to a determinate wifi network from a script
Replies: 0
Views: 88

How to connect to a determinate wifi network from a script

I have several wifi networks running at my home and I need that my raspberry device runs a python script that connect to a determinate wifi at a determinate time automatically. I have read a lot about this and tried multiple solutions but I still haven't found any that work for me. Does anyone know ...
by joseplaselva
Sun Jan 26, 2020 2:46 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Thanks very much Daugie for your patience and great help. Have a nice sunday
by joseplaselva
Sun Jan 26, 2020 2:13 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Surprise, I tryed again and it works !!!!!!!!!!!!!!!!!!!!!!!!!! I don´t know what I have done... but now it's running.... I must try again to see if I get the same results... ======================= RESTART: /home/pi/test-html.py ======================= b'<?xml version="1.0" encoding="UTF-8"?>\r\n<c...
by joseplaselva
Sun Jan 26, 2020 2:07 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

New test with all dhcp stuff dissabled... first a ping to the camera network : [email protected]:~ $ ping 192.168.54.1 PING 192.168.54.1 (192.168.54.1) 56(84) bytes of data. 64 bytes from 192.168.54.1: icmp_seq=1 ttl=64 time=1.69 ms 64 bytes from 192.168.54.1: icmp_seq=2 ttl=64 time=1.55 ms 64 bytes fr...
by joseplaselva
Sun Jan 26, 2020 12:03 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Now I comment the eth0 configuration: #interface eth0 #static ip_address=192.168.0.44/24 #static routers=192.168.0. #static domain_name_servers=192.168.0.1 and change pi device ip to : static ip_address=192.168.54.44/24 after run "ip route" I get : default via 192.168.54.1 dev wlan0 src 192.168.54.4...
by joseplaselva
Sun Jan 26, 2020 11:44 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Strange that in the "ip route" command appears the eth0 ip numbers of 192.168.0.0/24 and 192.168.0.44 (????) but in the "route print" command in the PC not.
by joseplaselva
Sun Jan 26, 2020 11:34 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Here comes the test on raspberry : first detecting camera network : [email protected]:~ $ sudo wpa_cli -i wlan0 scan_results bssid / frequency / signal level / flags / ssid ...... e8:e8:b7:ad:29:04 2462 -43 [WPA2-PSK-CCMP][WPS][ESS] LX15-AD2904 Raspi conected to camera network: [email protected]:~ $ ip ro...
by joseplaselva
Sun Jan 26, 2020 11:20 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

I gonna try with :

Code: Select all

interface wlan0
static ip_address=192.168.54.44/24
static routers=192.168.54.1
static domain_name_servers=192.168.54.1
because is no router between camera and raspi device it's a direct connection
by joseplaselva
Sun Jan 26, 2020 10:33 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Awaiting to charge battery I would ask you if I need to change something in the file "/etc/dhcpcd.conf" , ussually I have this configuration to work remotely with the raspi device: interface eth0 static ip_address=192.168.0.44/24 static routers=192.168.0. static domain_name_servers=192.168.0.1 inter...
by joseplaselva
Sun Jan 26, 2020 10:16 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

This is what I get when using Win10 in my PC C:\Users\josep>netsh wlan connect name="LX15-AD2904" Connection request was completed successfully. C:\Users\josep>route print =========================================================================== Interface List 26...ba 12 4e 0a 7b 4c ......Microsof...
by joseplaselva
Sun Jan 26, 2020 9:18 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Hi, it's very strange what's up : I start the wifi in the camera and when: [email protected]:~ $ sudo wpa_cli -i wlan0 scan_results bssid / frequency / signal level / flags / ssid ....... e8:e8:b7:ad:29:04 2437 -48 [WPA2-PSK-CCMP][WPS][ESS] LX15-AD2904 It appears the camera SSID : LX15-AD2904 , then I ...
by joseplaselva
Sat Jan 25, 2020 8:46 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

The camera has a static ip : 192.168.54.1 and I can connect to this ip as show in the menu bar icon of wifi but no way to send commands like I do with the PC and browser... [email protected]:~ $ sudo iwlist wlan0 scan |egrep 'SSID|Address|Signal' Cell 04 - Address: E8:E8:B7:AD:29:04 Quality=56/70 Signa...
by joseplaselva
Sat Jan 25, 2020 8:06 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Thanks for your script , I've tried it but I can't access the camera despite being connected to your network , I get this : Traceback (most recent call last): File "/home/pi/test-html.py", line 9, in <module> curl.perform() pycurl.error: (7, 'Failed to connect to 192.168.54.1 port 80: No route to ho...
by joseplaselva
Sat Jan 25, 2020 4:04 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

Well ,In the end I managed to shoot the camera through the computer and the browser ( conected to the camera wifi network) with the following command : http://192.168.54.1/cam.cgi?mode=camcmd&value=capture Now I need some help to emulate this html command with python script to do the same with Raspb...
by joseplaselva
Thu Jan 23, 2020 10:10 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

I get the same response : [email protected]:~ $ sudo gphoto2 --capture-image *** Error *** An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sd...
by joseplaselva
Wed Jan 22, 2020 10:39 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

This is what I get when connecting my Raspberry and my camera through USB : [email protected]:~ $ gphoto2 --auto-detect --list-config Model Port ---------------------------------------------------------- Panasonic DMC-FS62 usb:001,006 *** Error *** An error occurred in the io-library ('Could not claim ...
by joseplaselva
Mon Jan 20, 2020 8:58 pm
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Re: Shooting Panasonic Lumix camera through wifi and Python scripts

In the list appears LX7 that have no wifi connectivity .In LX15 the USBis for charge battery , print and access to files when conected to a PC.Just a data output and not imput...
by joseplaselva
Mon Jan 20, 2020 10:34 am
Forum: Advanced users
Topic: Shooting Panasonic Lumix camera through wifi and Python scripts
Replies: 25
Views: 874

Shooting Panasonic Lumix camera through wifi and Python scripts

I would like to control a digital camera Panasonic Lumix Lx-15 with my Raspberry pi through wifi, sending commands generated with python scripts. I have been trying to use gphoto2 but this camera do not have USB conectivity. I try to find the way to hack wich commands use the app "Panasonic Image Ap...
by joseplaselva
Mon Jan 13, 2020 5:46 am
Forum: Troubleshooting
Topic: Connect to a wifi network when main ethernet network lost internet connection
Replies: 2
Views: 210

Re: Connect to a wifi network when main ethernet network lost internet connection

Thanks for your early reply, lot of information founded in this post. Time now to test .
by joseplaselva
Sun Jan 12, 2020 7:26 am
Forum: Troubleshooting
Topic: Connect to a wifi network when main ethernet network lost internet connection
Replies: 2
Views: 210

Connect to a wifi network when main ethernet network lost internet connection

I have my rasperry sending data trought internet conectet by ethernet cable to a router, as I have many problems with my adsl and some times it losses my internet, I would like automaticaly stwich to a secondary wifi network. How can I do this in the two ways, conect to wifi when ninternet is no ava...
by joseplaselva
Thu Jan 02, 2020 10:32 am
Forum: Python
Topic: Running a function from outside the script
Replies: 6
Views: 359

Re: Running a function from outside the script

Thank a lot for your suggestions and comments
by joseplaselva
Thu Jan 02, 2020 9:22 am
Forum: Python
Topic: Running a function from outside the script
Replies: 6
Views: 359

Re: Running a function from outside the script

Thanks for your early reply, but I can't see the way to use module for what I want to obtain. I want to force to run a function inside the script as if I was pressing a button widget manually but made from a button placed on another script in the same raspberry device, interact between 2 differents ...
by joseplaselva
Thu Jan 02, 2020 5:21 am
Forum: Python
Topic: Running a function from outside the script
Replies: 6
Views: 359

Running a function from outside the script

Hi, I have a function in a running script(mainScript) that reads the values saved on a txt file in order to update the bg values of some tkinters labels. I would like to run this function from outside the script ( script2 ) without stoping the first script(mainScript) The function is this: def ledsU...
by joseplaselva
Wed Jan 01, 2020 8:15 pm
Forum: Python
Topic: How to know if a device is on or off from another device
Replies: 4
Views: 220

Re: How to know if a device is on or off from another device

Thaks for your sugestion, after some research I found one that help me :

Code: Select all

import os
hostname = "192.168.1.38"
response = os.system ("ping -c 5 " +hostname)

if response ==0:
    print(hostname, "is up")
else:
    print(hostname, "is down")
by joseplaselva
Wed Jan 01, 2020 6:27 pm
Forum: Python
Topic: How to know if a device is on or off from another device
Replies: 4
Views: 220

Re: How to know if a device is on or off from another device

How implement this on a script?

if device XXXXXX is running
do this
if not
do that

Go to advanced search