<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gagan Deep on Medium]]></title>
        <description><![CDATA[Stories by Gagan Deep on Medium]]></description>
        <link>https://medium.com/@pandafy?source=rss-23a4bb53e695------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*UDv9o5rketA3Jk4AL9FeKw.jpeg</url>
            <title>Stories by Gagan Deep on Medium</title>
            <link>https://medium.com/@pandafy?source=rss-23a4bb53e695------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:18:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pandafy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Flashing OpenWrt on TP-Link Archer C50]]></title>
            <link>https://medium.com/code-for-cause/flashing-openwrt-on-tp-link-archer-c50-e34b4c292c50?source=rss-23a4bb53e695------2</link>
            <guid isPermaLink="false">https://medium.com/p/e34b4c292c50</guid>
            <category><![CDATA[openwrt]]></category>
            <category><![CDATA[computer-network]]></category>
            <category><![CDATA[router]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Gagan Deep]]></dc:creator>
            <pubDate>Sun, 24 Jan 2021 14:01:24 GMT</pubDate>
            <atom:updated>2021-01-28T13:06:26.094Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TUbeOWyoKDj-W1A26cnEOg.png" /></figure><p><strong>Note:</strong> The router referenced in this blog is an EU variant of the router, i.e. TP-Link Archer C50 V4. It is recommended that you reference both OEM and OpenWrt documentation for your router before following these steps.</p><p>⚠️ <strong>Disclaimer:</strong> Failing to properly follow mentioned steps may end up in a bricked router. The goal of this blog is to share knowledge and document everything in one place. Proceed with caution at your own risk.</p><h3>Prologue</h3><p>I have been contributing to <a href="https://openwisp.org/">OpenWISP</a> for over a year now. OpenWISP is a network management software that can be used to manage network devices primarily running OpenWrt. I have been using a virtual machine to suffice for a networking device. But, after getting comfortable with VM, I wanted to get my hands dirtier with a real router.</p><p>I chose <a href="https://www.tp-link.com/in/home-networking/wifi-router/archer-c50/">TP-Link Archer C50</a> after thorough research for OpenWrt compatible router in my local market. It comes with 8MB Flash storage and 64MB RAM. More hardware information can be found at <a href="https://openwrt.org/toh/tp-link/archer-c50">OpenWrt’s device page for TP-Link Archer C50</a>.</p><p>While there are pre-built OpenWrt images available from the community, I chose to build the image on my own.</p><p><strong>Note:</strong> If you want to use the pre-built images, you can reference the <a href="https://openwrt.org/toh/tp-link/archer-c50#v4_installation_instructions)">concerned section in OpenWrt’s documentation</a>.</p><h3>Building Firmware Image</h3><p>Building the firmware image on your own is simple as well. You’ll have just followed these steps:</p><p><strong>Step 1:</strong> Download the firmware for the router from <a href="https://www.tp-link.com/en/support/download/archer-c50/v4/">TP-Link’s download center</a>. The link will download an archive. Extract the contents of the archive and rename the firmware file(it will be with .bin extension) to tpl.bin.</p><p><strong>Step 2:</strong> Download the OpenWrt sysupgrade for this router from <a href="http://downloads.openwrt.org/releases/19.07.5/targets/ramips/mt76x8/openwrt-19.07.5-ramips-mt76x8-tplink_c50-v4-squashfs-sysupgrade.bin">OpenWrt’s website</a>. Rename this file to owrt.bin.</p><p><strong>Step 3:</strong> Move these files under the same directory for your ease.</p><p><strong>Step 4:</strong> Open the terminal in the said directory, and execute the following commands. These commands will build the required firmware image for your router</p><pre>dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1<br>dd if=tpl.bin of=tmp.bin bs=131584 count=1<br>dd if=tmp.bin of=boot.bin bs=512 skip=1<br>cat boot.bin &gt;&gt; tp_recovery.bin<br>cat owrt.bin &gt;&gt; tp_recovery.bin</pre><h3>Setting up a TFTP Server</h3><p>TFTP — Trivial File Transfer Protocol — is a very simple protocol, such that it can be implemented in small boot loaders like a router.</p><p>While booting, the bootloader listens to TFTP requests for transferring a flash image. This characteristic of the bootloader, allows us to flash the router using TFTP Server.</p><p>A router can either have a TFTP client or server. The bootloader of TP-Link Archer C50 integrates a TFTP client. This means that we will have to run a TFTP server.</p><p>You will need to follow these steps, to properly configure a TFTP server:</p><p><strong>Step 1:</strong> Install aftpd</p><pre>sudo apt install aftpd</pre><p><strong>Step 2:</strong> Create a directory from where you want to serve the image file</p><pre>mkdir -p ~/srv/tftp/</pre><p><strong>Step 3:</strong> Put the tp_recovery.bin image file in the tftp directory</p><p><strong>Step 4:</strong> Change the ownership of the folder and the file in it</p><pre>sudo chown nobody:nogroup -R /srv/tftp</pre><p><strong>Step 5:</strong> Run TFTP server</p><pre>sudo atftpd — daemon — no-fork — logfile — ~/srv/tftp</pre><p><strong>Note:</strong> atftpd might not be able to bind to the 69 port number. On Ubuntu, a service named inet already keeps the hold of port 69. You can stop that service using systemctl. If the system keep complaining, use fuser to kill the process as follows</p><pre>fuser -k 69/udp</pre><p><strong>Step 6:</strong> Check if your TFTP server is listening</p><pre>netstat -lunp | grep 69</pre><h3>Testing TFTP Server</h3><p>Before jumping right into the flashing your router using the TFTP server, it is generally a good practice to check whether the server is able to serve tpl_recovery.bin file or not.</p><p>It is preferred to use another computer to test the TFTP server, but you can also test it from the same machine. You’ll just need to follow these steps.</p><p><strong>Step 1:</strong> Install tftp</p><pre>sudo install tftp</pre><p><strong>Step 2:</strong> Connect to the TFTP server using the IP address of the computer running the server.</p><pre>tftp X.X.X.X</pre><p><em>Substitute X.X.X.X with the IP address of the computer running TFTP server.</em></p><p><strong>Note:</strong> If you are testing from the same computer, use 0.0.0.0 for the IP address.</p><p><strong>Step 3:</strong> Fetch tp_recovery.bin file</p><pre>get tp_recovery.bin</pre><p>You should get a message like following on the client.</p><pre>Received &lt;size of the file&gt; bytes in &lt;time taken to complete the transfer&gt; seconds</pre><p>On the server, you will get a message like this:</p><pre>&lt;Date and time&gt; &lt;host system name&gt; atftpd[&lt;some numbers I don’t understand 😅&gt;]: Serving tp_recovery.bin to &lt;IP address and port number of client&gt;</pre><p>If you see messages like above, and the tpl_recovery.bin is present on the client computer, then you are good to go. If not, it might be possible that you messed up something while setting up the TFTP server. Take a step back and check every step.</p><h3>Let’s Flash</h3><p>With everything set, we are good to go and flash the TP-Link Archer C50 V4 with OpenWrt.</p><p>Don’t get overwhelmed, just follow these steps:</p><p><strong>Step 1:</strong> Reset your router. <br><em>You will not find it in the OpenWrt’s documentation because it might not be needed but I like to start fresh.</em></p><p><strong>Step 2:</strong> Plug the power cable into the router, but don’t turn it on yet. <br><em>I prefer to use the power switch on the back of the router to control power.</em></p><p><strong>Step 3:</strong> Connect the ethernet interface of your computer to the LAN 1 port of the router.</p><p><strong>Step 4:</strong> Make sure your computer is not connected to any other network. (<em>Turn off WiFi</em>). And manually set the IP address of your wired ethernet interface to 192.168.0.66. <strong>This is important.</strong></p><p><strong>Step 5:</strong> After making all the configurations, press and hold the <strong>reset</strong> button and power on the router simultaneously.</p><p>⚠️<strong> Don’t let go of the reset button yet</strong></p><p>After 10 seconds the router will start downloading the firmware image from the TFTP server. The WPS LED will also light up during this time.</p><p>You will see a message as below on your TFTP server</p><pre>&lt;Date and Time&gt; &lt;name of host system&gt; atftpd[&lt;Some numbers I don’t understand 😅&gt;]: Serving tp_recovery.bin to 192.168.0.2:3026</pre><p>Voila! The router has started downloading the firmware image At this moment, you can let go of the reset button.</p><p>The router will then reboot(indicated by all LEDs turning off and on). After this, only the power LED will stay on and will keep blinking.</p><p>After about a minute, the router will reboot once again and you will be able to login to OpenWrt. But, before that, you will need to follow this one last step.</p><p><strong>Step 6:</strong> Either configure the ethernet interface of your system to configure its IP address automatically(using DHCP) or manually set it to 192.168.1.X (replace <em>X</em> with a desired number less than 255).</p><p><strong>Step 7:</strong> Log in to the OpenWrt dashboard by visiting 192.168.1.1 on your browser.</p><p>By default, no password is set. The username field should be already populated with root. Leave the password field blank and click on Login. Make sure you set a password later.</p><p>You can now play with OpenWrt installed on your <strong>TP-Link Archer C50 V4</strong> 🎉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZF4olK2KyvXhHHlP.png" /></figure><h3>References</h3><p>This write-up was an attempt to document everything in one place in a beginner-friendly manner. While it includes personal experiences, it would have not been possible without the awesome work of the OpenWrt community.</p><ul><li><a href="https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=01dcd574a24864c10a9c4df4304a3ce0da5c11a9">Commit adding support for TP-Link Archer C50</a></li><li><a href="https://openwrt.org/toh/tp-link/archer-c50">Device page of TP-Linker Archer C50 in OpenWrt’s documentation</a></li><li><a href="https://openwrt.org/docs/guide-user/installation/generic.flashing.tftp">Installing OpenWrt via TFTP guide in OpenWrt’s documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e34b4c292c50" width="1" height="1" alt=""><hr><p><a href="https://medium.com/code-for-cause/flashing-openwrt-on-tp-link-archer-c50-e34b4c292c50">Flashing OpenWrt on TP-Link Archer C50</a> was originally published in <a href="https://medium.com/code-for-cause">Code for Cause</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenWISP Notifications 0.2.0]]></title>
            <link>https://pandafy.medium.com/openwisp-notifications-0-2-0-192419d777c5?source=rss-23a4bb53e695------2</link>
            <guid isPermaLink="false">https://medium.com/p/192419d777c5</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[computer-network]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[openwisp]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Gagan Deep]]></dc:creator>
            <pubDate>Wed, 16 Sep 2020 11:49:50 GMT</pubDate>
            <atom:updated>2020-09-16T14:44:05.580Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aMp1JpOdJ4eUdiG5eYJAPQ.png" /></figure><p>Not long ago, we released the 0.1.0 version of OpenWISP Notifications. While preparing the 0.1.0 release, we already started working on features for the next release. Similarly, we have already planned what to bring in the next version. Our goal is to bring new features to users as soon as we complete our rigorous testing. Without further wasting your time, let’s jump right into what version 0.2.0 has to offer.</p><h3>Notable features of OpenWISP Notifications 0.2.0</h3><ul><li>Snoozing notifications for a specific object</li><li>Support for Django 3.1</li><li>Improved accessibility</li></ul><h4>Snoozing notifications for a specific object</h4><p>OpenWISP Notifications 0.1.0 aimed to provides users control over their notifications. With version 0.2.0, we are making that control more granular. OpenWISP Notifications 0.2.0 will allow users to selectively disable notifications for an object right from the admin site of that object</p><p>With the <a href="https://github.com/openwisp/openwisp-notifications#openwisp_notifications_ignore_enabled_admin">configuration of just one simple setting</a>, the Ignore Notification Widget will be added to the admin webpage of a model. Through the widget, a user can snooze notifications of a specific object temporarily or permanently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*WiLcle1UWAJbURAQ.png" /><figcaption>Widget for snoozing notifications</figcaption></figure><h4>Support for Django 3.1</h4><p>The 0.2.0 release brings official support of Django 3.1 to OpenWISP Notifications.</p><h4>Accessibility Improvements</h4><p>OpenWISP Notifications 0.1.0 brought a lot of features. We tried to ensure everything works as expected, but bugs are inevitable. Post releasing 0.1.0, we found out that at certain states, the notification widget could become inaccessible from the keyboard. While we fixed it right away, we wanted to ensure that it doesn’t break again and delayed it to version 0.2.0. All components introduced by OpenWISP Notifications are now more accessible. We are continuously working to make OpenWISP accessible by all.</p><p>The changes brought by OpenWISP Notification 0.2.0 are few but important. Don’t forget to <a href="https://github.com/openwisp/openwisp-notifications#openwisp-notifications">check out the project’s documentation</a>. Stay tuned for more features coming to OpenWISP.</p><p>Hang out with OpenWISP developers at our <a href="https://github.com/openwisp/openwisp-notifications#openwisp-notifications">Gitter channel</a> or send your queries and feature requests to our <a href="https://groups.google.com/d/forum/openwisp">Mailing List</a>.</p><h3>Important Links</h3><ul><li><a href="https://github.com/openwisp/openwisp-notifications#openwisp-notifications">OpenWISP Notifications Documentation</a></li><li><a href="https://pypi.org/project/openwisp-notifications/0.2/">OpenWISP Notifications on PyPI</a></li><li><a href="https://gitter.im/openwisp/general">OpenWISP’s Gitter Channel</a></li><li><a href="https://groups.google.com/d/forum/openwisp/join">OpenWISP’s Mailing List</a></li></ul><p><strong>Easter Egg </strong>👀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FzuyTiS4FyR-fhRDfRx0PQ.gif" /><figcaption><a href="https://twitter.com/_pandafy_/status/1306237977064947713?s=20">Notifications support coming up in OpenWISP Controller</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=192419d777c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenWISP Notifications Release 0.1.0]]></title>
            <link>https://pandafy.medium.com/openwisp-notifications-release-0-1-0-b0640f019df5?source=rss-23a4bb53e695------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0640f019df5</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[openwrt]]></category>
            <category><![CDATA[openwisp]]></category>
            <category><![CDATA[computer-networking]]></category>
            <dc:creator><![CDATA[Gagan Deep]]></dc:creator>
            <pubDate>Wed, 02 Sep 2020 10:41:25 GMT</pubDate>
            <atom:updated>2020-09-02T23:50:12.096Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VM4qcLPSVNTPR6GZqy-O5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*WrP9tfMDthJFL_Zg09nkfQ.gif" /></figure><h3>What is OpenWISP Notifications?</h3><p>As the name suggests OpenWISP Notifications is the notifications module of the OpenWISP eco-system. It aims to abstract and simplifies generating and sending notifications. Users not only receive notifications on the OpenWISP user interface but are also notified through emails.</p><h3>Why OpenWISP Notifications?</h3><p>One of the important aspects of managing a network is monitoring. And monitoring will be vague if maintainers are not notified of critical events in the network. This is where OpenWISP Notifications comes to play, aiding in the monitoring of your network.</p><blockquote>Do one thing, and do it well.</blockquote><p>OpenWISP derives its core values from The UNIX Philosophy. Instead of having a single application, we have multiple modules that ace at their work. These modules orchestrate at deployment providing the one-stop open-source network management solution we can rely on.</p><h3>What “OpenWISP Notifications 0.1.0” has to offer?</h3><p>Like any other OpenWISP module, OpenWISP Notifications is built on top of Django. We have made sure that OpenWISP Notifications works out of the box with minimal configuration required.</p><h4>Notable features of OpenWISP Notifications</h4><ul><li>Notification Widget</li><li>Real-time Notifications</li><li>Notification Preferences</li></ul><h4>Notification Widget</h4><p>OpenWISP Notifications introduces a notification widget on OpenWISP’s user interface which allows users to browse notifications from their network and get things done quickly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*Gx75PgTbLP51CLCVU2WCWg.gif" /><figcaption>Notification Widget</figcaption></figure><p>The widget allows users to quickly check all notification from their network. Hovering over an unread notification marks it as read. It also provides an option to filter only unread notifications. For users in a hurry, it also provides a single button to mark all notifications as read. Users can also check the count of unread notifications from the counter over the notification bell at a glance.</p><h4>Real-time Notifications</h4><p>OpenWISP Notifications delivers notifications to logged-in users in real-time. Through “Notification Toast” users get notified of new notifications on their screen. Interacting with Notification Toasts also marks that notification as read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*osL6MCMYqOcJ6Oc5hldNpQ.gif" /><figcaption>Notification Toasts</figcaption></figure><h4>Notification Preferences</h4><p>OpenWISP Notifications aims to give users control of their notifications. It allows users to choose the category(type) of notifications they receive for each organization they are members of. Along with that, it also allows users to choose their preferred medium of receiving notifications. Users can either disable email or web notifications for a category and organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cR6qUeXjG8XKHf_b.png" /><figcaption>Notification Preferences of a Superuser</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*io_izyJ0o2V-wajF.gif" /></figure><p>Did we forget about developers who incorporate OpenWISP into their applications? How can we? We have accounted needs of everyone while developing OpenWISP Notifications. 😆</p><h4>Features for Developers</h4><ul><li><a href="https://github.com/openwisp/openwisp-notifications#sending-notifications">Simplified Creating Notifications</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#email-notifications">Configurable Email Notifications</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#notification-types">Notification Types</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#notification-preferences">REST API for CRUD Operations</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#extending-openwisp-notifications">Swappable and Extensible Classes</a></li></ul><h4>Simplified Creating Notifications</h4><p>We abstracted everything behind a Django signal. Use the <a href="https://github.com/openwisp/openwisp-notifications#sending-notifications">notify</a> signal to create notifications from anywhere in your code.</p><p>See the following example for using the “notify” signal:</p><pre>from django.contrib.auth import get_user_model<br>from swapper import load_model<br><br>from openwisp_notifications.signals import notify<br><br>User = get_user_model()<br>Group = load_model(&#39;openwisp_users&#39;, &#39;Group&#39;)</pre><pre>admin = User.objects.get(email=&#39;admin@admin.com&#39;)<br>operators = Group.objects.get(name=&#39;Operator&#39;)<br><br>notify.send(<br>   sender=admin,<br>   recipient=operators,<br>   type=&#39;default&#39;,<br>)</pre><p>The <a href="https://github.com/openwisp/openwisp-notifications#sending-notifications">notify</a> signal honors multi-tenancy of OpenWISP. The default recipients of created notifications are users of the same organization as that of the target object and super-users. You can also provide the recipient to the signal, which can be a queryset, Group or User object. It also honors notification preferences of users and sends notifications only to users who have opted-in to receive such notification.</p><h4><strong>Configurable Email Notifications</strong></h4><p>OpenWISP Notifications provides a default notification e-mail template. But, you can customize the notification email template simply by <a href="https://github.com/openwisp/openwisp-notifications#openwisp_notifications_html_email">configuring a few settings.</a></p><p>If you prefer receiving text-only e-mails instead of HTML rendered ones, you can simply turn HTML e-mails off. 😁</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*rilmqPi1H5IkxI-2.png" /><figcaption>An email sent by OpenWISP Notifications using the default template</figcaption></figure><h4>Notification Type</h4><p>Notification Type is one of the revolutionizing features of OpenWISP Notifications. A Notification Type acts as a template for generating notifications. You can define the message, email subject, etc. in a notification type once and use that notification type while creating notifications.</p><p>Creating a notification type is as simple as <a href="https://github.com/openwisp/openwisp-notifications#registering--unregistering-notification-types">defining a dictionary and calling a function</a>. Try the example below to see it yourself:</p><pre>from openwisp_notifications.types import register_notification_type<br><br># Define configuration of your notification type<br>custom_type = {<br>    &#39;level&#39;: &#39;info&#39;,<br>    &#39;verb&#39;: &#39;added&#39;,<br>    &#39;verbose_name&#39;: &#39;device added&#39;,<br>    &#39;message&#39;: &#39;[{notification.target}]({notification.target_link})          was {notification.verb} at {notification.timestamp}&#39;,<br>    &#39;email_subject&#39; : &#39;[{site.name}] A device has been added&#39;,<br>    &#39;web_notification&#39;: True,<br>    &#39;email_notification&#39;: True<br>}<br><br># Register your custom notification type<br>register_notification_type(&#39;custom_type&#39;, custom_type)</pre><p>Did I tell the notification message supports markdown formatting? Well, it does. You can customize your notification message using markdown. 😃</p><h4>REST API for CRUD Operations</h4><p>OpenWISP Notifications offers REST API endpoints for CRUD operations. It supports both session and bearer authentication. You can perform all operations which are available from the user interface through API endpoints also.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pMXMlNwSCiNIjG6A.jpeg" /><figcaption>REST API endpoints of OpenWISP Notifications</figcaption></figure><h4>Swappable and Extensible Classes</h4><p>OpenWISP Notifications simplifies the work. But, this does not mean that we didn’t account for our power users. We used our learnings from the development of other OpenWISP modules and designed OpenWISP Notifications to allow configurability to the last bit. OpenWISP Notifications ships with swappable models. If you don’t like the default models, swap them. OpenWISP Notifications includes abstract models to ease extensibility. We have a dedicated section in the <a href="https://github.com/openwisp/openwisp-notifications#extending-openwisp-notifications">documentation for extending OpenWISP Notifications</a>. Just keep it DRY. 😉</p><p>OpenWISP Notifications 0.1.0 has more to offer, don’t forget to <a href="https://github.com/openwisp/openwisp-notifications#openwisp-notifications">check out the documentation</a> to learn about all the features. Stay tuned for more features coming to OpenWISP Notifications soon.</p><p>Hang out with OpenWISP developers at our <a href="https://github.com/openwisp/openwisp-notifications#openwisp-notifications">Gitter channel</a> or send your queries and feature requests to our <a href="https://groups.google.com/d/forum/openwisp">Mailing List</a>.</p><h4>Important Links</h4><ul><li><a href="https://github.com/openwisp/openwisp-notifications#openwisp-notifications">OpenWISP Notifications Documentation</a></li><li><a href="https://pypi.org/project/openwisp-notifications/0.1/">OpenWISP Notifications on PyPI</a></li><li><a href="https://gitter.im/openwisp/general">OpenWISP’s Gitter Channel</a></li><li><a href="https://groups.google.com/d/forum/openwisp/join">OpenWISP’s Mailing List</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0640f019df5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenWISP Notifications]]></title>
            <link>https://pandafy.medium.com/openwisp-notifications-6c11ae577994?source=rss-23a4bb53e695------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c11ae577994</guid>
            <category><![CDATA[computer-network]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[notifications]]></category>
            <category><![CDATA[openwisp]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Gagan Deep]]></dc:creator>
            <pubDate>Tue, 25 Aug 2020 20:06:19 GMT</pubDate>
            <atom:updated>2020-09-16T12:29:58.222Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="OpenWISP’s logo inside a notification bell." src="https://cdn-images-1.medium.com/max/1024/1*mDohCOWwokjfKj0mH_K8BA.png" /></figure><p>GSoC’20 Project Report</p><p>For the past three months, I have been contributing to OpenWISP under GSoC’20 to develop the notifications module, i.e. OpenWISP Notifications. The project spanned over <a href="https://github.com/openwisp/openwisp-notifications/projects/1"><strong>45+ PRs consisting of over 65+ commit making over 6000 additions</strong></a><strong>. </strong>Let’s take a dive into OpenWISP Notifications!</p><h3>About the Project</h3><p>The main goal of the project was to develop a stand-alone notification module that abstracts and simplifies generating and sending notifications for OpenWISP network events. It was aimed to make consuming notification easy for users. A key feature was to provide users control over the notifications they receive, i.e. they could define their notification preferences. Above everything, the major goal of the project was to provide freedom of customization to users. A user should be able to register their custom notification types and use them instead of defaults which come with OpenWISP.</p><h3>Need for OpenWISP Notifications</h3><p>It is desired by a network management software that it notifies users for network events. Say, when a device becomes unreachable it should notify concerned personnel about the event such that they can act accordingly. Another example, OpenWISP is often configured to trigger integrations with external services and it may be possible that a particular service may observe a fault resulting in undesired behavior. Therefore, immediate reporting of such evebts is required to solve them at the earliest. It is safe to say that notifications are a vital part of any newtwork management software.</p><p>Before OpenWISP Notifications, there was limited support of sending notifications which too was embedded inside OpenWISP Monitoring(another unreleased module at that time). Therefore, to bring notifications to OpenWISP as a mainstream feature, a dedicated notifications module was needed. A stand-alone notifications module also serves a greater purpose. It not only abstracts the required logic for sending notifications, but it also helps to allow easy customization by users. It basically helps users to avoid re-inventing the wheel and ensures code re-usability.</p><h3>Notable Features</h3><p>Following are some notable features of OpenWISP Notifications:</p><ul><li><a href="https://github.com/openwisp/openwisp-notifications#sending-notifications">Multi-tenant Notifications</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#notification-types">Notification Types</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#notification-widget">Notification Widget</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#rest-api">REST API for CRUD Operations</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#notification-toasts">Real-time Notifications</a></li><li><a href="https://github.com/openwisp/openwisp-notifications#notification-preferences">Notification Preferences</a></li></ul><h3>Major Development Milestones</h3><h4>Extracting Notifications module from OpenWISP Monitoring</h4><p>A notification module was previously built into OpenWISP Monitoring which utilized Django Notifications and provided limited functionality of creating and viewing notifications. A major leap in the development of OpenWISP Notifications was decoupling notifications from OpenWISP Monitoring. Early decoupling of these modules helped in avoiding hindrance in their development. Post decoupling, development of OpenWISP Notifications commenced as a stand-alone package.</p><p><em>Related work: </em><a href="https://github.com/openwisp/openwisp-notifications/commit/cbf3cc7140a59754306dbab233f6c5edb91d05cb"><em>The Initial Commit</em></a></p><h4>Supporting OpenWISP’s Multi-Tenant Architecture</h4><p>OpenWISP natively supports multi-tenancy, which means a single instance of OpenWISP can be used by different organizations having their own artifacts. It was to be dealt with utmost care that notifications about an artifact should be delivered only to the users of the parent organization that too having the desired permissions.</p><p>During testing with OpenWISP Monitoring, faults emerged which pointed out that there were potential bugs in logic for supporting multi-tenancy. With some iterations, these bugs were fixed and OpenWISP Notifications now supports multi-tenancy natively like any other OpenWISP module.</p><p><em>Related Work: </em><a href="https://github.com/openwisp/openwisp-notifications/pull/16"><em>Fixing recipient permissions while sending notifications</em></a></p><h4>Developing Notification Types</h4><p>Notification types were aimed to revolutionize generating notifications in OpenWISP. By providing a notification configuration only once, the feature embraced <strong>DRY</strong> — Don’t Repeat Yourself — principle. Adding markdown support for notification messages helped to improve both user and developer experience. Using notification types, it was possible to noticeably reduce the lines of code required to create a notification in other modules.</p><p><em>Related Work: </em><a href="https://github.com/openwisp/openwisp-notifications/pull/19"><em>Adding notification types</em></a></p><h4>Adding Notification Widget</h4><p>One of the most required features of OpenWISP Notifications was to improve the user experience for browsing notifications. Earlier, the user will have to dig down into Django’s Admin menus to find details for notifications. Developing a notification widget was the chosen way to go. We had to strike the right balance to provide enough information without bloating the widget itself, thus harming the one thing it aimed for i.e. user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*f-ghUe5B7iCrjQIH2P_nqA.gif" /><figcaption>The Notification Widget</figcaption></figure><p>The development of the notification widget encouraged us to develop API endpoints for CRUD operations. This was required to support the dynamic loading of notifications on user interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOOkIXBkAloKV336vAwK_w.jpeg" /><figcaption>OpenWISP Notifications REST API endpoints</figcaption></figure><p>Here is a quick comparison between consuming notifications before and after the development of the notification widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*6-fzjOWtEScQA9ju7uPjuA.gif" /><figcaption>Consuming notifications before and after development of notification widget.</figcaption></figure><p>Related Work: <br>- <a href="https://github.com/openwisp/openwisp-notifications/pull/48">Developing REST API endpoints</a><br>- <a href="https://github.com/openwisp/openwisp-notifications/pull/57">Adding notification widgets</a></p><h4>Supporting Real-Time Notifications</h4><p>With the inception of the notification widget, we were able to drastically improve user experience, but something still felt missing. It was real-time notifications. The notification widget working on the HTTP simply couldn’t update new notifications without reloading the page. We looked the other way, towards WebSockets. Using WebSockets, it was possible to deliver notification as they were being generated. This also allowed us to display notifications to users without even opening notification widget, i.e. through “notification toasts”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*KpnkcfbyUbU9rN-h6aXZCA.gif" /><figcaption>Notification Toasts</figcaption></figure><h4>Introducing Notification Preferences</h4><p>One of the important aspects of the project was to allow users to define their notification preferences, i.e. let them choose which notification they want to receive and how. OpenWISP Notifications supports both web and email mode of notifications and a user may want to just receive web notifications. After developing this feature, users can select the mode of receiving notification based on notification type(category) and organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QeYxRfSz0bEd5_0k1a5XRw.png" /><figcaption>Notification Preferences</figcaption></figure><p>Not only OpenWISP Notifications allows users to define notification preferences on the basis of notification type and organization but also allow to disable notifications related to a specific object for a desired period of time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*ZE_GebeXwQvWMb6dD0Pk6g.gif" /><figcaption>Disabling notifications for an object</figcaption></figure><p>Since the type of object could vary across OpenWISP, an easy to configure generic solution was implemented to make it seamless for developers integrating OpenWISP Notifications in their project.</p><p>Multi-tenancy again showed up a challenge as enabling these settings required adhering to different levels of permissions. With a bit of back and forth during reviews, it finally reached the point where it neither breaks permissions nor bloats user interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*SCtvmutwqSBA05EkDJ4Iwg.gif" /><figcaption>Pull Request for developing Notification Preferences</figcaption></figure><p>Related work: <br>- <a href="https://github.com/openwisp/openwisp-notifications/pull/69">Adding feature for defining notification preferences</a><br>- <a href="https://github.com/openwisp/openwisp-notifications/pull/111">Adding feature to disable notification for an object</a></p><h4>Bringing OpenWISP Notifications to OpenWISP Modules</h4><p>The notifications module was re-introduced into OpenWISP Monitoring which swapped out the previous implementation with OpenWISP Notifications. OpenWISP Notifications was also added to OpenWISP Controller which makes it vital to OpenWISP’s eco-system.</p><p>Related Work:<br>- <a href="https://github.com/openwisp/openwisp-monitoring/pull/49">Adding OpenWISP Notifications to OpenWISP Monitoring</a><br>- <a href="https://github.com/openwisp/openwisp-controller/pull/265">Adding OpenWISP Notifications to OpenWISP Controller</a></p><h3>The Experience</h3><p>This was one of the best summers for me, a summer packed with learning, developing and networking. It was a pleasure to work under the guidance of my mentors, Federico Capoano(<a href="https://github.com/nemesisdesign">@nemesisdesign</a>), Noumbissi Valere(<a href="https://github.com/NoumbissiValere">@NoumbissiValere</a>) and Vivek Chand(<a href="https://github.com/Vivekrajput20">@Vivekrajput20</a>). I would like to extend my humble gratitude to my mentors without whom my project wouldn’t be possible.</p><p>Through contributing to OpenWISP, I learned new technologies like Ansible, OpenWRT, and Docker. I would like to share my key learnings from my GSoC journey.</p><h4>Software Development — An Iterative Process</h4><p>There is no perfect solution to a software problem. A solution that seems perfect now may become rather useless in the future. Software are desired to be able to adapt to changes, but above all the developers should be able to cope up with those changes.</p><h4>Database — Keeping It Under Check</h4><p>During the development of OpenWISP Notifications, we found out the application was hitting databases like crazy due to either poorly written queries or the native behavior of Django’s ORM. Databases are optimized for specific operations, unloading that work from your application will help in further optimization.</p><h4>Cache — A Dubious Friend</h4><blockquote>“There are only two hard things in Computer Science: cache invalidation and naming things”<br>- Phil Karlton</blockquote><p>A lot of times, to prevent excessive database queries, I looked forward to caching desired data. A problem that arose with caching is when to invalidate the cache. There were a few instances when bugs were popping up due to fault in cache invalidation. One should use cache responsibly, it can do more harm than good.</p><h4>TDD — Test, Test And Test!</h4><p>Automated tests can do so much, yet there are some areas where the developer(yes, not user) testing is required. While introducing changes in a module of the software, make sure those changes play well with other modules — Integration Testing.</p><h4>Open-source — Contribute and Collaborate</h4><p>Open-source is more than just code, it is about people. Community plays an important role in open-source. Interacting with the community helps to understand the actual requirements and use-case. It also helps to see different ways to approach a problem. I would like to extend my gratitude towards the incredible community of users and developers of OpenWISP who helped with their feedback and guidance throughout the journey.</p><h3>What’s Next?</h3><p>We are glad to have early adopters of OpenWISP Notifications even when it is not released. Due to feedback from such users, we are able to find bugs and shortcomings early in the development stage which is helping us making OpenWISP Notifications battle-tested.</p><p>Following are things which are in the planned roadmap:</p><ol><li>Releasing OpenWISP Notifications 0.1.0</li><li>Updating Ansible OpenWISP and Dockerize OpenWISP modules to use the newly built OpenWISP Notifications. This will provide ease of installation to future users.</li></ol><p>I hope you too had a great summer, keep coding!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U5DKSZy508PB5w-M.jpg" /><figcaption><a href="https://blog.tmp.com/2018/05/04/may-the-source-be-with-you/">Source: Uncertain</a></figcaption></figure><h4>Important Links</h4><ul><li><a href="https://github.com/openwisp/openwisp-notifications">OpenWISP Notifications</a></li><li><a href="https://github.com/openwisp/openwisp-monitoring">OpenWISP Monitoring</a></li><li><a href="https://github.com/openwisp/openwisp-controller">OpenWISP Controller</a></li><li><a href="https://github.com/openwisp/openwisp-notifications/projects/1">OpenWISP Notifications GSoC’20 Project Board on GitHub</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c11ae577994" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Got Selected for GSoC]]></title>
            <link>https://medium.com/code-for-cause/i-got-selected-for-gsoc-9ef5510bfa97?source=rss-23a4bb53e695------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ef5510bfa97</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[openwisp]]></category>
            <dc:creator><![CDATA[Gagan Deep]]></dc:creator>
            <pubDate>Sun, 10 May 2020 20:13:12 GMT</pubDate>
            <atom:updated>2020-05-20T19:04:24.921Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>I Got Selected for GSoC’20</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZB_tL4duXGX7DMc942cKFw.png" /></figure><p>If you don’t already know about GSoC, don’t worry I have got you covered. Google Summer of Code, popularly known as GSoC is a three-month-long Google administered global program that matches up students with opensource organizations work on projects having a strong user base. It provides students exposure to real-world software development, while open-source organizations get worthy contributors for making softwares better every day. A win for everyone!</p><figure><img alt="Meme for mom confusing open-source with open sores." src="https://cdn-images-1.medium.com/max/321/1*ingO_kqdII5Ajrm-8LGPFQ.png" /><figcaption>Source : <a href="http://www.quickmeme.com/meme/3692j9">quickmeme</a></figcaption></figure><h4>Wait, what is Open-source?</h4><p>I would rather not go into details of explaining open-source since there is already a ton of resources that describes it better than I ever could. In a nutshell, opensource softwares are those softwares whose source code is available for modification(sometimes with restriction). Believe me, open-source is one of the most beautiful things born out of the software industry. It brings human collaboration to a whole new level. You communicate and collaborate with people around the globe. Open-source is more than just code, it is an ideology, it is about people, making new connections, learning new things, sharing your knowledge and cherishing work of the community.</p><figure><img alt="Image showing logos for Wordpress, Firefox, VLC &amp; Thunderbird and implying that you are already using open-source softwares." src="https://cdn-images-1.medium.com/max/287/1*I7dapQ2DJMqF0n3l36eFoA.png" /><figcaption>Source : <a href="https://www.fiverr.com/seelliott/create-dank-memes-for-you">fiverr</a></figcaption></figure><p>I feel you, I too get intimidated by new projects with big codebases. Every time I get this question, I just give the same answer, “Just dive in!”. Don’t pressurize yourself to patch bugs from the very first day, everyone has a different learning pace, take all the time you need. Try out the project as an end-user, follow the project’s documentation, setup development environment and build it from the source. Communicate with the community, introduce yourself and announce your intentions. All open-source organizations have a communication channel, it might be a mailing list, a Gitter channel or any other instant messaging service. Open-source is about keeping everything open so only use private messages when it is absolutely necessary. Some projects maintain a list of easy issues which are suitable for newcomers. If not, ask the community to suggest some issue for getting started.</p><figure><img alt="OpenWISP Logo" src="https://cdn-images-1.medium.com/max/480/1*US9HkBqeTkuHdYC7M35B_w.png" /><figcaption><a href="http://openwisp.org/">OpenWISP</a></figcaption></figure><h4>OpenWISP</h4><p>My application for GSoC 2020 was accepted with OpenWISP. OpenWISP is a hackable network management solution which makes it easy to administrator computer networks. For starters OpenWISP allows you to manage and automate dynamic configuration of new nodes, creation of VPN tunnels, initialization of WiFi access points, configuration of mesh networks, etc. The web modules are built with Django which is notoriously easy to extend and has a rich ecosystem of reusable components. The modularity and extensibility of OpenWISP make it easier to customize for a specific use. This summer I will be working on the <a href="https://summerofcode.withgoogle.com/projects/#5690240271908864">Notifications module</a> of OpenWISP as part of GSoC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwQCENtlb_91w2zaxNRbTQ.jpeg" /><figcaption>My GSoC’20 Project : <a href="https://summerofcode.withgoogle.com/projects/#5690240271908864">OpenWISP Notifications Module</a></figcaption></figure><h4>Why I chose OpenWISP?</h4><p>I always had a knack for networking. I used to create a small network from old routers and play with their routing tables just for fun. Something about computer networks always fascinated me. This was the main reason for choosing OpenWISP over any other organization. The project dealt with something I am ambitious about. The other reason was my familiarity with Django. While Django provides a base for OpenWISP, there are more things in play, like Ansible, Docker, OpenWRT, NetJSON, etc which make OpenWISP functional as a complete solution. So getting into OpenWISP was not a cakewalk for me, but thanks to the awesome community who helped at every stage. Since OpenWISP embraces The Unix Philosophy, OpenWISP is split into simpler modules which follows “Do one thing and do it well”. This made contributing to them easier for me, as I only needed to focus on the functionality of the current module.</p><p>If you are interested in computer networks in any way, I can’t emphasize you enough to check out <a href="http://openwisp.org/">OpenWISP</a>.</p><figure><img alt="Google Summer of Code Logo" src="https://cdn-images-1.medium.com/max/225/1*gl_OqzY1tS6sfeThijS2HA.png" /><figcaption><a href="https://summerofcode.withgoogle.com/">Google Summer of Code</a></figcaption></figure><h4>How can I apply for GSoC?</h4><p>If you are <a href="https://developers.google.com/open-source/gsoc/faq#what_are_the_eligibility_requirements_for_participation">eligible for the program</a> you can surely participate as a student with an organization of your choice. Like students, organizations also apply every year for participating in GSoC. Accepted organization are usually announced in February, make sure that you stay updated with the timeline for current edition of GSoC. I have seen that people wait for the announcement of accepted organizations to start contributing. I suggest otherwise, you should start contributing now. GSoC maintains an archive of accepted projects and organizations selected in previous editions. Even if your organization does not get accepted, you will still learn a lot and your contributions won’t go in vain. Your primary focus should be to learn and contribute to open-source. For folks who are not eligible for GSoC as a student, you can still apply as a mentor for an organization. Mentors application are processed by each organization individually, so it is better to communicate with the community to know more about it.</p><h4>I missed the application deadline for GSoC, what can I do?</h4><p>There is nothing much you can do for the current edition. GSoC is just one of many programs out there which embraces open-source. <a href="https://railsgirlssummerofcode.org/">Rails Girls Summer of Code</a>, <a href="https://wiki.lfnetworking.org/display/LN/LFN+Mentorship+Program">Linux Foundation Networking Internships</a>, <a href="https://www.outreachy.org/">Outreachy</a> to name a few. You can start exploring projects and organization from early on, start contributing to them. Having trouble finding out appropriate organizations? You can filter organizations depending on area of their work or technology they use on GSoC’s website. Try to find a project which interests you even if you are not comfortable working with the tech stack, your interest will keep you motivated in the long run. You have a complete year ahead of you to learn and contribute. Good Luck!</p><blockquote>Open-source is not about competitions, it is about collaborations</blockquote><h4>My First Contribution to OpenWISP</h4><p>Just to show that all contributions in open-source are significant regardless of being big or small, I would like to tell you about <a href="https://github.com/openwisp/openwisp2-docs/pull/87">my first PR to OpenWISP</a>. My first PR to OpenWISP was to add a favicon on the documentation website. Most of the users don’t even care about favicon. That PR introduced changes in one line, just one freaking line. Even so, I was so excited for getting my PR merged that I made a contribution to an open-source project. After getting my feet wet, I worked up my way from there. Looking for an issue which I can solve and learning new things along the way.</p><p>The above advice is just to motivate you for getting started with open-source. Please don’t be like a person below. Don’t keep chasing trivial issues. Get your feet wet and work up your way from there. Doing such will not only deteriorate your chances of getting selected but also sabotages your learning. You pretty much ruined the whole concept of contributing to opensource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*7_1wFEAQPCyvvQ9db7g5EA.png" /><figcaption>Source : Unknown</figcaption></figure><p>I hope you had a good read. <em>May the FOSS be with you!</em></p><h4>Further Reading</h4><p><a href="https://www.slideshare.net/FedericoCapoano/applying-the-unix-philosophy-to-django-projects-a-report-from-the-real-world">Learn how OpenWISP embraces The Unix Philosophy</a></p><p><a href="https://en.wikipedia.org/wiki/Open-source-software_movement#Evolution">The Open-source-software Movement</a></p><p><a href="https://github.com/tapaswenipathak/Open-Source-Programs">A comprehensible list of Open-source Programs</a></p><p><a href="https://medium.com/@Darecoder/free-as-in-beer-vs-free-as-in-speech-d3d47f87b2e0">Free as in beer Vs Free as in speech</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ef5510bfa97" width="1" height="1" alt=""><hr><p><a href="https://medium.com/code-for-cause/i-got-selected-for-gsoc-9ef5510bfa97">I Got Selected for GSoC</a> was originally published in <a href="https://medium.com/code-for-cause">Code for Cause</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>