# only perform reset if inside a defined time window (from 7AM to 11PM, for example) Wget -O /dev/null -q " while /bin/true do # say Hello World to the Domoticz Log after waiting a bit for network to be up SBNAME="Livingroom" # Name of the squeezebox (to appear in the Domoticz log) Note curl is not available so wget is used !ĭOMO="192.168.178.12:8080" # IP and port of your Domoticz instance # The script is installed and run on the squeezebox player itself via ssh. # Script to check if a Squeezebox Radio is shown as 'Disconnected' in Domoticz and reboot itself if so. Using this 'take a look under the hood' from the browser method, you can often figure out how to do things in Domoticz that are not normally documented. So you can see that, to Domoticz, an SB player is just a switch that can be turned on or off. If you do this with a Squeezebox player icon, you will see that the following is actually sent to the Domoticz engine when you power a player on, for example: If you now click on a Domoticz UI button you will see here what underlying URL is associated with the command that is actually sent onwards to Domoticz by that click. Go to the 'network' tab in the pane that now splits your screen. Using MS Edge as the browser for example, you can get to developer tools by pressing CTRL-U or F12. If you open Domoticz in a web browser and select 'developer tools' or its equivalent, you can see what is sent from your browser back to the Domoticz engine when you click on something. Remember that the Domoticz UI in a web browser communicates with the Domoticz server via your network (http). What exactly are you trying to achieve? Maybe I can suggest an overall solution rather than helping to get a sub-optimal solution to work. The sections you highlighted are related to checking if a player is disconnected before wasting time talking to it, and to saving it's current 'state' so that after playing an alert we can return to normal. No, there's no rebooting done in my code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |