I would like to make a simple script to push a movie to a Smart TV.
I have already install miniupnp or ushare, but I don't want to go in a folder by the TV Smart Apps, i want to push the movie to the TV, to win time and in future why not make the same directly from a NAS.
Can anyone have an idea how to do this ? This application SofaPlay make it great but only from my mac.
Thanks you
You will still need a DLNA server to host your videos on. Via UPnP you only hand the URL to the TV, not the video directly. Once you have it hosted on a DLNA server, you can find out the URL to a video by playing it in Windows Media Player (which has DLNA-support) or by using UPnP Inspector (which I recommend anyways, if you are going to be working with UPnP). You can then push this URL to the TV, which will download and play the video, if its format is supported.
I do not know my way around python, but you since UPnP is HTTP based, you will need to send an HTTP request with appropriate UPnP-headers (see wikipedia or test it yourself with UPnP Inspector) and the proper XML-formatted body for the function you are trying to use.
The UPnP-function I worked with to push a link to the TV is "SetAVTransportURI", but it might differ from your TV. Use UPnP Inspector to find the correct one, including its parameters.
In summary: Get a DLNA-Server to host you videos on. Find out the links to those videos using UPnP Inspector or other DLNA-clients. Find out the UPnP-function that sends a URL to your TV (again, I recomment UPnP Inspector, you can explore and call all functions with it). Implement a call to that function in your script.
Related
Ok, no code here, more trying to get some directions.
I'm working on my home automation using tuya objects. Till now I was able to create a websocket (using python websockets and asyncio) that gets a message and turn on my devices. I created a flask website to configure passwords, keys etc. Now what I'm trying to achieve is using a NFC tag(scanned by my phone) call the websocket sending a message. I bought some NFC tags, got a an android app called NFC Tools to record data into the NFC tag.
Problem is NFC tools doesnt give me too many options I can add text, and URLs but I dont know how to call my websocket from there. Can I call it using its URL like ws://something.go? Can I make the phone not open a browser when I scam the tag? Should I create a page on flask for that and put the page address?
Anyway, I'm kind of lost. Can you guys point me in the right direction?
The right direction is to write your own NFC app for your phone.
In OS has a basic limited (fallback) idea of how to process the different type of Ndef record types, but it mostly relies on App's registering that they are capable for processing a certain record type.
So the OS can process various URL formats and open a web browser BUT ws: is not a standard URI as defined by the Ndef specs.
Thus the OS has nothing to processes it with.
To solve this you would best to make up your own mimeType string and create an App that registers that it can process this mimeType (Android docs on this, iOS has something similar). Then when you scan your custom Tag and the OS know what App can process this Tag, you app then reads the data and processes it accordingly and open the websocket request itself.
End up creating a get route on flask and using NFC Tools Pro with http get to access it. The route just send a message to my websocket and turn on or off my devices. Thx Andrew for the tip I will have that in mind if this goes anywhere far from a personal project.
I have an unlimited internet connection in my house and a limited internet connection in the school.
I want to make a web browser (or something like that) that navigate from my house, get the data (including the streamings), and resends it to my browser in the school.
In Python, using WebKit, a web browser can be created easily and navigate youtube and other pages, I want to recreate that navigation in the other web browser (the one connected in my school).
School browser ⟶ send request to program or another Web browser ⟶ get page data (including streaming) ⟶ tunneling ⟶ sent to school browser.
It’s something like to do a remote web browser.
It sounds like you are trying to make a home private proxy server.
There are plenty of guides on how to do this but here's one I found by quickly looking around:
https://null-byte.wonderhowto.com/how-to/sploit-make-proxy-server-python-0161232/
Depending on your school's restriction method, a proxy server may not be enough to bypass their restrictions. You may also be able to overcome this by completely encrypting communications between your home network and your school system. To do this you would need to set up a home virtual private network (VPN). There are also many guides that you can use to achieve this.
I am developing an amazon Alexa skill to stream our music from the web.
I would like to have a database of mp3s that is accessible by my app but the mp3s should not be public for download but only for streaming. Thus spotify or soundcloud don't seem to me like good options.
I was thinking to set up a home server where to physically store the mp3s thus having easy access to their urls to pass to the Alexa's AudioPlayer, but I have little experience in setting up servers.
Do you have any alternative workaround suggestions for my issue?
In case the home server might seem a reasonable option to you, where can I start to understand how to do that?
(I code mainly in Python and I know very little of Django)
So excited for My first post in Stackoverflow! :)
Q: I'm recording and processing sounds using python (pyaudio + scipy). now one important thing that I need, is the ability to streaming this processed audio(that's in form of python Variables),Over wifi (or bluetooth). User clients that connecting to my server, should can play that sound for Live. But really I haven't any background about web/net based application in python.
I'm thinking this way :
Maybe linux should establish a server(become a Access point) and give access to users for playing streamed audio using a simple html page! This webpage maybe need just a play button that when client click on that,and live streaming audio will be played!
Can anybody guide me in right way?
I have developed a face recognition software.It detects and identify human faces infront of the connected web camera.Now I need to deploy it in a website.so that,Anyone with a computer should be able to access this service through this website and should be able to perform face detection and identification using the camera in his premises.
Is it possible to integrate python application with website?
Is Django framework is suitable for my work?
Can anybody recommed any tutorials in this direction?
This has got absolutely nothing to do with Django. Django is running in your server, whereas you need to capture image at your client. Therefore it has to do about your front-end and not your back-end.
Traditionally this has been a feature not at all possible. A web browser could not access the client's peripherals and end of story. Flash, activex etc have been workarounds for this.
HTML5 now allows it. Read more on MDN about MediaDevices.getUserMedia().
Unfortunately this is still fresh at the time of writing and is only supported by some browser versions: read more on caniuse.com.
You could use some js library for feature detection such as modernizr.