Indigo Server not responding

Posted on
Tue Jun 11, 2019 11:44 pm
Turribeach offline
Posts: 246
Joined: Feb 06, 2015
Location: London, UK

Indigo Server not responding

So I woke up this morning and Indigo was not responding this morning. I knew this as triggers didn't fire for lights as I woke around the house. Having said that Indigo was up and running on my Mac. I checked the log events and I found the source of the problem at 1:46am:

2019-06-12 01:46:46.064 Application Received sleep notification from system

After that event all the following log events are mostly plugin error events (UniFIAP, RFXCOM, etc) or triggers triggered by plugins. Obviously it seems Indigo received a sleep notification and shutdown but why? My Mac never sleeps and I have the option "Prevent computer from sleeping automatically when the display is off" in Energy Saver settings. The Mac has been running fine for weeks and I haven't upgraded or changed any MacOS configuration recently (I am on MacOS Mojave 10.14.5). Any ideas?

Posted on
Wed Jun 12, 2019 12:22 am
Turribeach offline
Posts: 246
Joined: Feb 06, 2015
Location: London, UK

Re: Indigo Server not responding

Ummm that’s not very reassuring. Maybe a Indigo could have an option to ignore OS sleep requests? It would make a lot of sense since most people would want to run Indigo 7x24. In fact there are known cases when some Apps block the OS from going to sleep and posts on the web suggest running “pmset -g assertions” to see what app is blocking the OS from sleeping. Is there something that I can do on MacOS to prevent the OS from sleeping?

Posted on
Wed Jun 12, 2019 9:45 am
peszko offline
Posts: 134
Joined: Mar 07, 2012

Re: Indigo Server not responding

I'm not sure if its not OS that is sending an unwanted sleep signal to applications including Indigo. What I had with my system that is running on a UPS is that when power was cut, Indigo got the exactly the same error and started shutting down. This is not what I want. I wanted the system to start shutting down with 10 minutes or so power left, not the second the power is lost (the UPS can run the whole setup including routers and cameras (POE) for about 6 hours). And Yes, id did have the settings set to shut down when ups has 5% power left. I had some other issues with the ups integration so for now i have disconnected the USB cable from ups, and it seems to have solved three problems.

    Immediate sleep on power loss to ups
    Systems insitance on sleeping regardless of settings
    Time machine not backing up as it considered being on battery power

It seems to me as the OS is really aggressive with power usage if it thinks the system is on batteries regardless if its plugged in. Also, myUPS may be providing wrong data to the OS.

Posted on
Wed Jun 12, 2019 2:59 pm
Turribeach offline
Posts: 246
Joined: Feb 06, 2015
Location: London, UK

Re: Indigo Server not responding

I do have an APC UPS connected via USB but I doubt that was the issue. If the UPS went on battery I would have listened to it since it would have beeped. And I have already tested several times my Mac won't shutdown when the power is cut, since the UPS has plenty of battery to run for 30mins or so. I look around and I couldn't find any log files where the UPS data is shown. I did find several interesting events though:

System.log
Code: Select all
Jun 12 01:46:46 MyMacMini-2 cthelper[69]: [main] Received SIGTERM...
Jun 12 01:46:46 MyMacMini-2 fud[81608]: objc[81608]: Class MobileAssetUpdater is implemented in both /System/Library/PrivateFrameworks/MobileAccessoryUpdater.framework/Support/fud (0x10c676ff0) and /System/Library/AccessoryUpdaterBundles/ApplePowerAccessoryUpdater.bundle/Contents/MacOS/ApplePowerAccessoryUpdater (0x10f9f5a68). One of the two will be used. Which one is undefined.


parallels.log
Code: Select all
06-12 01:46:46.063 F /disp:18167:83203/ System events monitor: host going to sleep, prepare
06-12 01:46:46.064 F /disp:18167:83203/ System events monitor: host going to sleep, done
06-12 01:46:46.076 F /disp:18167:83203/ System events monitor: host was wakeup, prepare
06-12 01:46:46.076 F /disp:18167:83203/ System events monitor: host was wakeup, done


pmset -g log
Code: Select all
2019-06-12 01:46:46 +0100 Assertions             PID 61(powerd) Created InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:00  id:0x0xd0000a6a5 [System: PrevDisp SRPrevSleep kCPU kDisp]
2019-06-12 01:46:46 +0100 Assertions             PID 188(coreaudiod) Released PreventUserIdleDisplaySleep "com.apple.audio.context259.preventuseridledisplaysleep" 03:53:09  id:0x0x50000a266 [System: PrevDisp SRPrevSleep IPushSrvc kCPU kDisp]


Here is a good page explaining all the options of the pmset command. If you want to see live data from your UPS run "pmset -g pslog". Sample output:

Code: Select all
2019-06-12 21:56:09 +0100 com.apple.system.powersources
2019-06-12 21:56:10 +0100 com.apple.system.powersources.timeremaining
2019-06-12 21:56:10 +0100 IOPSNotificationCreateRunLoopSource
 -Back-UPS XS 1400U  FW:926.T2 .I USB FW:T2  (id=10485760)   100%; charging present: true


I have also installed the UPS and Battery Monitor plugin from the Plugin Store so I can now monitor the UPS data on my Indigo logs. Create a trigger on the UPS device and use this Python code to log a message to the Indigo Log:

Code: Select all
import datetime

def log(msg):
   indigo.server.log(msg, type="UPS Updated Trigger")

device1 = indigo.devices[1940212093] # "UPS APC XS 1400U"
deviceACPower = str(device1.states["ACPower"])
deviceBatteryLevel = str(device1.states["BatteryLevel"])
deviceBatteryTimeRemaining = str(device1.states["BatteryTimeRemaining"])
deviceCharging = str(device1.states["Charging"])
devicePowerSource = str(device1.states["PowerSource"])
deviceLastChangedDT = device1.lastChanged.strftime("%-d-%B-%Y %-H:%M.%S")

log(deviceLastChangedDT + " / Battery Level: " + deviceBatteryLevel + " / AC Power: " + deviceACPower + " / Battery Time Remaining: " + deviceBatteryTimeRemaining + " / Charging: " + deviceCharging + " / Power Source: " + devicePowerSource)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest