Compare commits
No commits in common. "master" and "deploy---2024-11-25---14-26-50" have entirely different histories.
master
...
deploy---2
@ -54,12 +54,9 @@ export class PropertyListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updateProperty(property: Property, existing: boolean): void {
|
private updateProperty(property: Property, existing: boolean): void {
|
||||||
if (property.type === PropertyType.BOOLEAN) {
|
|
||||||
this.updateProperty2(this.booleans, property, existing);
|
this.updateProperty2(this.booleans, property, existing);
|
||||||
} else if (property.type === PropertyType.SHUTTER) {
|
|
||||||
this.updateProperty2(this.shutters, property, existing);
|
this.updateProperty2(this.shutters, property, existing);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private updateProperty2(properties: Property[], property: Property, existing: boolean) {
|
private updateProperty2(properties: Property[], property: Property, existing: boolean) {
|
||||||
const index: number = properties.findIndex(p => p.id === property.id);
|
const index: number = properties.findIndex(p => p.id === property.id);
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
package de.ph87.homeautomation.knx.group;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RequestMapping("knx/group")
|
|
||||||
public class KnxGroupImportController {
|
|
||||||
|
|
||||||
private final KnxGroupImportService knxGroupImportService;
|
|
||||||
|
|
||||||
@GetMapping("import")
|
|
||||||
public void doImport() {
|
|
||||||
knxGroupImportService.importGroups();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -4,7 +4,10 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import tuwien.auto.calimero.*;
|
import tuwien.auto.calimero.GroupAddress;
|
||||||
|
import tuwien.auto.calimero.KNXException;
|
||||||
|
import tuwien.auto.calimero.KNXFormatException;
|
||||||
|
import tuwien.auto.calimero.KNXTimeoutException;
|
||||||
import tuwien.auto.calimero.datapoint.StateDP;
|
import tuwien.auto.calimero.datapoint.StateDP;
|
||||||
import tuwien.auto.calimero.dptxlator.TranslatorTypes;
|
import tuwien.auto.calimero.dptxlator.TranslatorTypes;
|
||||||
import tuwien.auto.calimero.process.ProcessCommunicatorImpl;
|
import tuwien.auto.calimero.process.ProcessCommunicatorImpl;
|
||||||
@ -71,12 +74,6 @@ public class KnxGroupLinkService {
|
|||||||
knxGroup.getRead().setNextTimestamp(null);
|
knxGroup.getRead().setNextTimestamp(null);
|
||||||
log.debug("Successfully sent KnxGroup: {}", knxGroup);
|
log.debug("Successfully sent KnxGroup: {}", knxGroup);
|
||||||
return true;
|
return true;
|
||||||
} catch (KNXIllegalArgumentException e) {
|
|
||||||
log.error("Failed to read KnxGroup {}", knxGroup);
|
|
||||||
knxGroup.getRead().setErrorCount(knxGroup.getRead().getErrorCount() + 1);
|
|
||||||
knxGroup.getRead().setErrorMessage(e.getMessage());
|
|
||||||
knxGroup.getRead().setNextTimestamp(null);
|
|
||||||
return true;
|
|
||||||
} catch (KNXTimeoutException | KNXFormatException e) {
|
} catch (KNXTimeoutException | KNXFormatException e) {
|
||||||
log.error("Failed to read KnxGroup {}", knxGroup);
|
log.error("Failed to read KnxGroup {}", knxGroup);
|
||||||
knxGroup.getRead().setErrorCount(knxGroup.getRead().getErrorCount() + 1);
|
knxGroup.getRead().setErrorCount(knxGroup.getRead().getErrorCount() + 1);
|
||||||
|
|||||||
@ -2,10 +2,12 @@ package de.ph87.homeautomation.web;
|
|||||||
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
||||||
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
|
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
|
||||||
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
||||||
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
||||||
|
|
||||||
|
@CrossOrigin
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebSocketMessageBroker
|
@EnableWebSocketMessageBroker
|
||||||
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user