Wyckoff Heights Medical Center is causing its neighbors some pain.

The hospital parked a generator and a cooling unit on Stockholm Street last month in order to power its ailing air-conditioning system.

But nearby residents complain that the generator’s constant rattling is keeping them up at night and that its diesel fumes are causing respiratory problems.

"It’s like being in a wind tunnel or a really noisy factory floor where all the machines are roaring all at once," said Deborah Brown, a community board member, whose studio is a block away. "It is constant, ambient noise, not episodic bursts."

St. Nicholas Avenue resident Hilda Shen even filmed the generator in action and called 311 several times — which led the city to issue the hospital two violations for noise and air pollution.

And the city found further problems —  the hospital was operating the generator without a permit, which earned them another violation and an Environmental Control Board hearing on June 15.

Shen is demanding that the hospital move the generator or shut it down completely.

"The noise of these machines has been enormous, and affected the sleep and health of the neighborhood," said Shen. "The machines run all the time, and the noise is inescapable."

The episode has been an embarrassing one for Wyckoff Hospital, one of the city’s busiest for asthma attacks and respiratory ailments.

Wyckoff already spent $1.7 million renovating its emergency room last fall, doubling the number of intake rooms for patients with asthma.

And a tornado blew through the hospital’s main entrance, ripping up insulation and causing thousands of dollars in damages.

But its air-conditioning system died last summer — forcing the hospital to scramble for a temporary system to keep its emergency room and patients rooms cold.

Wyckoff’s general counsel David Hoffman said the hospital tried to plug the air conditioning unit into Con Ed’s grid, but it required 480 volts of electricity, which was too much power for the grid to handle.

"There wasn’t enough electricity to run the air conditioner and keep the lights on," said Hoffman.

Wyckoff’s plan was to keep the $180,000-per month generator and cooling unit on the street until early September, when they finish upgrading a new internal $7 million air-conditioning system.

But when worried residents flooded a community advisory meeting at the hospital this week, Wyckoff CEO Rajiv Garg promised to move the generator to a parking lot inside the hospital within two weeks, also adding filters and sound dampeners.

Garg pled with residents to "stick with the hospital" and that the generator would soon be fixed.

"We’re not in love with the machine, we don’t want it there," said Garg, adding that he believed the fumes were "not harmful."

But some residents remained skeptical and demanded reports from the Department of Environmental Protection regarding the generator’s air and decibel readings. Similar generators burn through up to 65 gallons of diesel an hour.

"What are the effects of residents inhaling this?" another St. Nicholas Avenue resident wanted to know. "It’s a scary thing. It’s summer and we need to keep our windows up — this can’t be something that happens every summer."