Using Sonos API even though server is not on the same internet - Sonos SOCO & WayScript - sonos

I have made a script that uses the library SOCO, to play songs on my Sonos. I have deployed this script at WayScript. The issue is that WayScript runs it's scripts on it's own server, which isn't connected to my internet.
Therefore, when I try to connect to my Sonos device: SoCo('192.168.1.10'), it can't connect... obviously.
So what do I do? Maybe Sonos provides another way to interact with their devices, even though the server is not connected to the same Wi-Fi.
Thanks in advance,
Villads

Use the Sonos Cloud API, which does not require access to your local Wifi network. https://developer.sonos.com/reference/control-api/

Related

Able to ping the system using IP but not able to access api

My API is running on the Windows system. I'm calling API from another MAC system, but it's just getting a timeout.
I'm able to ping from Mac to Windows and vice versa, but API not working which is running a specific port.
Also, if I'll connect mobile Hotspots then I'm able to call API. But using WIFI router not able to connect.
Please let me know if you have any suggestions
I'm using Windows 11. After I disabled windows defender, I'm able to access API from other systems

Azure webhook triggers a IoT Hub

I want to make a webhook that can be triggered by either get/post and triggers connected IoT devices to a WebSocket.
So, I thought Azure might help to automize this process, instead of writing everything from scratch and run it on a webserver.
I am very new in the Azure world, I found it very complicated to make it working on Azure.
Can you point me to any simple to make it work?
The first thing to do is to decide where you want to connect your devices to. Generally, you'll either use Azure IoT Hub or IoT Central (which uses an IoT Hub anyway). Your question doesn't include any details about your devices, or whether you're developing them yourself, but I'll assume you can connect to either.
If you go for Azure IoT Central, the easiest way to get a webhook going is to create a Logic App and link nodes together to trigger a Command to your device. You can use an HTTP request as the trigger, and use the built-in IoT Central node to trigger your command, example:
If you end up connecting your devices to IoT Hub, you can use Direct Methods, Cloud to Device messages or even Device Twins to communicate with your devices. You can leverage these by creating an Azure Function with an HTTP trigger, and you program the logic to call IoT Hub, which will communicate with your devices. There are a lot of samples on the web that show how to create Functions, or control your device remotely.
There are a lot of ways to go about your scenario, if you need some help from the Microsoft community, you can get a lot of help on Microsoft Q&A.
Update based on the comments:
In this case, the devices are connected to IoT Hub. You can use the Service SDK to run a job that fires a Direct Method to all currently connected devices. This doc describes the process.

Raspberry connecting to WIFI with captive portal

Currently I have learned how to config my Pi to connect to the WIFI with or without a password, however when I wanna use the WIFI in, say a coffee house or a hotel, where the WIFI provided requires logging on a captive portal to get to use it, I know that with a browser it could be easy to do it since the login page appears right up as you open the browser, but how can I do it with my Pi through the command line?
Thank you.
Assuming you are not asking how to script repeatedly connecting to a certain captive portal (this could potentially be accomplished with curl), you probably want to use a text-based web browser like Elinks or Lynx.

Embedded wifi device that can accept terms on a captive portal?

I'm building out an IoT solution for a client and the network admins are insisting that the devices only connect through the guest network, which has a captive portal with terms of service that must be accepted with a UI button press before gaining external internet access. Most IoT Solutions I've looked at so far (electric imp, Spark core) explicitly state that they cannot connect to a captive portal. I've seen other higher-level code for automatically interacting with a captive portal but I have not found a solution that allows an embedded wifi device (like the CC3000) to automatically accept terms on a captive portal.
Has anyone seen or built a custom wifi stack for something like the CC3000 that can recognize and interact with a captive portal? is there another embedded wifi solution (xbee wifi maybe?) that has had success in this area?
I wouldn't solve this problem in the stack. I would go for a high-level code executed automatically after connecting to the network. Some simple script for example which automatically "presses the UI button" for you. Depending on the design of that page this may be as simple as a single http-request.
Another solution (maybe): Depending on the Wifi-Modules you've chosen the MAC-Addresses of your devices are predicable. Maybe the network admins can add a rule to their config to allow these devices on their guest network without the need of that captive portal.
After considering all options, I believe we are going to go embed the behavour into the SparkCore firmware and insert a captive portal check in the wifi connection code.
spark_utilities.cpp line 807 (Internet_Test function)
https://github.com/spark/firmware/blob/master/src/spark_utilities.cpp#L807

Can you change Windows Mobile Device Centre to use a different network from 192.168.55.0/24 for debugging the compact framework?

I have a piece of software I have written that talks to a web service over it's Wifi connection on a Casio WinCE handheld.
Unfortunately the Wifi network and the network created by WMDC (or ActiveSync) to host the debugger connection clash, they are both 192.168.55.0/24. So I can't have them both connected at the same time.
Does anybody know if you can reconfigure WMDC to use a different address range?
I've hunted through the registry but can't see anything obvious, and Google is not turning up anything useful.
Thanks,
James.
Is the development PC on teh same network as the WiFi connection? If so, I'd abandon ActiveSync/WMDC altogetehr and just use ethernet debugging over the same connection that it's using for the web service calls.