Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[smsmodem] Initial contribution #12250

Merged
merged 14 commits into from
Dec 3, 2022

Conversation

dalgwen
Copy link
Contributor

@dalgwen dalgwen commented Feb 9, 2022

This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.
With this binding, there is no need for complex configuration with external tools, such as gammu.

Here is the community discussion, where you can find a binary snapshot.

This binding uses smslibv4, directly included (org.openhab.binding.smsmodem.internal.smslib packages and sub packages) and heavily refactored to pass openHAB code standard. I asked on the forum if it was OK and decided to go on with the inclusion. Hope this is OK. Honestly, I don't understand everything in this library : SMS is a complex standard and I didn't take the time to grab it as the smslibv4 was here for me to hide the complexity.

The code still has a "deviation" from the openHAB standard : in the internal smslib, it uses a manually created Thread to continuously read from the serial port (the PollReader class). As the thread is continuously running, I thought it could be a valid use case (to not take forever a thread from the openHAB pool). If you don't think so, please tell me and I will refactor it.

@dalgwen dalgwen requested a review from a team as a code owner February 9, 2022 01:23
@jlaur jlaur added the new binding If someone has started to work on a binding. For a new binding PR. label Feb 9, 2022
@Hilbrand
Copy link
Member

Hilbrand commented Feb 9, 2022

There are other add-ons that include third party code. But because it's under a different license this needs to be added differently. You need to put the sources in a different map: src/3thparty/java/ and than you can keep the original package and such, and add the directory to the pom.xml. See for example the smartmeter binding: https://github.com/openhab/openhab-addons/tree/main/bundles/org.openhab.binding.smartmeter. Don't

The way you have added it now seems to me illegal as you have changed the license on the 3rd party source code. Which you only can do if you are the copyright owner of the source code.

Regarding threads. It's ok to have an own thread. In fact if you have long running threads you must create them as only short running threads are allowed on the scheduled executor. See also #8216 about naming the thread and do setDeamon(true).

@dalgwen
Copy link
Contributor Author

dalgwen commented Feb 9, 2022

Hello @Hilbrand,

Thank you very much for these informations.
Indeed, the way I included the code from smslib was problematic and I'm glad you directed me to a valid solution.
So, I did as you said, and refactored the inclusion. For information :

  • I put back the smslib code in the org.smslib package
  • I put this package and subpackages in the src/3rdparty/java folder
  • I deleted the openHAB copyright information I had improperly added on top of every org.smslib file (though I let the mention "extracted from smslib" that I had put before).
  • I completed the NOTICE file and the pom.xml with relevant information (I took the smartmeter binding as a model)

I also put a name and the daemon property on the always living thread polling the device.

@dalgwen dalgwen force-pushed the smsmodem_binding_initial_contribution branch from 82f91c8 to 73714e7 Compare March 7, 2022 14:44
@dalgwen dalgwen force-pushed the smsmodem_binding_initial_contribution branch from 195acac to 89c5a03 Compare June 20, 2022 22:32
@fwolter
Copy link
Member

fwolter commented Jul 10, 2022

@dalgwen It's been a long time you submitted your new addon. Are you still around to implement upcoming review feedback?

@dalgwen
Copy link
Contributor Author

dalgwen commented Jul 10, 2022

Yes, I would be happy to do so.
I use this binding every day and also provide support on the forum for the (very) few interested users.

But I'm aware that it doesn't attract many people and is low on the priority list... so no problem if it takes time !

Thanks,

Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the readme so far.

There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html after building it with mvn clean install.

bundles/org.openhab.binding.smsmodem/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.smsmodem/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.smsmodem/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.smsmodem/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.smsmodem/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.smsmodem/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.smsmodem/README.md Outdated Show resolved Hide resolved
This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.

Signed-off-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Gwendal Roulleau <[email protected]>
And long running thread naming convention
And treated some code warning 

Signed-off-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Gwendal Roulleau <[email protected]>
update channel
rename action to avoid colision with other binding and a too generic name

Signed-off-by: Gwendal Roulleau <[email protected]>
For non latin character in SMS

Signed-off-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Gwendal Roulleau <[email protected]>
@dalgwen dalgwen force-pushed the smsmodem_binding_initial_contribution branch from 89c5a03 to 30482c7 Compare July 11, 2022 22:52
@dalgwen
Copy link
Contributor Author

dalgwen commented Jul 11, 2022

Thank you @fwolter !
I checked the code-analysis but the report says there is no issue now.
Do you still have some ?

@fwolter
Copy link
Member

fwolter commented Aug 14, 2022

I checked the code-analysis but the report says there is no issue now.

Looks good! Just give me a note if you want to change the modelling of the bridge or whether I shall continue reviewing.

@dalgwen
Copy link
Contributor Author

dalgwen commented Aug 20, 2022

Thank you @fwolter
You know better than me the good usage 👍, I will change the modelling of the bridge

@dalgwen
Copy link
Contributor Author

dalgwen commented Aug 22, 2022

As proposed, I split the bridge thing-type in two different bridge thing-types.
Binding is now ready for review.

}

public static ThingUID getSMSConversationUID(ThingTypeUID thingTypeUID, String recipient, ThingUID bridgeUID) {
return new ThingUID(thingTypeUID, recipient, bridgeUID.getId());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you are derivating the ThingUID from the phone number, but the ThingUID should be configureable by the user. Is there any reason not letting the user set the ThingUID?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "getSMSConversationUID" method is called by the autodiscovery method, or from the createThing method if and only if the "thingUID" is null.
With this method, I want to give a default UID, IF NOT set by the user. If the user set the thing UID, it will use the user's one.
Your comment seems to mean that this approach is invalid, or do you mean it's badly implemented ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In SMSConversationDiscoveryService you are calling getSMSConversationUID() directly, when creating the discovered Thing (which is the right approach). So, the default-ThingUID-use-case is handled there.

If the user adds the Thing manually, the ThingUID can't be left empty/null (neither via UI nor text based configuration).

What use case do you intend to handle by this code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular use case here. I was just trying to implement the createThing method from the parent class and respecting the annotation : in this method, the parameter thingUID is nullable.
If you thing it is best, I can remove the call to the getSMSConversationUID in createThing, but the compiler will log a warning I guess ?
Or I could fail fast with an exception if thingUID is null.
What do you think ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for clarification, createThing() doesn't need to be implemented by bindings. It's sufficient to implement createHandler(). You could remove createThing() entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh my ! I wouldn't have wasted your time if I knew that before... Sorry 😨
Deleted !

Comment on lines 122 to 150
private void setStatusByBridgeStatus() {
SMSModemBridgeHandler bridgeHandlerFinal = bridgeHandler;
if (bridgeHandlerFinal != null) {
switch (bridgeHandlerFinal.getThing().getStatus()) {
case INITIALIZING:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case OFFLINE:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case ONLINE:
updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE);
break;
case REMOVED:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case REMOVING:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case UNINITIALIZED:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case UNKNOWN:
updateStatus(ThingStatus.UNKNOWN, ThingStatusDetail.BRIDGE_OFFLINE);
break;
}
} else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Thing status is set by the framework automatically according the bridge status, if you set the Thing status to UNKNOWN in initialize(). Then, this could be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a test and if I set the child handler status to "UNKNOWN" and leave if for the Bridge to update (deleting setStatusByBridgeStatus() method), it stays "UNKNOWN", even if the bridge status switch to "online".
Or maybe I didn't understand your proposition ?

By reading code, the bridgeStatusChanged() method of BaseThingHandler effectively change the child handler status to "ONLINE" when the bridge get online, but only if the last status details was BRIDGE_OFFLINE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need to set the child Thing ONLINE, if you think it is online. In your case this might be always the case, if the bridge is online. So, you can set it ONLINE in initialize() directly. Then, it will be online if the bridge is online and offline if the bridge is offline.

You only need to set it to UNKNOWN (and later to ONLINE) if you don't know the state in initialize(), yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I get it now !
Indeed, I can set it to ONLINE directly.
Done, thanks

By the way, there is one drawback : the bridge start as "unknown" because it has to establish connection. But the smsconversation thing is immediately online at this time (and the status doesn't reflect the reality : it is not fully functionnal because of the bridge).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested your code and a reason why it doesn't work as expected is that you don't set the ThingStatus in the bridge's initialize() to UNKNOWN. It works for me if I do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Strange, it doesn't work for me. When the bridge is initializing (unknown), the child conversation thing is online. Maybe an order initialization issue ?
But it is no big deal, I'm OK with that, so I let you decide if it needs further investigation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it again and you're right, as long as the bridge is in UNKNOWN state, the child Things are ONLINE. Only if the bridge is set to OFFLINE, the child Things are set to OFFLINE, too. Normally you wouldn't notice, because the bridge stays in UNKNOWN state only for very short time. In this case the timeout is quite long.

I would expect the SMS modem to respond within subseconds and would chose a shorter timeout, anyway. But maybe there are things I didn't consider.

I merge it for now. If you want to improve the behavior, you could file a follow-up PR.

Signed-off-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Gwendal Roulleau <[email protected]>
}

public static ThingUID getSMSConversationUID(ThingTypeUID thingTypeUID, String recipient, ThingUID bridgeUID) {
return new ThingUID(thingTypeUID, recipient, bridgeUID.getId());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for clarification, createThing() doesn't need to be implemented by bindings. It's sufficient to implement createHandler(). You could remove createThing() entirely.

} catch (ModemConfigurationException e) {
String message = e.getMessage();
logger.error(message, e);
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, message);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I saw. That sounds more like a configuration error. I leave it up to you what makes more sense.
grafik

Comment on lines 122 to 150
private void setStatusByBridgeStatus() {
SMSModemBridgeHandler bridgeHandlerFinal = bridgeHandler;
if (bridgeHandlerFinal != null) {
switch (bridgeHandlerFinal.getThing().getStatus()) {
case INITIALIZING:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case OFFLINE:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case ONLINE:
updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE);
break;
case REMOVED:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case REMOVING:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case UNINITIALIZED:
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
break;
case UNKNOWN:
updateStatus(ThingStatus.UNKNOWN, ThingStatusDetail.BRIDGE_OFFLINE);
break;
}
} else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested your code and a reason why it doesn't work as expected is that you don't set the ThingStatus in the bridge's initialize() to UNKNOWN. It works for me if I do that.


@Override
public void initialize() {
shouldRun = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary to make the thing status automatism work.

Suggested change
shouldRun = true;
updateStatus(ThingStatus.UNKNOWN);
shouldRun = true;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done !
Thank you (again)

@dalgwen dalgwen force-pushed the smsmodem_binding_initial_contribution branch from 8b2414c to 015cd7f Compare November 23, 2022 11:18
Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Now, you could add your binding's logo to the openHAB website. See https://www.openhab.org/docs/developer/bindings/#add-your-binding-s-logo-to-the-openhab-website

@fwolter fwolter merged commit 56728b6 into openhab:main Dec 3, 2022
@fwolter fwolter added this to the 3.4 milestone Dec 3, 2022
@dalgwen
Copy link
Contributor Author

dalgwen commented Dec 4, 2022

Great, thank you again for your time !

@lolodomo
Copy link
Contributor

lolodomo commented Dec 4, 2022

As the French translations were included on the PR, they have to be uploaded manually in Crowdin.

@lolodomo
Copy link
Contributor

lolodomo commented Dec 4, 2022

@dalgwen : you forgot adding an entry in CODEOWNERS file, can you please submit a small PR for that?

@dalgwen
Copy link
Contributor Author

dalgwen commented Dec 4, 2022

As the French translations were included on the PR, they have to be uploaded manually in Crowdin.

First time in crowdin for me. I think I did what you suggest. With some fixes after viewing warnings from crowdin.

you forgot adding an entry in CODEOWNERS file, can you please submit a small PR for that?

Oops, sorry. Done here.

@lolodomo
Copy link
Contributor

lolodomo commented Dec 4, 2022

First time in crowdin for me. I think I did what you suggest. With some fixes after viewing warnings from crowdin.

I have validated with few changes.
Syncing is in progress, the PR should be created in few minutes.

morph166955 pushed a commit to morph166955/openhab-addons that referenced this pull request Dec 18, 2022
* [smsmodem] Initial contribution

This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] README fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] build/spotless fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] compliance with 3rd party license

And long running thread naming convention
And treated some code warning 

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] i18n

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Small fixes

update channel
rename action to avoid colision with other binding and a too generic name

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Use of standard Thing properties

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Fix sender identifier error with special character

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Add encoding parameter

For non latin character in SMS

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Split local and remote modem in two thing-types

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply code review (removing unnecessary method)

Signed-off-by: Gwendal Roulleau <[email protected]>

Signed-off-by: Gwendal Roulleau <[email protected]>
Co-authored-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Ben Rosenblum <[email protected]>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Dec 24, 2022
* [smsmodem] Initial contribution

This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] README fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] build/spotless fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] compliance with 3rd party license

And long running thread naming convention
And treated some code warning 

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] i18n

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Small fixes

update channel
rename action to avoid colision with other binding and a too generic name

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Use of standard Thing properties

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Fix sender identifier error with special character

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Add encoding parameter

For non latin character in SMS

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Split local and remote modem in two thing-types

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply code review (removing unnecessary method)

Signed-off-by: Gwendal Roulleau <[email protected]>

Signed-off-by: Gwendal Roulleau <[email protected]>
Co-authored-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Andras Uhrin <[email protected]>
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this pull request Jan 8, 2023
* [smsmodem] Initial contribution

This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] README fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] build/spotless fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] compliance with 3rd party license

And long running thread naming convention
And treated some code warning 

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] i18n

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Small fixes

update channel
rename action to avoid colision with other binding and a too generic name

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Use of standard Thing properties

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Fix sender identifier error with special character

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Add encoding parameter

For non latin character in SMS

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Split local and remote modem in two thing-types

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply code review (removing unnecessary method)

Signed-off-by: Gwendal Roulleau <[email protected]>

Signed-off-by: Gwendal Roulleau <[email protected]>
Co-authored-by: Gwendal Roulleau <[email protected]>
@dalgwen dalgwen deleted the smsmodem_binding_initial_contribution branch February 6, 2023 23:28
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
* [smsmodem] Initial contribution

This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] README fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] build/spotless fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] compliance with 3rd party license

And long running thread naming convention
And treated some code warning 

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] i18n

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Small fixes

update channel
rename action to avoid colision with other binding and a too generic name

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Use of standard Thing properties

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Fix sender identifier error with special character

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Add encoding parameter

For non latin character in SMS

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Split local and remote modem in two thing-types

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply code review (removing unnecessary method)

Signed-off-by: Gwendal Roulleau <[email protected]>

Signed-off-by: Gwendal Roulleau <[email protected]>
Co-authored-by: Gwendal Roulleau <[email protected]>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
* [smsmodem] Initial contribution

This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] README fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] build/spotless fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] compliance with 3rd party license

And long running thread naming convention
And treated some code warning 

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] i18n

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Small fixes

update channel
rename action to avoid colision with other binding and a too generic name

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Use of standard Thing properties

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Fix sender identifier error with special character

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Add encoding parameter

For non latin character in SMS

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Split local and remote modem in two thing-types

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply code review (removing unnecessary method)

Signed-off-by: Gwendal Roulleau <[email protected]>

Signed-off-by: Gwendal Roulleau <[email protected]>
Co-authored-by: Gwendal Roulleau <[email protected]>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Jan 6, 2024
* [smsmodem] Initial contribution

This binding connects to a USB serial GSM modem (or a network exposed one, a.k.a ser2net) and allows openHAB to send and receive SMS through it.

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] README fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] build/spotless fix

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] compliance with 3rd party license

And long running thread naming convention
And treated some code warning

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] i18n

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Small fixes

update channel
rename action to avoid colision with other binding and a too generic name

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Use of standard Thing properties

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Fix sender identifier error with special character

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Add encoding parameter

For non latin character in SMS

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Split local and remote modem in two thing-types

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply review

Signed-off-by: Gwendal Roulleau <[email protected]>

* [smsmodem] Apply code review (removing unnecessary method)

Signed-off-by: Gwendal Roulleau <[email protected]>

Signed-off-by: Gwendal Roulleau <[email protected]>
Co-authored-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Andras Uhrin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants