My Industrial Engineering final year project is based upon a weight scale that measures LPG content inside a cylinder, and relays this information to consumers and refillers via SMS.
The SMS reads as follows:
Total Weight: 7.705 kg
LPG Weight: 3.305 kg
LPG Remaining: 82.621%
Wednesday 07.03.2018 -- 17:16:03
I have a D-LINK DWM-157 plugged into my computer, where the SMS messages are received in D-LINK's software. I need to somehow extract the contents of these messages and process/store them in a database.
I personally have minimal programming experience, so I need advice on how to extract this SMS data for further processing.
Related
I have a use case where lets i get balances based on date and I want to show correct balances of each day. If get an update on older date all my balances of that account from that date gets changed.
for eg
Account Date balance Total balance
IBM 1Jun 100 100
IBM 2Jun 50 150
IBM 10Jun 200 350
IBM 12Jun 200 550
Now I get a message of date 4 Jun (this is the scenario some transaction is done back dated, or some correction and its frequent scenario)
Account Date balance Total balance
IBM 1Jun 100 100
IBM 2Jun 50 150
IBM 4Jun 300 450 ----------- all data from this point changes
IBM 10Jun 200 650
IBM 12Jun 200 850
Its a streaming data and at any point I want the correct balance to be shown for each account.
I know flink and kafka are good for streaming use case where if an update of a particular date doesnt trigger update on all data from that point onwards. But can we achieve this scenario as well efficiently or is this NOT a use case of these streaming tech at all ?
Please help
You can't modify a past message in the queue, therefore you should introduce a new message that invalidates previous one. For instance, you can use an ID for each transaction (and repeat it if you need to modified it). In case you have two or more messages with the same ID, you keep with the last one.
Take a look to KTable from Kafka Streams. It can help you to aggregate data using that ID (or any other aggregation factor) and generate a table as a result with the valid resume until now. If a new message arrives, table updates will be emitted
I want to know how is the term frequency factor i.e. tf calculated ?
I want to know the tf of the content. The results for the following query :
curl -g 'http://localhost:8983/solr/nutch/select?indent=on&q=python&wt=json&fl=title,score,[features%20efi.query=python%20store=myfeature_store]',content
is:
...
{
"title":"Raspberry Pi Stack Exchange",
"content":"Raspberry Pi Stack Exchange\nStack Exchange Network\nStack Exchange network consists of 175 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.\nVisit Stack Exchange\nLoading…\n0\n+0\nTour Start here for a quick overview of the site\nHelp Center Detailed answers to any questions you might have\nMeta Discuss the workings and policies of this site\nAbout Us Learn more about Stack Overflow the company\nBusiness Learn more about hiring developers or posting ads with us\nLog in\nSign up\ncurrent community\nRaspberry Pi\nhelp\nchat\nRaspberry Pi Meta\nyour communities\nSign up or log in to customize your list.\nmore stack exchange communities\ncompany blog\nBy using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service .\nRaspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.\nSign up to join this community\nAnybody can ask a question\nAnybody can answer\nThe best answers are voted up and rise to the top\nHome\nQuestions\nTags\nUsers\nUnanswered\nExplore our Questions\nAsk Question\nraspbian pi-3 gpio python networking wifi pi-2 usb boot ssh\nmore tags\nActive\nHot\nWeek\nMonth\n0\nvotes\n0\nanswers\n3\nviews\nHostname on router and pi do not match\nheadless\nasked 4 mins ago\nJoseph\n1\n2\nvotes\n0\nanswers\n49\nviews\nAndroid won't connect to RasPi access point\nandroid\naccess-point\nsystemd-networkd\nwpa-supplicant\nmodified 6 mins ago\nThePunisher\n121\n2\nvotes\n3\nanswers\n53\nviews\napt-get update errors after copying Raspbian to new SD card\nraspbian\napt\nmodified 17 mins ago\nifschleife\n121\n1\nvote\n5\nanswers\n444\nviews\nWifi cuts out after a few hours, have to restart Pi\nraspbian\nnetworking\nwifi\nssh\nminecraft\nmodified 53 mins ago\nCommunity ♦\n1\n2\nvotes\n2\nanswers\n369\nviews\nCan't SSH by name on stretch; can on jessie\nssh\nraspbian-stretch\nputty\nmodified 1 hour ago\nCommunity ♦\n1\n0\nvotes\n0\nanswers\n8\nviews\nHow to use only 3 GPIO pins for a JSN-SR04T waterproof ultrasonic sensor\ngpio\nsensor\nasked 2 hours ago\nPeter bill\n191\n1\nvote\n2\nanswers\n52\nviews\nGPIO Not changing its value in a particular code section\ngpio\npython\nrelay\nmodified 2 hours ago\ntlfong01\n2,465\n0\nvotes\n0\nanswers\n1\nview\nMakes OpenVPN a local Apache Webserver accessable from outside?\nweb-server\nvpn\napache-httpd\nweb-browsers\nweb\nasked 2 hours ago\nJakob\n113\n0\nvotes\n1\nanswer\n15\nviews\nsainsmart relay - switches on when pi shuts down\npi-3\nboot-issues\nanswered 2 hours ago\npir8ped\n79\n0\nvotes\n1\nanswer\n301\nviews\nRaspberry Pi Matchbox virtual keyboard missing colon\ndisplay\nmodified 2 hours ago\nCommunity ♦\n1\n-1\nvotes\n0\nanswers\n27\nviews\nHow to fix ssh connection that's been broken by dhcpcd service\nlinux\nnetworking\nssh\ndhcp\nmodified 3 hours ago\nBelserich\n1\n4\nvotes\n2\nanswers\n8k\nviews\nHow can I use OpenCV with Python 3 on a Raspberry Pi?\nopencv\npython-3\nanswered 3 hours ago\nIngo\n19.1k\n2\nvotes\n0\nanswers\n14\nviews\nRPi-Zero, HID keyboard gadget for BIOS keyboard\nusb\nkeyboard\nhid\nlibcomposite\nmodified 3 hours ago\nEphemeral\n1,561\n0\nvotes\n0\nanswers\n13\nviews\nHow do I go about auto-mounting my NTFS hard drive at boot?\nboot\nmount\nfstab\nntfs\nasked 3 hours ago\nHasake\n11\nBrowse more Questions\nHot Network Questions\nTriple Approx Symbol\nBest ways to invest for a planned house purchase in 1 year?\nVariable selection in logistic regression model\nShould rooms be designed to minimize waste of sheet goods?\nWhy is Perihelion and Shortest day in North Hemisphere different?\nHow can I estimate the speed of this code section for this microcontroller?\nShell - Navigate up 'n' directories\nLooking for an effective pattern to cope with switch statements in C#\n",
"score":0.00982895,
"[features]":"tf=2.0"},
...
How is the value 2.0 coming? The word python is coming 4 times and there are 330 words in the content.
Solr now uses the BM25 scorer and not TF/IDF directly. The tf value used in BM25 is not the exact count of the times the term occur, but uses sqrt(TF).
sqrt(4) == 2.0
Raw TF TF Score
1 1.0
2 1.141
4 2.0
8 2.828
16 4.0
Im looking to train my bot to basically extract the weight from a type of sentence and tag the intent as "#enterBMI".
I have also created an entity "#weight". I will show below in images what i have trained the bot with -
The problem i am facing is that weight is detected only for exactly the same weights that i have given training for. So 100 kg will be detected and 101 kg/100 kgs will not be detected.
Just use #sys-number entity instead of a dedicated #weight
Ok. Just a scenario.
I got about 100 smart homes. Every smart home has a different amount of door sensors, temperature sensors, humidity sensors. Every house could add or remove some of them.
For this example every temp & hum sensor uploads every 10 minutes (asynchron) their current value (via MQTT) to a server (144 Values/per day/per sensor). And all door sensors upload their state (open, closed) everytime the state changes.
In my study I just got a little insight in relational database (MySQL) and I think that is the wrong model for my purpose (but I have nearly forget everything). So could you just give me tip like:
"Search for "relational Database". "MySQL". This works fine for your case because..."
I want a database where i could add a smart home: with informations like city, street, inhabitant,.... And to this smart home I add sensors like (temp1, temp2, temp3, temp4, door1, door2, hum1). Important: I want to be able to add and remove sensors.
and for every Sensor I want the data stored like this:
temp1
Date Temperature
01.01.2016 09:42 22.2°C
01.01.2016 09:52 21.2°C
01.01.2016 10:02 21.5°C
01.01.2016 10:42 21.7°C
01.01.2016 10:42 21.9°C
01.01.2016 10:42 21.8°C
01.01.2016 10:42 22.1°C
is this a object-orient-database?
Would it be possible to get the History of the last seven days from smarthome45.door7
greetings from germany
Edit:
"Unclear. What is your question ? Please edit." – kebs
I don't have much experience in databases. I read some summarys of the different database models but I still don't know, which of them would fit for my project. So I just hoped, that someone who has some experience in databases could give me some advices. Because for me it looks like I have a database in a database.
Depending on your question any relational database (XXX SQL) would work. You must design database to handle your time based data.
We're using 3 marketplaces - our local is UK, so we've got GBP figures for the payment settlement reports, but the other 2 are in EUR. I could do with at least knowing how much Amazon have paid us in GBP for the 2 EUR reports, but I can't see any way of doing that?
I'm open to the idea of using some other API to get Amazon's payout exchange rates on the date of the report or other ideas.
I realise that I can use an external currency exchange data source, but I want to know what Amazon's exchange rate is for paying out since they almost certainly won't match.
I have tried all 3 settlement reports: -
_GET_FLAT_FILE_PAYMENT_SETTLEMENT_DATA_
_GET_PAYMENT_SETTLEMENT_DATA_
_GET_ALT_FLAT_FILE_PAYMENT_SETTLEMENT_DATA_
All settlement information uses the currency of the corresponding marketplace: your Amazon.co.uk settlement will be in GBP, while an Amazon.de settlement will be in EUR. The conversion to another currency is not part of the settlement.
IIRC, it is the bank that actually converts it to GBP, not Amazon. Therefore, you will not find an Amazon API to find its conversion rate (or conversion fees for that matter).