суббота, 5 декабря 2015 г.

Convenient free parking near Helsinki Vantaa Airport. Бесплатная парковка рядом с Аэропортом Хльсинки

Hi,

Wanted to go on vacation for a month and such a long period could be pricey with airport parking, both provided by airport itself and independent one(which has a shuttle bus), cost more than 100 EUR. So I wanted to find a free parking nearby. Luckily I found one, it's Eureka's parking in Tikkurila. It's very big, almost always has a space, absolutely free and very conveniently situated - just a short walk to a Tikkurila Train/Metro station. Then it's just 3 stops with 'I' train and you are there, in the airport, currently train station is outside of the terminal, but this will change and they have a free shuttle bus to the Terminal,

Here's a link to the place on GoogleMaps

Привет, хотел полететь через Хельсинки в отпуск, на месяц, и парковка выходила дороже 100 Евро. Но я нашёл бесплатную и удобную парковку совсем рядом с аэропортом. Это парковка Эврики (ссылка есть выше), там много места, она полностью бесплатная и от неё 5-10 минут пешком до станции Тиккурила от которой идёт поезд I прямо в терминал. Понятно что с чемоданами тащиться через город неудобно, поэтому я делал так: подъезжаем непосредственно к платформе (ссылка на парковку рядом с платформой), разгружаемся, отвозим машину к Эврике и водитель пешком налегке идёт к станции.

О самом путешествии на месяц в Испанию с детьми расскажу попозже.

четверг, 19 ноября 2015 г.

SCOM PowerShell porn

Hi,

Just wanted to share with everyone some PowerShell craziness I used to analyze management pack full of overrides. This command will process all overrides in a specified Management Pack(s) and will show the corresponding Rule/Monitor ID and Display name, Rule/Monitor enabled state, display name for the context of the override, override parameter/property and its value. This thing can process any override, no matter which type - Monitor Property, Monitor Configuration, Rule Property or Rule Configuration. You can add export-csv instead of the last select to put everything in the nice spreadsheet.

Get-ScomOverride | ? {$_.Identifier -like "*Veeam.overrides*"} | Select name, @{n='Rule';e={if($_.Rule){(Get-ScomRule -id $_.Rule.Id).displayname}else{(Get-ScomMonitor -id $_.Monitor.Id).displayname}}}, @{n='RuleID';e={if($_.Rule){(Get-ScomRule -id $_.Rule.Id).name}else{(Get-ScomMonitor -id $_.Monitor.Id).name}}}, @{n='RuleEnabled';e={if($_.Rule){(Get-ScomRule -id $_.Rule.Id).Enabled}else{(Get-ScomMonitor -id $_.Monitor.Id).Enabled}}}, @{n='Context2';e={if($_.Context){(Get-ScomClass -id $_.Context.Id).displayname}}}, @{n='PropPar';e={if($_.Property){$_.Property}else{$_.Parameter}}}, Value | Sort RuleEnabled, Rule | Select Rule, RuleEnabled, PropPar, Value

пятница, 26 июня 2015 г.

Remove specific data from XML with PowerShell. Records from SCOM Default User MP for example

Hi,

Just to save for myself too. I was playing with XML support in PowerShell and was able to use the following to delete part of the XML. This is very useful, especialy for dealing with Operations Manager Default User Management Pack. You can select data for a specific Management Pack and delete it, so that the desired Management pack can be removed without deleting the Default User MP.
$xml = [xml](Get-Content ".\Microsoft.SystemCenter.OperationsManager.DefaultUser.xml")
$xml.ManagementPack.Monitoring.Overrides.MonitorPropertyOverride | ? {$_.Monitor -like "*Exchange*" -or $_.Context -like "*Exchange*"} | % {$_.ParentNode.RemoveChild($_)}
You can also export these contents before deleting. Like that
$xml.ManagementPack.Monitoring.Overrides.MonitorPropertyOverride | ? {$_.Monitor -like "*Exchange*" -or $_.Context -like "*Exchange*"} | % {$_.OuterXML} | Out-File .\MPO.xml

 To save the update MP, use Save method:
$xml.Save("FullPath")

четверг, 12 марта 2015 г.

Win8 WiFi "limited" issue and old DLink router



Hi,

You all probably already saw a lot of different fixes for the "limited" WiFi in Windows 8. TCP/IP stack reinstallations, WiFi network re-adding and many more. Well, they didn't work for me.

The reason for my troubles was DHCP from my old Dlink router. For some reasons when my router were allocating addresses dynamically with pre-set lease time, my Win8 devices were loosing connection from time to time and WiFi state were switching to "limited" state. A workaround was to restart the router, this worked for me, but then I decided to understand the source of the problem.

It turned out that DHCP renew command didn't work. My thought is that my old router has its own internal sense of current date, time and timezone :) I didn't need to fix that because my router is not a time source. And I think what is happening is that the router had it's own sense of lease time and its own sense of when IP address is expired or not, probably this doesn't work well with Windows 8.

To fix that I've added fixed, static DHCP mapping for Windows 8 devices and it worked! Now I don't have issues with Windows8 WiFi devices and I don't need to change my router (originally I thought it's a bug in the firmware and due to my router being too old I thought I had to change it)

пятница, 23 января 2015 г.

Отчётность ПФР, ФСС, Налоговая в XML (электронном) формате

С недавних пор контролирующие органы делают упор на предоставление отчётности в электронном виде.

Для многих специалистов пользовавшихся "бумажным" вариантом, переход на электронную отчётность может превратится в настоящий кошмар #спасибородинезаэто. Контролирующие органы разные, их немало, отчётность везде разная и если раньше можно было найти стандартные формы которые можно было научится заполнять и делать это каждый отчётный период то с электронной отчётностью эти формы как правило не работают.

Заблуждение Первое. Стандартную Форму можно сохранить и отправить в XML формате. Это в большинстве случаев не правда. В большинстве случаев стандартная форма распространяется в виде Word или Excel файла, при сохранении в формате XML, сам документ сохраняется в XML, то есть все параметры таблицы если это Excel и все ширины страниц и формы шрифта, если это Word. В то время как для отчётности в формате XML, это формат должен содержать только отчётность только цифры и ничего больше. Причём это должно быть в специальном формате, который "понимают" электронные сервисы контролирующих органов.

Заблуждение Второе. Без 1С или другой дорогостоящей платформы электронную отчётность не сформировать и не выгрузить. Тоже не правда и тут мы приступаем к "соли" моего поста - любой (требуется проверка, я знаю о ФСС, ПФР и Налоговой) контролирующий орган имеет в общей доступности бесплатное приложение для формирования отчётности в электронном формате.

Теперь по порядку:

Налоговая (nalog.ru)
Приложение Налогоплательщик ЮЛ http://nalog.ru/rn78/program/all/nal_ul/
Оставляет достаточно приятные впечатления, удобно устанавливается, достаточно интуитивное управление и создание документов. Если не знаете с чего начать рекомендую в меню Документы выбрать "Ввод с помощью мастера документов"

Далее нужно заполнить все необходимые данные о налогоплательщике двигаясь по удобно сформированным шагам

На 6 шаге нужно заполнить саму декларацию, то что требует заполнения выделяется зелёным фоном.

Некоторые абзацы отчёта могут быть заполнены но не включены, их нужно включить чтобы они появились в выгрузке
Если какой-то из разделов отсутствует (серый), его нужно добавить. Кроме того рекомендую периодически нажимать на иконку с буквой Р или клавишу F5 чтобы те поля которые высчитываются - посчитались.

Когда документ заполнен нужно нажать на иконку с буквой К и таким образом проверить что ошибок нет. Далее можно сохранять документ и в последнем шаге мастера выгружать в XML формате пригодном для отправки электронной отчётности.

ФСС (fss.ru)
АРМ Подготовка отчётов для ФСС http://fss.ru/ru/fund/download/55818/index.shtml
Скачиваем первый файл вверху страницы, установка не такая интуитивная, необходимо запускать с правами администратора (правой кнопкой мыши -> запуск от имени Администратора). В процессе установки программа будет скачивать базу адресов.

В самой программе необходимо для начала перейти в раздел Справочники и Добавить Страхователя и при необходимости физических лиц или мед учреждения

Затем необходимо перейти в меню "Учётная работа" и выбрать необходимую форму, затем нажать иконку Вставить

Дальше необходимо заполнить форму, к сожалению не так всё очевидно как в налоговой программе по-этому я подразумеваю что вы в курсе как заполнять формы для ФСС, и в конце выбрать иконку "Выгрузить XML", в результате сформируется XML файл который можно использовать для предоставления электронной отчётности
ПФР (pfrf.ru)
Методом проб и ошибок а также научного тыка выбрана программа Spu_orb разработанная в Оренбурге http://www.pfrf.ru/branches/orenburg/info/~rabot/program
Установка и использование довольно интуитивны и понятны. Позже напишу поподробнее.

Будет апдейт.

вторник, 20 января 2015 г.

Incorrectly flashed atmega328p back to life

Hi,

I'm new to microprocessor programming and all the related stuff (bootloaders, fuses, ISPs, etc.), so I faced a newbee issue.

Symptom:

I was trying to flash atmega328P with bootloader that will suport 8MHz internal clock (so that I don't need an external oscillator) and can be futher optimized in terms of power consumption. I did everything correctly in terms of wiring USBasp programmer (I was using the following instructable), but then unintentionally (I just knew that LilyPad bootloader would also work) I programmed LilyPad's bootloader which also means LilyPad's fuses, which also means (as I later discovered) usage of external oscillator (nice tool to decode fuses).

So, that brought me all the way to "Yikes invalid signature 000000" with usage of -F option in avrdude, or "avrdude: error: programm enable: target doesn't answer. 1" without it. Different "-B" options (-B250, -B5, etc.) didn't work for me. Chip is just completely silent.

And also "avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc" when I try to talk to the MCU via Serial ports with help of FTDI chip. At least I could see that chip is not dead comletely, it's replying something. Probably abrakadabra and maybe it could be decoded by using a proper avrdude settings, but I tried different baud rates and other settings and nothing worked.

Cause:

MCU just expect an external clock source and just doing nothing without it.

Resolution:

Connect an oscillator. But what if you don't have a spare one? Do it like me:


This is a wireless NRF24L01 board and it has an oscillator on it, just connect board ground (yellow on the photo and PIN1 on this wireless board) to your MCU ground and oscillator lines (green and white) to PIN9 and PIN10 on your atmega328P.

This fixed everything for me, Chip is alive and I can see all fuses, so I was able to reprogram them.

Although it's a little bit ackward - because oscillator is 16Mhz and LilyPad bootloader expects 8Mhz.

Hopefully this post will save some time for someone who faced the same issue.

UPDATE:
Looks like this is only a one part of the puzzle, the other one is protocol issue which I also mentioned above, it is still present after a correct bootloader is flashed.

Apparently the issue is with not very accurate internal oscillator - it just doesn't work with high baud rates for programming. There is a very good and detailed explanation on how to fix this by re-compiling a bootloader to use slower upload speed, I do not have necessary tools to do that, so I do think I'm going to do that, I think for me it's OK to load firmware via the ISP


I was able to confirm that it's working and chip is perfoming properly using its internal oscillator. Then I can install a code that will programmaticaly set slower baud rate if I need to talk to the firmware onboard the atmega chip.

пятница, 16 января 2015 г.

Netgear Stora with connected Arduino and Zabbix

Was able to install Zabbix on my Netgear Stora device. Took some time and setup code modifications were required (because mysql is lower version in Stora as well as some php addons).

Zabbix is very usefull tool to quickly configure the monitoring and notification system with ability to check metric charts and trends and set triggers and actions.

I'm using it now to monitor the free space and overall health of the Netgear Stora device, router traffic (via SNMP) and, what is more important for me - different aspects of Arduino subsystem (I have Arduino Due connected via USB). I've created a PHP script which takes commands as parameters and returns data reported by arduino. Zabbix agent is using this script to get data from Arduino. Currently I monitor RAM usage of my Arduino system (because has a dynamic tree-like memory allocation system for data reported by remote nodes), so that I can see if my Arduino is about to kaboom :) because of too many nodes reporting to the root node or just because of firmware glitch on Arduino, illumination using the photoresistor on one of the nodes (just for testing purposes), here is the chart screenshot


Also I'm collecting number of cycles certain node is unresponsive, so that zabbix can notify me if certain node is not responding anymore. I have plans to use Zabbix way of autodiscovering new nodes and automatically monitoring them, currently I've just added 2 active node manually, here is the configuration of the Zabbix item, Arduino RAM usage in this case.


Below is a config of my zabbix agent. It should be placed as a separate .conf file into zabbix_agentd.conf.d subfolder, but before that you have to uncomment the following line in the main agentd config:

Include=/opt/usr/local/etc/zabbix_agentd.conf.d/*.conf

userparameter_arduino.conf:

UserParameter=arduino.light,/opt/bin/php -f /home/sg_parser/ardu_get.php l 1 3
UserParameter=arduino.ram,/opt/bin/php -f /home/sg_parser/ardu_get.php s 0 3
UserParameter=arduino.cycles[*],/opt/bin/php -f /home/sg_parser/ardu_get.php c $1 3

All of the paramters for ardu_get.php is just to extract the numeric part of certain node, light sensor is on the node 1 for example, while RAM is on the parent or 0 node and cycles can be gathered for any discovered node.

And now non-arduino part of using Zabbix, here is free space on my Stora, Stora CPU usage and traffic via router (using SNMP data). I'm also monitoring mysql load and apache performance.