HACKENSACK - Sensors under the mattresses of elderly residents with dementia track how much they sleep at night. Others in the showers note how often they bathe, while sensors in the walls watch over their movements.

The data are sent to the nurses at the assisted living center where these residents live, a red dot appearing next to the names of residents whose normal routines have changed dramatically. This was how staff was alerted recently about a patient who is usually up and out of her apartment early, but instead had been lying in bed most of the day. It turns out she was developing pneumonia.

"We caught it early enough that we were able to treat her here instead of in the hospital," said Indra Sooklall, director of resident care at Spring Hills Somerset, a 120-unit assisted living residence in New Jersey that installed "smart sensors" two years ago in a wing for dementia patients.

Technology is changing life inside nursing homes and other residences for seniors. The most cutting-edge among the new systems offer lofty promises of helping providers cope with the coming tsunami of aging baby boomers even as they grapple with funding cutbacks and with the increasing demand to care for sicker and older residents in less-restrictive and less-expensive settings.

Many of the recent technology upgrades inside long-term-care centers mirror the digital advances of the times, with Wii, Skype and YouTube being used to spice up therapy routines and entertainment programs. Wii games are helping get patients in rehabilitation moving again after an injury or surgery, while heath experts believe computer chess, trivia or other skill games can keep brains active and potentially ward off senility.

But the most closely watched technological revolution to hit the long-term-care industry is the growing use of motion sensors and so-called "patient-monitoring systems" to better track changes in a resident's health and mobility.

"There are a whole host of things that are arriving on the market and being looked at as ways to improve care," said Paul Langevin, president of the Health Care Association of New Jersey, a trade group that represents the long-term-care industry.

IT Initiatives, a Manalapan, Monmouth County, firm that designs technology and communication systems, is finalizing contracts with seven long-term-care centers in New Jersey to install resident monitoring systems, said John Dalton, the company's president.

One of them is at Friendship Village, a retirement community in Basking Ridge that is in the middle of a multi-year project to install technology specific to the needs of the different facilities on its campus. The nursing home and assisted living residence at Friendship Village is being outfitted with electronic-medical-records kiosks in hallways where staff will type in data about everything from blood pressure readings to when the patient was last bathed. The community's independent living units will have telephones with LCD screens that allow residents to call for concierge-type assistance as well as high-tech personal emergency systems that send signals to the staff's two-way-monitors.

As technology advances, the big push is going to be installing sensor systems at assisted living residences and independent-style living communities, with data-recording devices in the walls, floors, carpets, beds and bathrooms enabling staff to keep tabs on residents without having to physically send a staff member to every room for routine checks, Dalton said.

Nursing homes, where patients require closer monitoring, are likely to turn to more sophisticated systems - ones that incorporate two-way video communication between patients and their caregivers as well as wearable monitors that alert caregivers if a patient has fallen or wandered out of a unit. There is even a sensor on the market that monitors whether a nursing home patient's diaper needs to be changed.

"There are all sorts of technologies available now that can be incorporated into a whole system designed to meet a facility's needs," Dalton said.

These technologies may one day become more commonplace in private homes as a way to allow elderly residents to remain independent for longer periods, said Michele Kent, president of Leading Age New Jersey, an industry group that represents non-profit long-term-care centers.

The digital advances come at a time when technology is being touted as a way to improve health care overall, with doctors and hospitals switching to electronic medical records and increasingly using remote monitoring systems to check in on patients who have been sent home.

"The whole idea is to keep residents at their highest functioning level, and technology is seen as being able to play a role in that," Langevin said.

The trend is far from widespread, however. While technology in long-term-care settings is much buzzed about these days, many of the systems in place remain in the pilot stage.

"It's too early to say if there's going to be a broad deployment of some of these technologies," said Laurie Orlov, an industry analyst and author of a blog, Aging in Place Technology Watch. "Nobody has really figured out a good model for paying for them."

But the market for technology in nursing homes and assisted living centers has begun to pick up significantly in the last year, said Bryce Porter, a sales manager with Intel-GE Care Innovations. His company has installed its Quiet Care sensor systems in hundreds of communities nationwide, including Bella Terra, an assisted living residence in Ocean County.

Over the long run, Langevin predicts, long-term-care centers will find a way to pay for technology upgrades. "Boomers aren't going to want to stay in a 30-year-old building without modern technology," he said.

Distributed by MCT Information Services