Event Descriptions

Event Descriptions

Skittles App Version 1.1.8.0

Events

The event system in the application allows various machine states to be reported to the portal. All events are cached on the machine and will be sent in time order to the portal whenever possible. The cached events keep the original timestamp of the events, but if you do not see events that you know happened right away, it may be because the machine has internet connectivity issues. The events will be updated as soon as connectivity is re-established.

Event Types

There are three event types reported from the skittles machine to the portal: Information, Warning and Error. Each event type is described below.

Information

Information events are generated to provide feedback on the normal operation of the machine. Previous error events will be cleared by information events.

Warning

Warning events are generated to provide feedback when various triggers occur that may require attention, such as when bin levels near empty or a low dispense count was detected.

Error

Error events are generated to provide feedback when an error condition occurs. Currently when the machine is powered up or rebooted, several error Operational State Offline events will be generated (DPEMS and MDB devices offline) but will be cleared by an Operational State Online information event once the machine is ready to operate.

Event States

All event states are listed here along with their descriptions and trigger conditions.

Any events that occur during an interaction will have the current interactionId included in the event. This allows easier searching for events that correspond to particular interactions (or transactions) in the machine service log.

Any events that correspond to a particular bin, will also have the componentId specified (Bin1 - Bin 8) as part of the event.

Operational State Offline

This event state is always reported as an error along with a description of the cause of the offline state. Possible causes are:

All Bins Empty

This error event occurs when all bins are disabled and there is no more product available to be dispensed.
Note that if the bin was manually enabled, then even if the bin percentage is 0%, the bin will continue dispensing until a zero dispense count is detected, at which time the bin will automatically switch to a disabled state.

DPEMS Offline

This warning event occurs when there is no communication between the DPEMS and the application. It will occur on power up or rebooting, and in normal operation, the state will be cleared within a minute or so.
If this warning persists, the most likely cause is the USB cable connecting the DPEMS to the PC is disconnected, or power is not correctly connected to the board.

Edge Server Not Initialised

This warning event occurs when the network service is unable to initialize. This can happen under several circumstances.
1. The machine is being powered up for the first time and there is no network connection.
2. The machine is connected to the network but has not been assigned to any groups on the portal.
3. The machine is connected to the network and has been assigned to a group, but the group assets have not yet been downloaded.
If the machine does not have internet access (the modem is not installed, is faulty or has bad reception), then these events obviously won’t immediately be reported to the portal (the messages literally cannot be sent), however as mentioned above, all events are cached with the time they occurred, so will be sent once internet communication is re-established.
If the machine has been assigned a group, but is reporting this warning, you can log into the machine via ConnectWise where you can see the current group assigned and any asset download progress on the Out of Service window, or at the top of the Service Mode screen.

No MDB devices Online

This warning event occurs when no MDB devices are connected to the PC or there is a communication error with connected MDB devices.

Payment Processor(s) Initializing

This warning event occurs when no devices are reporting ready to accept payment. 
Note that we clear this warning as long as one of the two devices is reporting ready for payment, so there could still be an error with a second connected device that is not reported. Any ready devices that are not ready to accept payment are automatically removed from the payment page, so the user is still able to purchase using the currently online payment device.

Timeout

This error event occurs when a vend takes longer than 80 seconds. This is the time from the start of a vend until the full cup is rotated to the 180-degree position for the user to remove. If a vend has taken longer than 80 seconds, something has gone wrong, and the machine needs to be physically checked.
Note that there is a 2 minute timeout on the user removing the cup. If the cup is not removed after 2 mintues, we will attempt to reset the DPEMS system and then after another minute, the skittles application will be rebooted. If the cup still has not been removed then there is nothing we can do if the user walks away leaving the skittles. The application will remain in the “Please Remove the Cup” screen until someone physically removes the cup. So, the system will remain in this screen without error, even if the machine reboots or power cycles.

Turntable Calibration Failure

Turntable auto calibration fail: 0 degrees

Turntable auto calibration fail: 90 degrees

Turntable auto calibration fail: 180 degrees

These error events will be reported on start-up if the turntable fails to calibrate.

TT Opto didn't detect TT servo pulse

This error event will be reported during dispense if the turntable gets jammed during a vend operation.

Illegal servo

Turn turntable motor - illegal angle

These error events should never occur, they would indicate a major failure of the DPEMS

Cup dispense timeout

This error event will occur if the cup dispense process attempts to dispense a cup 3 times without success.

Shake - TT Opto didn't detect TT servo pulse

This error event will occur if the turn table shake algorithm fails to detect the 0 degree turntable position.
The turn table shake algorithm is used when a cup is dropped but no cup is detected. The movement of the turn table may shift a dispensed cup to be better detected by the sensor.

Cup jam error

This error event will occur if cups are detected in the dispenser when the cup turret is about to turn.

Turret turn timeout

This error event will occur if the cup turret takes more than 10 seconds to turn to the next turret.

Dispense cup error

This error event will occur if a cup fails to dispense.
Note that dispensing a cup involves the following. Try to dispense a cup. If that fails, turn the cup turret to the next position, if cups are detected falling, then try to dispense a cup. If that fails, repeat 4 more times (once for each cup turret). Finally, a last dispense will be attempted. If this fails, the error will be reported.

Unknown led group

This error event should never occur, it would indicate a low-level bug in the app or DPEMS.

I2c errors

The following errors indicate a major failure of the DPEMS:
i2c read PICO_GENERIC_ERROR
i2c write PICO_GENERIC_ERROR
i2c read PICO_ERROR_TIMEOUT
i2c write PICO_ERROR_TIMEOUT
i2c read PICO_ERROR_NO_DATA
i2c write PICO_ERROR_NO_DATA
i2c read PICO_ERROR_INVALID_ARG
i2c write PICO_ERROR_INVALID_ARG
i2c read PICO_ERROR_IO
i2c write PICO_ERROR_IO
i2c read PICO_ERROR_NONE
i2c read PICO_ERROR_NONE
i2c read PICO_ERROR_NOT_PERMITTED
i2c write PICO_ERROR_NOT_PERMITTED
i2c read bytes mismatch: x!=y
i2c write bytes mismatch: x!=y
If they are ever reported, they indicate a serious error in the DPEMS.

No Pricing In Group

This error event should never occur as a group cannot be defined without a price selected. If it occurs, it could indicate a group configuration error on the server. If this error is reported, the machine will enter out of service mode until the issue is resolved on the server.

Zero Pricing in Group

This error event will occur if a group with Zero Pricing has been assigned to a non-demo machine. The machine will enter out of service mode until the issue is resolved on the server.

Password Entry Limit Reached

This error event will occur if the machine is opened manually using the key. The log in page will appear, and if an invalid password is entered 3 times in a row, the machine will enter out of service mode. The only option to gain access to the log in page again is to close and reopen the door, which will cause a reboot of the software and the cycle can be repeated.

Stuck in Final State - Rotate Turntable to 0

This error event will be reported if the skittles application is stuck in the final state for any reason for two minutes. The main reason for being stuck in this state is the customer has not removed their cup, or a faulty cup sensor has failed to detect the cup being removed. The automatic recovery from this error state has three steps, of which this is the first.

Stuck in Final State - Restart DPEMS

This error event will be reported immediately following the Stuck in Final State – Rotate Turntable to 0 event. The DPEMS will restart and reconnect to the skittles application.

Stuck in Final State - Reboot PC

This error event will be reported if one minute after the DPEMS has been restarted, the application is still stuck in the final state. Once the skittles application restarts, if a customer has not removed the cup, the skittles application will return to the “please take your cup” final state and wait there until the cup is removed (or the machine is serviced to fix the faulty sensor).

Operational State Online

This event state is always reported as information. On first start or reboot there is also a description of the mode of operation:

Attraction Mode

This description is used when the machine starts in normal mode.

Demo Mode

This description is used when the machine starts in demo mode.

Service Mode

This description is used when the machine starts in service mode.

Factory Mode

This description is used when the machine starts in factory mode.

Door State Open

This event state is always reported as Information. It is reported whenever the door state changes from closed to open.

Door State Closed

This event state is always reported as Information. It is reported whenever the door state changes from open to closed.

Door Servo Activated

This event state is always reported as Information. It is reported whenever the door servo button is pressed from either the Service or Factory screens.

Remote Door Open

This event state is always reported as Information. It is reported whenever the Remote Door Open message is received from the server. 

Remote Reboot

This event state is always reported as Information. It is reported whenever the Remote Reboot message is received from the server. 

Rfid Tag Detected

This event state is reported as Information when an authorized tag is detected, or as a Warning when an unauthorized tag is reported.
The following details are reported along with the event:

F1 Key Authorization

Reported as information when the F1 key is used to gain access to the service mode page.

XXXXXXXXXX Authorized Tag

Reported as information when Rfid Tag XXXXXXXXXX is detected as authorized, and the door has been unlocked. The passcode was authorized from the list of allowed Rfid Tags.

XXXXXXXXXX Unauthorized Tag

Reported as a Warning when Rfid Tag XXXXXXXXXX is detected as unauthorized, and the door has NOT been unlocked.

XXXXXXXXXX Authorized Passcode

Reported as information when passcode XXXXXXXXXX is detected as authorized, and the door has been unlocked. The passcode was authorized from the list of allowed Rfid Tags.

XXXXXXXXXX Authorized Passcode – Factory Mode

Reported as information when passcode XXXXXXXXXX is detected as authorized, and the door has been unlocked. The passcode was authorized by the Factor Mode passcode.

XXXXXXXXXX Authorized Passcode – Factory Group

Reported as information when passcode XXXXXXXXXX is detected as authorized, and the door has been unlocked. The passcode was authorized by the passcode for the Factory Group.

XXXXXXXXXX Authorized Passcode – Test Group

Reported as information when passcode XXXXXXXXXX is detected as authorized, and the door has been unlocked. The passcode was authorized by the passcode for the Test Group.

XXXXXXXXXX Authorized Passcode – CurrentGroup == null

Reported as information when passcode XXXXXXXXXX is detected as authorized, and the door has been unlocked. The passcode was authorized by the passcode when there are no groups assigned to the machine.

XXXXXXXXXX Unauthorized Passcode

Reported as a Warning when passcode XXXXXXXXXX is detected as unauthorized, and the door has NOT been unlocked.

Unauthorized Passcode - Empty

Reported as a Warning when an empty passcode is detected as unauthorized, and the door has NOT been unlocked.

XXXXXXXXXX Unauthorized Passcode – No Tags

Reported as a Warning when passcode XXXXXXXXXX is detected as unauthorized, and the door has NOT been unlocked. This indicates an error in the application where no tags have been allocated.

Dpems Device Info

This event state is always reported as Information. It is reported whenever the DPEMS connects to the application. It reports the model number, serial number, firmware version, bootloader version and attiny version. For example: SKV3R2 AM000003 1.0.23.B2.A4 shows model number SKV3R2, Serial number AM000003, version number 1.0.23, boot loader version 2 and attiny version 4.

Skittles App Version

This event state is always reported as Information. It is reported whenever the app connects to the server. It reports the skittles app version number. For example: 1.1.7.3. 

Skittles Bin Use Sensor

This event state is always reported as Information. It is reported whenever the Bin Override button is white (Not Override Disabled, or Override Enabled). The bin will automatically be disabled when the bin level reaches 0%.

Skittles Bin Disable

This event state is always reported as a Warning. It is reported whenever the Bin Override button is set to Disabled, the bin level reaches 0, or a dispense count below the valid threshold count is detected after a bin dispense action.

User Interaction Bin n

The bin number n was disabled from a user interaction in service mode.

Sensor Reading Bin n

The bin number n was disabled from a 0% sensor reading.

Dispensed Count x <= Valid Threshold 0 Bin n

The bin number n was disabled because the dispensed skittles count x for the bin was below the valid threshold (a zero count).

Skittles Bin Enable

This event state is reported as a Warning if enabled by user interaction, or Information if enabled by a sensor reading. It is reported whenever the Bin Override button is set to Enabled, or the bin level is greater than 0.

User Interaction Bin n

The bin number n was enabled from a user interaction in service mode.

Sensor Reading Bin n

The bin number n was enabled from a greater than 0% sensor reading.

Skittles Low Dispense Count

This event state is always reported as a Warning. It is reported whenever a dispense count is less than the warning threshold after a bin dispense action.
Dispensed Count x <= Warning Threshold 5 Bin n
The bin number n has a dispensed skittles count x was below the warning threshold (a count of 5). Note that if the dispense count was below the valid threshold, only the Skittles Bin Disable event will be generated.

Skittles Good Dispense Count

This event state is reported as Information whenever the bin has a dispensed skittles count above the warning threshold and a Low Dispense Count was previously sent to the server for this bin. This is how this warning state is cleared on the server.

Dispensed Count x Bin n

The bin number n has a dispensed skittles count x was above the warning threshold (a count of 5).

Bulk Update Event

This event state is reported as Information whenever the machine connects to the server after a reboot if there have been any changes to the bulk inventory page.
The details will list any new entries made in the bulk inventory page.

Cash Update Event

This event state is reported as Information whenever the machine connects to the server after a reboot if there have been any changes to the stored cash valued (i.e. cash has been removed from the machine, or $1 bills have been added or removed from the recycler).
The details will list any new changes to the stored cash values.

Bill Acceptor Device Info

This event state is reported as information whenever the Bill Acceptor Device Information changes. This will only happen the first time the bill acceptor device is connected, if the bill acceptor device is changed, or if there is a firmware version update. The information will be visible in the Notes section of the machine on the portal and changes will be automatically noted in the Journal.

Cashless Device Info

This event state is reported as information whenever the Cashless Device Information changes. This will only happen the first time the cashless device is connected, if the cashless device is changed, or if there is a firmware version update. The information will be visible in the Notes section of the machine on the portal and changes will be automatically noted in the Journal.

Bill Acceptor Device State

This event is reported as Error for the following events:

Defective Motor

Sensor Problem

ROM Checksum Error

Validator Jammed

Cash Box Out Of Position

Invalid Escrow Request

Bill Returned While Vending

And the event is reported as Warning for the following events:

Device Initializing

Bill Rejected

Bill Not Accepted

One Dollar Bill Forcibly Removed

Two Dollar Bill Forcibly Removed

Five Dollar Bill Forcibly Removed

Ten Dollar Bill Forcibly Removed

Twenty Dollar Bill Forcibly Removed

Number Of Attempts To Insert Bill While Disabled [n]

Timeout In Refund

And the following events is reported as Information for the following event:

Device Ready

Cycle Ended

The devices do not report that the error has cleared, so we will only clear the error event from our portal if the current cash transaction cycle ends. This means that the device must be in working order, otherwise the cash transaction in progress would not be able to get to the end state.

Cashless Device State

This event is reported as Error for the following events:

Payment Media Error – Transient

Invalid Payment Media – Transient

Tamper Error – Transient

Manufacturer Defined Error – Transient

Communications Error - Non Transient – Functional

Reader Requires Service - Non Transient – Functional

Unassigned - Non Transient – Functional

Manufacturer Defined Error - Non Transient – Functional

Reader Failure - Non Transient - Non Functional

Communications Error - Non Transient - Non Functional

Payment Media Jammed - Non Transient - Non Functional

Manufacturer Defined Error

Refund Error Internal Reader Credit Lost

Unknown Error

The error message will also contain two hex bytes [xxyy] appended to the end of the message. These bytes may yield additional manufacturer error information to assist in tracking down the error.
And the event is reported as Information for the following events:

Device Ready

Unsupported Device Level: level

Cycle Ended

Even though the devices may report that the error has cleared, to be consistent with the Bill Acceptor, we will only clear the error event from our portal if the cashless device cycle ends. This means that the device must be in working order, otherwise the cashless device would not be able to end its cycle.

Interaction State

Each step of the vending machine interaction is now reported to the machine service log via Interaction State events. These events are reported as Information as the interaction progresses any of the following events may be generated by an interaction:

Status: interactionStatus

Where interactionStatus has the following possible states:
Started
Successful
SuccessfulDemo
Timeout
HomeButtonPressed
SkittlesDispenseCountError
VendError
PaymentError
CardDeclined
CardTapTimeout

Group: groupName

Where groupName is the name of the group the machine is currently assigned to.

Screen: screen

Where screen has the following possible states:
Start Here
Cup Selection
Flavor Selection
Payment Selection 
Cash Payment
Card Payment
Cash Refund
Vending
Final

Cup Size: cupSize

Where cupSize has the following possible values:
Half
Full

Flavours: flavors

Where flavors is a comma delimited list of the selected flavors.

Payment Processor: paymentProcessorState

Where paymentProcessorState has the following possible states:
Start
Initializing
Ready
Request Purchase PreApproval
Purchase PreApproval Granted
Purchase PreApproval Declined
Purchase PreApproval Declined Timeout
Request Bill
Cash Purchase Granted
Cash Purchase Declined
Any Bill Collected
Waiting For Vend Completion
Process Payment
Payment Accepted
Payment Declined
Pay Out Cash
Cancel Payment
Cycle Ended

Method: paymentMethod

Where paymentMethod is:
Cash
Cashless

Requested: requestedAmount requestedDateTime in UTC

Cash Collected: cashCollectedAmount

Cash Change: cashChangeAmount

Cash Refund: cashRefundAmount

Cash Paid Out: cashPaidOutAmount

Accepted: acceptedAmount acceptedDateTime in UTC

Vend State: vendState errorMessage skittlesDispensedCount Cup Distance: cupDistance MaxTurntableCurrent: maxTurntableCurrent in mA.

Where vendState has the following possible states:
VMS_IDLE
VMS_START_VEND_CUP
VMS_DISPENSE_CUP
VMS_ROTATE_TURNTABLE_TO_90_DEGREES
VMS_DISPENSE_SKITTLES_FROM_BINS
VMS_ROTATE_TURNTABLE_TO_180_DEGREES
VMS_WAIT_FOR_CUP_REMOVAL
VMS_ROTATE_TURNABLE_TO_0_DEGREES
VMS_FINAL_CHECK
VMS_VEND_CUP_COMPLETED
VMS_ERROR

Ended