[RE-RELEASE] iRobot Scheduler

@dkilgore90 Thanks for the reply. here is the info:

192.168.1.199:3000/api/local/info/state/

{"batPct":100,"batteryType":"F12432832P","batInfo":{"mDate":"2021-6-23","mName":"PanasonicEnergy","mDaySerial":13224,"mData":"000500040000000000000000000000000000000000","mLife":"0C5C0B0D10860B4C4F2F001504DDF56300D0FE8B2D0AFFFF000019E300000000","cCount":91,"afCount":0},"batAuthEnable":true,"bbchg":{"nChatters":3,"nKnockoffs":13,"nLithF":0,"nChgOk":142,"aborts":[0,0,0],"chgErr":[0,0,0,0,0],"smberr":8,"nChgErr":0},"bbchg3":{"estCap":2061,"nAvail":332,"hOnDock":6277,"avgMin":101},"bbmssn":{"aCycleM":62,"nMssnF":35,"nMssnC":33,"nMssnOk":103,"aMssnM":121,"nMssn":171},"bbnav":{"aMtrack":50,"nGoodLmrks":0,"aGain":0,"aExpo":0},"bbpause":{"pauses":[46,46,18,36,5,46,15,5,2,2]},"bbrstinfo":{"nNavRst":57,"nMapLoadRst":0,"nMobRst":62,"nSafRst":0,"safCauses":[0,0,0,0,0,0,0,0,0,0]},"bbrun":{"nOvertemps":0,"nCBump":11,"nWStll":8,"nMBStll":11281,"nPanics":617,"nPicks":87,"nPiezoDD":0,"nStuck":50,"nScrubs":0,"sqft":439,"nEvacs":234,"min":17,"nOpticalDD":0,"hr":123,"nCliffsF":2651,"nCliffsR":0},"bbswitch":{"nBumper":168428,"nDrops":621,"nDock":24,"nSpot":39,"nClean":55},"bbsys":{"min":4,"hr":6643},"behaviorFwk":true,"bin":{"present":true,"full":false},"binPause":true,"cap":{"binFullDetect":2,"oMode":2,"dockComm":1,"edge":0,"maps":3,"pmaps":6,"mc":0,"tLine":2,"area":1,"eco":1,"multiPass":3,"team":1,"pp":0,"lang":2,"5ghz":0,"prov":3,"sched":1,"svcConf":1,"ota":2,"log":2,"langOta":2},"carpetBoost":false,"childLock":false,"cleanMissionStatus":{"cycle":"none","phase":"charge","expireM":0,"rechrgM":0,"error":0,"notReady":0,"condNotReady":[],"mssnM":0,"expireTm":0,"rechrgTm":0,"mssnStrtTm":1667417838,"operatingMode":0,"initiator":"manual","nMssn":171,"missionId":"01GGWXJ4DG9M2MV4THZAXNDPAX"},"cleanSchedule2":[],"cloudEnv":"prod","connected":true,"country":"US","deploymentState":0,"dock":{"known":true,"pn":"unknown","state":301,"id":"B135B308CF0014E44F64E5C1B7A62E5E","fwVer":"4.2.3","hwRev":1,"varID":4},"evacAllowed":true,"ecoCharge":false,"featureFlags":{"childLockEnable":1,"hibLed":0,"covPlan":0,"ros2SptLvl":true,"clearHaz":true,"umcsIfNotDrc":1,"quietNav":true},"hwPartsRev":{"csscID":0,"mobBrd":6,"mobBlid":"85872AB38681345E853D6A9FA7A664EF","imuPartNo":"BMI088","navSerialNo":"JADH180C34","wlan0HwAddr":"50:14:79:41:7b:1a","NavBrd":2},"hwDbgr":null,"langs2":{"sVer":"1.0","uLangs":null,"dLangs":{"ver":"0.3","langs":["de-DE","en-US","es-ES","fr-CA","it-IT"]},"sLang":"en-US","aSlots":1},"lastCommand":{"command":"dock","initiator":"localApp","time":1667433445},"lastDisconnect":2,"mapUploadAllowed":true,"missionTelemetry":{"aux_comms":1,"backup_counts":1,"bat_stats":1,"behaviors_report":1,"camera_settings":1,"coverage_report":1,"map_hypotheses":1,"map_load":1,"map_save":1,"mboe_landmark_stats":1,"mboe_reloc":1,"mission_stats":1,"pmap_navigability":0,"sensor_stats":1,"tumor_classifier_report":1,"vital_stats":1,"vslam_report":1},"name":"Jargersfel","noAutoPasses":true,"noPP":false,"openOnly":false,"pmapLearningAllowed":true,"pmaps":[{"l19j3kCiSdmHPGpkcF1eXQ":"221101T184939"}],"pmapShare":{"copy":[5]},"rankOverlap":15,"reflexSettings":{"rlWheelDrop":{"enabled":0}},"sceneRecog":1,"schedHold":false,"secureBoot":{"flip":-1,"lastRst":"unknown","recov":"linux+4.0.4.4+daredevil-release+113","idSwitch":0,"TSK":"PRODUCTION","permReq":0,"perm":"none"},"sku":"i355020","softwareVer":"daredevil+2.4.7+daredevil-release+150","subModSwVer":{"nav":"daredevil-nav+2.4.7+ubuntu-HEAD-6801fbec1f0+150","mob":"2.4.7+ubuntu-HEAD-6801fbec1f0+150","pwr":"0.6.0+ubuntu-HEAD-6801fbec1f0+150","sft":"1.1.0+Daredevil-Builds/Daredevil-Certified-Safety/daredevil-safety-71fa0661da6+6","mobBtl":"4.2","linux":"linux+4.0.4.5+daredevil-release+150","con":"3.13.0.6-tags/release-3.13.0.6@2beb3929/"},"svcEndpoints":{"svcDeplId":"v005"},"timezone":"America/Anchorage","tls":{"tzbChk":1,"privKType":2,"lcCiphers":[0,0,0,0,0,0,0,50380848,50336513,50336514]},"twoPass":false,"tz":{"events":[{"dt":1664625600,"off":-480},{"dt":1667728801,"off":-540},{"dt":1678618801,"off":-480}],"ver":16},"vacHigh":false,"netinfo":{"dhcp":true,"addr":"192.168.1.87","mask":"255.255.255.0","gw":"192.168.1.1","dns1":"192.168.1.1","dns2":"0.0.0.0","bssid":"d0:21:f9:b9:a6:05","sec":4},"signal":{"rssi":-48,"snr":16,"noise":-64},"wifistat":{"wifi":1,"uap":false,"cloud":14},"wlcfg":{"sec":4,"ssid":"466F785F46616D696C79"},"mssnNavStats":{"nMssn":171,"missionId":"01GGWXJ4DG9M2MV4THZAXNDPAX","gLmk":0,"lmk":0,"reLc":4,"plnErr":"none","mTrk":50,"kdp":0,"sfkdp":0,"nmc":1,"nmmc":0,"nrmc":0,"mpSt":"idle","l_drift":0,"h_drift":0,"l_squal":0,"h_squal":40}}
iRobot Scheduler - Jargersfel
Settings
Name	Type	Value
BraavaYes	bool	false
day0	time	10:00 AM
debounce	bool	false
doritaIP	text	192.168.1.199
doritaPort	number	3000
enableSchedule	bool	true
logEnable	bool	true
logMinutes	text	0
logVerbose	bool	true
modesYes	bool	false
pollInterval	enum	0.5
pushoverBin	bool	false
pushoverDead	bool	false
pushoverdevice	capability.notification	[ Hubitat Presence Allen's Phone ]
pushoverDock	bool	true
pushoverError	bool	true
pushoverStart	bool	true
pushoverStop	bool	true
pushoverTank	bool	false
pushovertts	bool	true
pushoverUnknown	bool	true
resetApp	bool	false
roomba900	bool	false
roombaafterday	bool	false
roombaalwaysFinish	bool	false
roombaBattery	enum	10
roombaBatteryLevel	enum	60
roombacarpetBoost	enum	auto
roombacleaningPasses	enum	auto
roombaDelayDay	bool	true
roombaedgeClean	bool	false
roombaI7	bool	true
roombaOff	enum	dock
roombaOn	enum	start
roombaOrderedCleaning	bool	false
roombaPresence	capability.presenceSensor	[ Unifi Cyndi Presence, Unifi Allen Presence ]
roombaPresenceClean	bool	true
roombaPresenceCleandelay	text	0
roombaPresenceDelay	bool	true
roombaPresenceDelayTime	text	90
roombaPresenceDock	bool	true
schedDay	enum	["0","1","2","3","4","5","6"]
timeperday	text	1
useBattery	bool	true
useLocalImages	bool	false
usePresence	bool	true
useTime	bool	false
Event Subscriptions
Source	Event	Handler	Filter
Hubitat Presence Allen's Phone	presence	presenceHandler	true
Unifi Allen Presence	presence	presenceHandler	true
Unifi Cyndi Presence	presence	presenceHandler	true
Application State
Name	Type	Value
batterydead	Boolean	false
cleaning	String	charging
DaysSinceLastCleaning	Integer	4
docked	Boolean	true
error	Boolean	false
errors	Boolean	false
lastcleaning	Long	1667329045045
lastcleaningcycle	String	11/01/2022 10:57 AM
notified	Boolean	false
presence	Boolean	false
prevcleaning	String	charging
pushoverBinMsg	String	Jargersfel's bin is full
pushoverDeadMsg	String	Jargersfel battery has died
pushoverDockMsg	String	Jargersfel is charging
pushoverErrorMsg	String	Jargersfel has stopped because
pushoverErrorMsg16	String	stuck on an object
pushoverErrorMsg2	String	both wheels are stuck
pushoverErrorMsg3	String	left wheel is stuck
pushoverErrorMsg4	String	it is wedged under something
pushoverErrorMsg7	String	cleaning bin is missing
pushoverStartMsg	String	Jargersfel has started cleaning
pushoverStopMsg	String	Jargersfel has stopped cleaning
pushoverTankMsg	String	Jargersfel's tank is missing/empty
roombaName	String	Jargersfel
schedDelay	Boolean	true
sendBinNotification	Boolean	true
sendTankNotification	Boolean	true
startDelayTime	Long	1667678637667
Scheduled Jobs
Handler	Next Run Time	Prev Run Time	Status	Schedule
updateDevices	2022-11-05 4:20:30pm AKDT	2022-11-05 4:20:00pm AKDT	PENDING	0/30 * * * * ?

Child Devices
Jargersfel


Sorry to be a pain, but I'm getting this error repeating every 30s via debug logging;

app:18502022-11-06 15:19:30.256warnRetrying updating devices in 30 seconds.

app:18502022-11-06 15:19:30.253erroriRobot cloud error. java.lang.NullPointerException: Cannot get property 'tankPresent' on null object

app:18502022-11-06 15:19:00.408warnRetrying updating devices in 30 seconds.

app:18502022-11-06 15:19:00.405erroriRobot cloud error. java.lang.NullPointerException: Cannot get property 'tankPresent' on null object

Also, I started my Braava Jet M6 via the iRobot app, but the tile information hasn't updated at all. Stays on "Charging" and battery at 100%. The device "Current states" for last activity/clean status/schedules/switch are all incorrect, but strangely the battery state is correct, and in the device events the battery drop is being reported, even though the tile is still reporting the battery as 100%. Is this normal behaviour when starting a job from the iRobot app? Does it only report correctly if the job is initiated via Hubitat?


The errors you're seeing are related to the dashboard tile not updating. Seems expected data from your mop isn't in the response.... Maybe a firmware update changed something?

There's definitely some better null handling to be be put in... Will work on that. Can you send the api/local/info/state data for your mop?

I haven't done any firmware updates, but its most likely on the latest firmware.

This is what I grabbed from it when it was running earlier;

{"audio":{"volume":100},"batPct":42,"batteryType":"F12432784","batInfo":{"mDate":"2020-11-2","mName":"Panasonic","mDaySerial":3796,"mData":"303030393034303200000000000000000000000000","mLife":"0C090B34100F09BF3511000A03BBF359006FFEA7220E0000000022DA00000000","cCount":37,"afCount":0},"batAuthEnable":null,"bbchg":{"nChatters":304,"nKnockoffs":509,"nLithF":15,"nChgOk":112,"aborts":[26,20,0],"chgErr":[0,0,0,0,0],"smberr":19712,"nChgErr":0},"bbchg3":{"estCap":1922,"nAvail":769,"hOnDock":8873,"avgMin":107},"bbmssn":{"aCycleM":83,"nMssnF":13,"nMssnC":18,"nMssnOk":35,"aMssnM":117,"nMssn":67},"bbnav":{"aMtrack":0,"nGoodLmrks":0,"aGain":0,"aExpo":0},"bbpause":{"pauses":[46,43,46,4,18,17,35,17,9,18]},"bbrstinfo":{"nNavRst":73,"nMapLoadRst":0,"nMobRst":65,"nSafRst":0,"safCauses":[17,0,0,0,0,0,0,0,0,0]},"bbrun":{"nOvertemps":0,"nCBump":1,"nWStll":1,"nPicks":206,"nPanics":323,"nStuck":21,"nCliffsF":1696,"nCliffsR":0},"bbswitch":{"nBumper":256052,"nDrops":599,"nDock":17,"nSpot":4,"nClean":49},"bbsys":{"min":12,"hr":9168},"behaviorFwk":null,"cap":{"oMode":4,"edge":0,"maps":3,"pmaps":10,"mc":2,"tHold":1,"tLine":2,"area":1,"eco":1,"multiPass":2,"team":1,"pp":0,"pose":2,"lang":2,"5ghz":1,"prov":3,"sched":2,"svcConf":1,"ota":2,"log":2,"langOta":0,"ns":1,"tileScan":1},"childLock":false,"chrgLrPtrn":0,"cleanMissionStatus":{"cycle":"clean","phase":"run","expireM":0,"rechrgM":0,"error":0,"notReady":0,"condNotReady":[],"mssnM":0,"expireTm":0,"rechrgTm":0,"mssnStrtTm":1667738836,"operatingMode":4,"initiator":"rmtApp","nMssn":67,"missionId":"01GH6FP7109FK0METZ1SPWWRDJ"},"cleanSchedule2":[],"cloudEnv":"prod","connected":false,"country":"GB","deploymentState":0,"detectedPad":"reusableWet","dock":{"known":true},"ecoCharge":false,"featureFlags":{"pmapSharing":0,"reachableSpaceFlags":1,"stratParams":0,"childLockEnable":1,"covHybridPlan":0,"trainingStrategy":1,"covPlan":0,"chrgLrPtrnEnable":1,"clearHaz":true},"hwPartsRev":{"mobBrd":11,"mobBlid":"B3ED81EC25D3190F534F95470F0AF4DF","imuPartNo":"BMI055","lrDrv":"LP5018","navSerialNo":"CD10C51DS","wlan0HwAddr":"50:14:79:8b:32:0d","NavBrd":1},"hwDbgr":null,"langs2":{"sVer":"1.0","dLangs":{"ver":"0.33","langs":["ar-SA_1","ar-SA_2","cs-CZ_1","cs-CZ_2","da-DK_1","da-DK_2","de-DE_1","de-DE_2","en-GB_1","en-GB_2","en-US_1","en-US_2","es-ES_1","es-ES_2","es-XL_1","es-XL_2","fi-FI_1","fi-FI_2","fr-CA_1","fr-CA_2","fr-FR_1","fr-FR_2","he-IL_1","he-IL_2","it-IT_1","it-IT_2","ja-JP_1","ja-JP_2","ko-KR_1","ko-KR_2","nb-NO_1","nb-NO_2","nl-NL_1","nl-NL_2","pl-PL_1","pl-PL_2","pt-BR_1","pt-BR_2","pt-PT_1","pt-PT_2","ru-RU_1","ru-RU_2","sv-SE_1","sv-SE_2","tr-TR_1","tr-TR_2","zh-CN_1","zh-CN_2","zh-HK_1","zh-HK_2","zh-TW_1","zh-TW_2"]},"sLang":"en-GB_1","aSlots":0},"lastCommand":{"command":"start","favorite_id":"f74974d898a64609fdc0941ebbf65d64","initiator":"rmtApp","robot_id":"7C55B234A1374BEA946DAF74CFB2F75A","time":1667738836},"lastDisconnect":0,"lidOpen":false,"mapUploadAllowed":true,"missionTelemetry":{"aux_comms":1,"bat_stats":1,"behaviors_report":1,"camera_settings":1,"coverage_report":1,"map_hypotheses":1,"map_load":1,"map_save":1,"pmap_navigability":1,"roomseg_report":1,"sensor_stats":1,"tumor_classifier_report":1,"visual_stasis_report":1,"vital_stats":1,"vslam_report":1},"mssnNavStats":{"nMssn":66,"missionId":"01GH3FGQH8HHAG71TN0GS8HEM8","gLmk":8,"lmk":1,"reLc":0,"plnErr":"none","mTrk":0,"kdp":0,"sfkdp":0,"nmc":1,"nmmc":1,"nrmc":0,"mpSt":"idle","l_drift":0,"h_drift":0,"l_squal":0,"h_squal":0},"name":"Rosita","noAutoPasses":false,"openOnly":false,"optFeats":{"pmaps":null},"padWetness":{"disposable":3,"reusable":3},"pmapLearningAllowed":true,"pmaps":[{"8tNqhafjRxiBZyozgrzTsg":"221026T111810"}],"pmapCL":true,"pmapSGen":4,"pmapShare":{"copy":[1,2,3,4,6],"share":null},"rankOverlap":85,"reflexSettings":{"rlWheelDrop":{"enabled":0}},"runtimeStats":{"min":52,"sqft":112,"hr":100},"sceneRecog":null,"schedHold":false,"secureBoot":{"log":2,"flip":0,"sbl1Ver":"B3.2.02_PPUB","stublVer":"B3.2.03_PPUB","efuse":1,"blType":1,"enforce":2,"lastRst":"200000001","recov":"linux+4.15.0+Firmware-Build+1339","idSwitch":0,"permReq":0,"perm":"none"},"sku":"m613840","softwareVer":"sanmarino+22.29.3+2022-08-23-eb90240ea48+Firmware-Build+1832","subModSwVer":{"nav":"sanmarino-nav+22.29.3+ubuntu-HEAD-eb90240ea48+1832","mob":"22.29.3+ubuntu-HEAD-eb90240ea48+1832","pwr":"0.3.0+ubuntu-HEAD-eb90240ea48+1832","sft":"1.4.0+ubuntu-HEAD-9a9a5d0c891+29","mobBtl":"4.3","linux":"linux+4.20.0+Firmware-Build+1832","con":"3.14.4-tags/release-3.14.4@050d359d/ubuntu"},"svcEndpoints":{"svcDeplId":"v005"},"tankLvl":100,"tankPresent":true,"timezone":"Europe/London","tls":{"tzbChk":1,"privKType":2,"lcCiphers":[0,0,0,0,0,0,0,0,50380848,50331708]},"twoPass":false,"tz":{"events":[{"dt":1664625600,"off":60},{"dt":1667091601,"off":0},{"dt":1679792401,"off":60}],"ver":16},"netinfo":{"dhcp":true,"addr":"192.168.20.25","mask":"255.255.255.0","gw":"192.168.20.1","dns1":"1.1.1.2","dns2":"1.0.0.2","bssid":"fe:92:bf:52:8b:50","sec":4},"signal":{"rssi":-50,"snr":28,"noise":-78},"wifistat":{"cloud":14,"wifi":1,"uap":false},"wlcfg":{"sec":4,"ssid":"41726561203531202D20496F54"}}

It says in the iRobot app that the software version is 22.29.3, updated on the 9th of October.

Update - Strangely, the tile is only displaying the .png image on my laptop, my phone looks like this;

I enabled "use local images" yesterday after uploading all the .png files via file manager, but that seems to have knocked out my iPhone tile. I reverted back to the original setting, but the .png is still missing from my phone.

Interesting, same firmware version as my braava mop, but a couple attributes reporting at different levels in the JSON.

Regarding the tile, likely your phone is connecting to the cloud dashboard, which doesn't work with local images. Plausible that sure to some of the above issues we've discussed, it hasn't successfully updated since you flipped it back.

The whole thing works on a polling model to update the state in Hubitat, so it should not matter whether you control from Hubitat or from the irobot app.

I pushed a couple updates to handle the attributes from your JSON (and hopefully better handle if a null is hit) in app version 1.6.4 -- fingers crossed that this helps with your issues. If not, please enable both logging toggles in the App (debug and verbose state change), and on the Hubitat Device page -- and provide updated logs; together we can isolate remaining hiccups and get a successful workflow operating for you!

Just tested and it seems to be working perfectly now, .png images update quickly, messages are generated from the app, and the update even fixed the missing .png on my phone!! Thanks very much for your help buddy, you're a star!! :+1: :+1: :+1:

Glad Evojim got that worked out! @dkilgore90 any luck on tracking down the null values? I posted the states a few days back. Thanks for any help you can provide!

Argh, sorry @wafox - I lost track of which username was posting. At least one of the updates I put in the App yesterday should help, can you give that a go? As with @evojim, if you still have trouble then please enable all of the logging toggles in the Hubitat app and device (maybe do that before you test), and provide the latest set. We'll get you straightened out, too!

No worries, thankful for the help. I tried the new version - same thing.

Can you go to the App page and click "Done"? This should initialize some vars and avoid at least one of the null errors.

Current state:

This only seems to be with presence. I'm doing a bit more testing and will report back here shortly.

okay - so a bit more digging. The app is not working at all for me. The device is working fine.

Reinstalled from scratch and reset states. What I'm doing for testing is just setting nothing but the schedule (everything else is off). One time a day, Friday (today), at some time a few minutes in the future.

Device works if I control it from the device itself. Schedule are ignored and Prescence fails with the errors in the screenshot above. Seems like this might be due to it not seeing any schedules. When I go to the device and pause all schedules this is what I get:

If I tell it to "start" from the device, it will clean.

If I schedule a time for it to run it just does nothing - nothing in the logs at all. it's like the schedule does not exist. When I hit "done" on the app page after setting the schedule/time I get the following

but again, if I go pause them from the device, I just get logs showing there are no schedules.

Thanks for this -- a bit more staring at the code, and I found some inconsistent logic when no Hubitat-based schedules exist. Added fixes in app:1.6.5. Please pull the latest App code, click Done in the App page to update any missing state vars.

EDIT: more staring, found one more issue. Will fix later tonight.

@wafox please try app:1.6.6 -- I believe I've fixed the issues you reported above.

Just noticed that the “schedules” and “tank” states in the device page don’t seem to be updating correctly. I don’t have any schedules setup, but the state is active, and the tank is reading as good, even though it’s currently removed from the mop.

The schedules attribute is used as part of the pause/resume schedules commands - it will report active, whether or not you actually have any schedules, unless the pauseAllSchedules command has been invoked. I could see adding another state - none - that could be reported here, with a little more intelligence... Will consider this for an enhacement.

As to the tank attribute, can you enable verbose state logging and post/DM it? From your last posting, I'm not sure why this wouldn't report accurately, but will take another look.

Thx @evojim for troubleshooting further and providing details in DM -- as you found, the tank status was only being updated when a "Wet" pad was reported on the mop. While technically it only "matters" when a Wet pad is attached, I agree we should report reliably regardless.

App version 1.6.7 is updated to report the tank status regardless of detected pad.