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
Get SMS received node #11
Comments
Maybe I need to get back to this package - I was using this but with old AT stuff, and the "receiving" part is all thats holding mw back. |
This have been requested before by @grawsom himself in #6. The biggest problem for me is that I can't test this as my router don't do sms. So to make this I would need some info from you guys on how to be successful and manage read/unread sms and maybe delete sms. Looking at the API sepcs I can see a function called Do you see a logical way of receiving a sms? My thoughts of the flow:
This would clear up the inbox of the router and in case for errors the sms will be unread in router and be deleted on next successful run. |
@ioull @zinen I will try to get back to my project - hopefully at the lastest this week, and see if we can get this working, I'm using Huawei 3372h-320, so I can send and receive sms's. |
Reading this code https://github.com/chenwei791129/Huawei-LTE-Router-SMS-to-E-mail-Sender/blob/master/check-sms.py (from python library) It seems that it use getSmsList to get the smscontent and the call phone number. |
Try this out @grawsom. What do you see as result? const huaweiLteApi = require('huawei-lte-api')
let connection
async function getSms() {
try {
connection = new huaweiLteApi.Connection('http://admin:password@192.168.8.1/')
await connection.ready
const result = await new huaweiLteApi.Sms(connection).getSmsList()
console.log('getSmsList result =', result)
} catch (error) {
console.error('Ended in error:')
console.error(error)
} finally {
// finallyCode - Code block to be executed regardless of the try result
const resultLogout = await huaweiLteApi.User(connection).logout()
console.log('result from logout=',resultLogout)
connection = null
}
}
getSms() |
@zinen I get this error with this scrìpt
Like I said back to the drawing board, I now have a running sample that reads sms then delete the sms, only problem is I get error 125003: Unknown. If I just use my readsms function and set the inject node to do this every 5 sec. I get this error on every third on.
I then went along and did the same with your "send sms" and I get the same error on every 3'one. I have LTE-sms and I have "tried" to add you to my private repository - and added my flow to readme for you to see. |
@zinen if I do this, I can do it again and again, but how to gat that in my node without getting errors. const huaweiLteApi = require('huawei-lte-api')
let connection
async function getSms() {
try {
connection = new huaweiLteApi.Connection('http://admin:password@192.168.8.1/')
await connection.ready
const result = await new huaweiLteApi.Sms(connection).getSmsList()
console.log('getSmsList result =', result)
} catch (error) {
console.error('Ended in error:')
console.error(error)
} finally {
const user = new huaweiLteApi.User(connection)
// finallyCode - Code block to be executed regardless of the try result
const resultLogout = await user.logout()
console.log('result from logout=',resultLogout)
connection = null
}
}
getSms() I get this result.
|
Okay, looks like you acual got something back. |
Yes - .. But I can't get it to work in the node,. don't know how to go on from here. |
@zinen
|
I can't test this so this topic is going stale. Closing until new request and testers comes forward. |
It could be very interressant to have a node which receive the SMS in order to do something using sender phone number and text message !
The text was updated successfully, but these errors were encountered: