[sbus] fix sat issues

Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Ciprian Pascu 2025-01-08 21:37:24 +02:00
parent 31c409f6ce
commit d1fa64fb69
15 changed files with 52 additions and 24 deletions

View File

@ -19,8 +19,28 @@
<groupId>ro.ciprianpascu</groupId> <groupId>ro.ciprianpascu</groupId>
<artifactId>j2sbus</artifactId> <artifactId>j2sbus</artifactId>
<version>1.5.4</version> <version>1.5.4</version>
<scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>6.0.0</version>
<configuration>
<instructions>
<Import-Package>
ro.ciprianpascu.sbus.facade,
*
</Import-Package>
<Embed-Dependency>j2sbus;scope=compile</Embed-Dependency>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional
@ -68,10 +68,8 @@ public class SbusBridgeHandler extends BaseBridgeHandler {
"Sbus service not available"); "Sbus service not available");
return; return;
} }
service.initialize(config.host, config.port); service.initialize(config.host, config.port);
updateStatus(ThingStatus.ONLINE); updateStatus(ThingStatus.ONLINE);
} catch (Exception e) { } catch (Exception e) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage()); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage());
} }

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional
@ -84,5 +84,5 @@ public interface SbusService {
*/ */
void close(); void close();
void initialize(String host, int port); void initialize(String host, int port) throws Exception;
} }

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/* /**
* Copyright (c) 2010-2025 Contributors to the openHAB project * Copyright (c) 2010-2025 Contributors to the openHAB project
* *
* See the NOTICE file(s) distributed with this work for additional * See the NOTICE file(s) distributed with this work for additional

View File

@ -17,8 +17,10 @@
<label>SubnetId</label> <label>SubnetId</label>
<description>Slave subnet id. Can take any value between 1 and 255. 255 for broadcast.</description> <description>Slave subnet id. Can take any value between 1 and 255. 255 for broadcast.</description>
<default>1</default> <default>1</default>
<min>1</min> <options>
<max>255</max> <option value="1">1</option>
<option value="255">255</option>
</options>
</parameter> </parameter>
<parameter name="id" type="integer" required="true"> <parameter name="id" type="integer" required="true">
<label>Device ID</label> <label>Device ID</label>
@ -28,6 +30,7 @@
<label>Refresh Interval</label> <label>Refresh Interval</label>
<description>Refresh interval in seconds</description> <description>Refresh interval in seconds</description>
<default>30</default> <default>30</default>
<unitLabel>s</unitLabel>
</parameter> </parameter>
</config-description> </config-description>
</thing-type> </thing-type>
@ -44,8 +47,10 @@
<label>SubnetId</label> <label>SubnetId</label>
<description>Slave subnet id. Can take any value between 1 and 255. 255 for broadcast.</description> <description>Slave subnet id. Can take any value between 1 and 255. 255 for broadcast.</description>
<default>1</default> <default>1</default>
<min>1</min> <options>
<max>255</max> <option value="1">1</option>
<option value="255">255</option>
</options>
</parameter> </parameter>
<parameter name="id" type="integer" required="true"> <parameter name="id" type="integer" required="true">
<label>Device ID</label> <label>Device ID</label>
@ -55,6 +60,7 @@
<label>Refresh Interval</label> <label>Refresh Interval</label>
<description>Refresh interval in seconds</description> <description>Refresh interval in seconds</description>
<default>30</default> <default>30</default>
<unitLabel>s</unitLabel>
</parameter> </parameter>
</config-description> </config-description>
</thing-type> </thing-type>
@ -71,8 +77,10 @@
<label>SubnetId</label> <label>SubnetId</label>
<description>Slave subnet id. Can take any value between 1 and 255. 255 for broadcast.</description> <description>Slave subnet id. Can take any value between 1 and 255. 255 for broadcast.</description>
<default>1</default> <default>1</default>
<min>1</min> <options>
<max>255</max> <option value="1">1</option>
<option value="255">255</option>
</options>
</parameter> </parameter>
<parameter name="id" type="integer" required="true"> <parameter name="id" type="integer" required="true">
<label>Device ID</label> <label>Device ID</label>
@ -82,6 +90,7 @@
<label>Refresh Interval</label> <label>Refresh Interval</label>
<description>Refresh interval in seconds</description> <description>Refresh interval in seconds</description>
<default>30</default> <default>30</default>
<unitLabel>s</unitLabel>
</parameter> </parameter>
</config-description> </config-description>
</thing-type> </thing-type>
@ -114,7 +123,8 @@
<label>Timer</label> <label>Timer</label>
<description>Timer in seconds to automatically turn off the switch (0 = disabled)</description> <description>Timer in seconds to automatically turn off the switch (0 = disabled)</description>
<default>0</default> <default>0</default>
<min>0</min> <advanced>true</advanced>
<unitLabel>s</unitLabel>
</parameter> </parameter>
</config-description> </config-description>
</channel-type> </channel-type>