Beta V0_6b1

9 years 9 months ago #133 by EasyIoT
Replied by EasyIoT on topic Beta V0_6b1

leone2805 wrote:

EasyIoT wrote: Installing modem is really hard work. Sometimes it's not only SW problem it's also HW problem. I shortcut fuse F3 (Raspberry Pi, B model Rev2) to supply enough current to modem.

Yes, ControlModule doesn't working. Replace EasyIoT.exe with this one and it should work.

You almost guessed SMS helper function. It's already implemented, try:

SmsHelper.SendSms("+xxxxxxxxxxx","test sms");


Thanks,
now ControlModule is working again.

SmsHelper.SendSms is also working but when I receive the message it's prefixed by a string AT+CMGL="ALL"

So even if on the log I see the correct message string
2015-01-24T10:38:51.2697940+01:00	DEBUG	EasyIoTSMSInterface				Send SMS, phoneNo:+39xxxxxxxxxx, message:DimmerValue > 97
the SMS I receive is:
AT+CMG="ALL" DimmerValue > 97


Hi, It was issue with thread locking. I've fixed that. Please download
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/MySensorsDriver.dll

I notice this issues:
-be careful which characters are you sending. I have problem with °C
-after Raspberry Pi switch on modem doesn't always work. If I later disable and enable SMS interface works OK. I don't know if this is modem issue or EasyIoT issue.
The topic has been locked.
9 years 9 months ago #136 by leone2805
Replied by leone2805 on topic Beta V0_6b1

EasyIoT wrote: Hi, It was issue with thread locking. I've fixed that. Please download
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/MySensorsDriver.dll

I notice this issues:
-be careful which characters are you sending. I have problem with °C
-after Raspberry Pi switch on modem doesn't always work. If I later disable and enable SMS interface works OK. I don't know if this is modem issue or EasyIoT issue.


Hi,
after downloading the files and replacing them I caught an exception
Missing method SMSGateway.SMSService::SendSMSInternal(string,string) in assembly /home/pi/easyiot/SMSGateway.dll, referenced in assembly /home/pi/easyiot/EasyIoT.exe
2015-01-24T17:54:00.7856280+01:00	ERROR	EasyIoTSMSInterface				Error thread:Method not found: 'SMSGateway.SMSService.SendSMSInternal'.,   at SMSGateway.SMSService.workerThread () [0x00000] in <filename unknown>:0 
2015-01-24T17:54:01.1756770+01:00	ERROR	EasyIoTSMSInterface				Internal error.
So I tried to download iot-playground.com/swdownload/beta/SMSGateway.dll and it worked!

Yes, I know the issue with some special character: with GSM Default Alphabet you can fit at most 160 chars into single SMS , but they're from limited set:

· all Latin small and large
· all digits
· some Greek
· some other national
· some symbols like @ ! " # & / ( ) % * + = - , . : ; < > ?

So no ° char is admitted :-(

I'll continue testing and I'll keep you updated.
The topic has been locked.
9 years 9 months ago - 9 years 9 months ago #140 by EasyIoT
Replied by EasyIoT on topic Beta V0_6b1

leone2805 wrote:

EasyIoT wrote: Hi, It was issue with thread locking. I've fixed that. Please download
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/MySensorsDriver.dll

I notice this issues:
-be careful which characters are you sending. I have problem with °C
-after Raspberry Pi switch on modem doesn't always work. If I later disable and enable SMS interface works OK. I don't know if this is modem issue or EasyIoT issue.


Hi,
after downloading the files and replacing them I caught an exception
Missing method SMSGateway.SMSService::SendSMSInternal(string,string) in assembly /home/pi/easyiot/SMSGateway.dll, referenced in assembly /home/pi/easyiot/EasyIoT.exe
2015-01-24T17:54:00.7856280+01:00	ERROR	EasyIoTSMSInterface				Error thread:Method not found: 'SMSGateway.SMSService.SendSMSInternal'.,   at SMSGateway.SMSService.workerThread () [0x00000] in <filename unknown>:0 
2015-01-24T17:54:01.1756770+01:00	ERROR	EasyIoTSMSInterface				Internal error.
So I tried to download iot-playground.com/swdownload/beta/SMSGateway.dll and it worked!

Yes, I know the issue with some special character: with GSM Default Alphabet you can fit at most 160 chars into single SMS , but they're from limited set:

· all Latin small and large
· all digits
· some Greek
· some other national
· some symbols like @ ! " # & / ( ) % * + = - , . : ; < > ?

So no ° char is admitted :-(

I'll continue testing and I'll keep you updated.


There are more supported characters. See wiki . Since I don't know exactly which characters user can use I've added regex expression filter to filter allowed characters. Default filter allow most common characters, but it can be always changed in systemconfig.xml under <SMSCharRegex></SMSCharRegex> (it will be aromatically added).

Now you can have units for temperature in °C and in message will be visible only C.

I've also added 60s delay to start automation engine at EasyIoT server startup. After 60s all drivers and modem should be up and running and automation engine can start executing commands.

Updated files:
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/MySensorsDriver.dll
The topic has been locked.
9 years 9 months ago #149 by leone2805
Replied by leone2805 on topic Beta V0_6b1

EasyIoT wrote:
There are more supported characters. See wiki . Since I don't know exactly which characters user can use I've added regex expression filter to filter allowed characters. Default filter allow most common characters, but it can be always changed in systemconfig.xml under <SMSCharRegex></SMSCharRegex> (it will be aromatically added).

Now you can have units for temperature in °C and in message will be visible only C.

I've also added 60s delay to start automation engine at EasyIoT server startup. After 60s all drivers and modem should be up and running and automation engine can start executing commands.

Updated files:
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/MySensorsDriver.dll


Of course do you mean

Updated files:
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/SMSGateway.dll

isn't it? ;-)

Ok , i tried and actually characters like ° aren't sent also if present in the SMS text string.
But I noticed that also some characters that should be allowed (like >,<,&) aren't sent.
Looking at systemconfig.xml I saw this line:
<SMSCharRegex>[^A-Za-z0-9 \r\n@£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ!"#$%&amp;amp;'()*+,\-./:;&amp;lt;=&amp;gt;?¡ÄÖÑܧ¿äöñüà^{}\\\[~\]|€]</SMSCharRegex>
As you can see the escaping of &,< and > isn't correct.
So I replaced with this:
<SMSCharRegex>[^A-Za-z0-9 \r\n@£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ!"#$%&amp;'()*+,\-./:;&lt;=&gt;?¡ÄÖÑܧ¿äöñüà^{}\\\[~\]|€]</SMSCharRegex>
but the file systemconfig.xml was overwritten at server restart or after a configuration change and the bad SMSCharRegex was restored.
Anyway, to test my change I set the systemconfig.xml with immutable attr (chattr +i) and after this I was able to send SMS with characters like <,>,& ...

It also would be great if S_DIMMER status (ON,OFF based on Sensor.DigitalValue) in Web UI were shown, for example like S_SWITCH where we have two distinct icons (socket_on.png and socket_off.png). Now we see only Sensor.DimmerLevel on Web UI and we don't know if the Dimmer is on or off.

Thanks
Leone
The topic has been locked.
9 years 9 months ago #153 by EasyIoT
Replied by EasyIoT on topic Beta V0_6b1

leone2805 wrote:

EasyIoT wrote:
There are more supported characters. See wiki . Since I don't know exactly which characters user can use I've added regex expression filter to filter allowed characters. Default filter allow most common characters, but it can be always changed in systemconfig.xml under <SMSCharRegex></SMSCharRegex> (it will be aromatically added).

Now you can have units for temperature in °C and in message will be visible only C.

I've also added 60s delay to start automation engine at EasyIoT server startup. After 60s all drivers and modem should be up and running and automation engine can start executing commands.

Updated files:
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/MySensorsDriver.dll


Of course do you mean

Updated files:
iot-playground.com/swdownload/beta/EasyIoT.exe and
iot-playground.com/swdownload/beta/SMSGateway.dll

isn't it? ;-)

Ok , i tried and actually characters like ° aren't sent also if present in the SMS text string.
But I noticed that also some characters that should be allowed (like >,<,&) aren't sent.
Looking at systemconfig.xml I saw this line:
<SMSCharRegex>[^A-Za-z0-9 \r\n@£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ!"#$%&amp;amp;'()*+,\-./:;&amp;lt;=&amp;gt;?¡ÄÖÑܧ¿äöñüà^{}\\\[~\]|€]</SMSCharRegex>
As you can see the escaping of &,< and > isn't correct.
So I replaced with this:
<SMSCharRegex>[^A-Za-z0-9 \r\n@£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ!"#$%&amp;'()*+,\-./:;&lt;=&gt;?¡ÄÖÑܧ¿äöñüà^{}\\\[~\]|€]</SMSCharRegex>
but the file systemconfig.xml was overwritten at server restart or after a configuration change and the bad SMSCharRegex was restored.
Anyway, to test my change I set the systemconfig.xml with immutable attr (chattr +i) and after this I was able to send SMS with characters like <,>,& ...

It also would be great if S_DIMMER status (ON,OFF based on Sensor.DigitalValue) in Web UI were shown, for example like S_SWITCH where we have two distinct icons (socket_on.png and socket_off.png). Now we see only Sensor.DimmerLevel on Web UI and we don't know if the Dimmer is on or off.

Thanks
Leone


Change config files only when server is not running or it will be overwritten at shutdown.
Thanks for new regex string. I've copied existing from internet I did not tested it in detail.

At the moment dimmer control does not update value. For example if dimmer is at 20% and you switch of dimmer with button, dimmer stays at 20%. It should be at 0%. I have some problems if value is updated (cyclic sending values), because of that I switched off update. I will fix that in future.
The topic has been locked.
9 years 9 months ago #160 by lewys.martin
Replied by lewys.martin on topic Beta V0_6b1
what hardware is used for dimmer?
The topic has been locked.
Time to create page: 0.467 seconds

Forum latest

  • No posts to display.