Quantcast
Channel: Scargill's Tech Blog
Viewing all 1390 articles
Browse latest View live

Teckin SP23 and SP27 Smart Plugs

$
0
0

In 2019 I wrote here (now updated) about the Teckin SP23 (for British plugs and sockets) Smart plugs and commented that whether this ends well or not will depend on the company. Well, they wrote back to me on Nov 4, 2019. It would seem they have binned power monitoring on the SP23 product and adjusted the capacity claim for the UK to 13A. It seems also that the chipset has been changed. I also have SP27 sockets in the same boat. So basically you are looking at just another smart socket. I guess it is all down to price as to whether or not you use these. Anything about power monitoring below this paragraph is historical.

Theirs are pretty normal looking smart plugs – without any special surprises – but it DOES the SP23 have power monitoring? The early models DID, the new models do NOT. The SP27 also does not. As techies most of you may NOT be interested in the standard off-the-shelf software involving yet another cloud and yet another APP… I chose Tasmota as it is one of the best replacement firmware for these kinds of sockets – if not THE best… however, due to a manufacturing change in the latest versions of the SP23 smart plug which I received at the back end of 2019,, the power monitoring doesn’t work. However, button, LED and relay work perfectly.

March 12, 2020: I just received a pair of the company’s SP27 smart plugs to test.. these are thinner than the SP23, but still not thin enough to fit 2 of them side by side in a British 4-way extension socket (a REAL shame) and also – the SP27 neither has power monitoring NOR does it convert to Tasmota – my thanks to Mr Shark who just reminded me that in order to see who makes the chip you just have to look at the MAC number – the first part gives the game away – and these Smart Plugs are NOT now ESP8266 based – apparently earlier ones were (just like the original SP23). If you have these products lying around, unconverted, check out their APP – EDIT (pencil) – DEVICE INFORMATION – that will take you to the MAC number.

In my case I used this website to check on MAC details – https://macvendors.com/ and it looks like the chip is made not by Espressif but HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD

SP27
SP27 Smartplug from Teckin

So, what do the SP27 smart plugs actually have going for them? Available at Amazon, not too expensive, pretty but otherwise nothing special it would seem. If you plan to use the Smarthome App then maybe you don’t care – and that is fair enough.

Above is the SP27 smart plug and below, the somewhat larger SP23.

Teckin S23 Smart Socket
SP23 Smartplug from Teckin

So, for those with the earlier versions of these products that use ESP8266 – fire away (do NOT try this on non-ESP-based products such as the later model SP23 and SP27).

This is the result of an all day session with Mr Shark AKA Antonio, with me in my office in the freezing wastes of the Northeast of England and Antonio at work in Italy. Warning – this is VERY technical – the original notes were those which Antonio gave me to help me convert the device to Tasmota – it all works but no power monitoring.

To use Tuya convert on the original Teckin SP23 (or original SP27 for that matter) you need a spare Raspberry Pi (or borrow your only one, temporarily inserting a new MicroSD card. You should start with a fresh install of raspbian Buster Lite (I tried using my existing setup – too much activity).

You need a Raspberry Pi to set up Tuya-Convert.. grab the minimal Buster from the Raspberry Pi site and install on the Pi using, say, the free balenaEtcher program. While the SD is still in your PC (after installing Buster, remove and reinsert the SD into your PC and you will see the boot partition). You should put an empty text file in the boot “drive” called merely “ssh” without the quotes. Remove the SD and put it in the RPi.Turn the RPi on. I used an RPi 3. None of this works on the new versions of the Teckin products which no longer use ESP8266.

sudo apt-get install -y git
git clone https://github.com/ct-Open-Source/tuya-convert.git
cd tuya-convert
./install_prereq.sh

Open two SSH terminals on your PC as user Pi on thr RPi. I use MobaXTerm for that. On the first terminal do this…

cd tuya-convert
./start_flash.sh

Press YES. Connect your mobile phone WIFI to access point vtrust-flash which should become available. Use password “flashmeifyoucan” without the quotes.

On the second terminal..

cd tuya-convert/scripts
tail -f *log

Back on terminal one, press ENTER and wait for the prompt. You can watch progress on terminal TWO… When terminal ONE returns to the prompt, you’ve done the first step of the hack, now to flash Tasmota.

In terminal ONE you should see something like:

Getting Info from IoT-device
VTRUST-FLASH 1.1
(c) VTRUST GMBH https://www.vtrust.de/35c3/
READ FLASH: http://10.42.42.42/backup
ChipID: 4247dd
MAC: BC:DD:C2:42:47:DD
BootVersion: 7
BootMode: normal
FlashMode: 1M DOUT @ 40MHz
FlashChipId: 144068
FlashChipRealSize: 1024K
Active Userspace: user2 0x81000

If it is NOT saying “Active Userspace: user2 0x81000 then you need an intermediate step – the following – to be pasted into terminal ONE…

curl http://10.42.42.42/flash2

If you DO see the above “Active Userspace” etc., skip to step 3 on terminal ONE.

curl http://10.42.42.42/flash3

Monitor what is happening on terminal TWO.

At this point the hack is complete and you should see a “SONOFF-XXX” WiFi access point on your phone, connect to it, navigate to 192.168.4.1 and use the web interface to connect the device to your WiFi network. Be sure to enter the correct ssid and password for your access point. You can always change it later.

Now you can update to the latest firmware in the normal way, for example, this URL for the 2.3.0-based minimal firmware.. http://thehackbox.org/tasmota/release/sonoff-minimal.bin

For the full release – this – http://thehackbox.org/tasmota/sonoff.bin

You could look for a Tasmota template for the device… https://blakadder.github.io/

Now to to your Tasmotized device web page, other, configuration, paste in the template in the top text box, check ACTIVATE, remove any password from the password field and press SAVE.

Facebooktwitterpinterestlinkedin

The post Teckin SP23 and SP27 Smart Plugs appeared first on Scargill's Tech Blog.


Guudgo 21 LED and 47 LED External IP Cameras

$
0
0

I have in my hands two cameras called Guudgo – one has 21 LEDs and the other has 47 LEDs. For reasons well beyond me, the 47 LED camera uses downloadbale Android APP “V380 Pro” whereas the 21 LED camera uses Android APP called “YCC365 Plus” – there will no doubt be IOS equivalents. For the sake of simplicity I’ll refer to the cameras as Guudgo21 and Guudgo47 from here on.

Firstly – the GUUDGO 21 LED IP Camera 8X Zoom from Banggood – solid looking, substancial, 1080p and looks like it will handle the weather. The camera box states 8x zoom but I’m pretty sure that is digital zoom. Pan and tilt work a treat (355 degrees horizontally, 90 degrees vertically) with 21 BRIGHT LED night lighting (9 WHITE, 10 IR) as well as red and blue warning lights.. this camera is something to be taken notice of, between the loud audio alerts and the bright lighting.

The recommended APP for this camera is “YCC365 Plus”. The MAC address of the device is viewable in the app but not it’s IP address nor could I figure out how to FORCE the IP address manually in the APP. Weird. I did however manage to do the trick in my modem of matching MAC addresses and IP addresses to force an address for the future. Job done.

Because of the intense lighting, night vision is full colour which is a bit unusual. The IR lighting is claimed to be good up to 100 metres and on detectng intruders, the camera can send messages to a mobile phone.

The Guudgo WiFi dome, IP66 waterproof surveillance camera costs under £37 from Banggood and is not at all like some of the tiny, sometimes delicate interior cameras you see from Banggood, Gearbest, Amazon and others. While not being in the same league as the £300+ Instar 9020 monster, it costs 10x less than the latter while still looking the part.

The camera came with a 12v 2A supply with rather short leads which could be a challenge in our 200-year old stone cottage with extremely thick walls but which would generally be ok.

As I was testing this H.264/MPEG camera, it started bleating at me “caution, you have entered the remote area, please leave as soon as possible.” which is a bit frightening when you are on your own in the workshop – and is reminiscent of a car I once had which boldly stated “Intruder alert – step away from the vehicle”. Some day maybe they’ll make these with Geordie accents – I can but dream.

IP Camera

I’m not a great fan of remote clouds and endless Apps so the setup for this camera in which a cloud is used, is not ideal but was easy. Given time I’ll figure out how to get it to run ONVIF as stated on the Banggood website and the box. but there is not a lot of technical info in the folded sheet that comes with the camera.

The camera supports 2-way audio, has (loud) voice alarm and supports the use of TF card or cloud storage. I did find it a little annoying that this does not seem to offer an FTP option to your own storage but instead to an optional paid service or an optional TF card in the camera. I’ll stick with the TF card option for now I think.

As stated in Bangood’s ad, you could use the camera externally for baby monitoring and 2 way convversation though in this scenario I’d recommend leaving that alarm setting off:-) Scared me, never mind a baby. One last thing, unlike some cameras, when I set the APP to show an HD image – it retained that setting. Good. My only gripe up to now is.. after disabling alerts, as I was putting the camera back in its box which still connected I heard “caution, you have entered the restricted area, please leave as soon as possible”.

In the box, you get a screwdriver and fixings.

And NOW – the Guudgo 47 LED 1080P 2MP V380 IP Camera

This is different to the first camera in that ALL of the LEDS are IR and there are 47 of them. This is another external camera, very similar in looks to the first one, but has no flashing police-car lights or bright WHITE lighting. It uses an APP called “V380 Pro” and in that, I could set up the IP address in my network but the IP did not show up as used in ADVANCED IP SCANNER. As well as giving the camera a name I could also see it’s unique numerical ID in the APP (but not it’s MAC address).

GUUDGO camera from Banggood

For BOTH of these cameras I could initially get VLC on my Windows PC to see the camera output as a network stream using an entry rtsp://192.168.xxx.yy/live/ch00_0 where xx.yy is in each case the IP address of the camera on my local network. No CONTROL of course, just viewing as the network stream does not allow for control. This definitely worked at first for both cameras until I devided to give the Guudgo47 (V380) a fixed address and that is when it went wrong.

After getting the Guudgo21 working perfectly on a fixed address, the Guudgo47, previously placed manually on an adjascent address, simply stopped being part of the network. A reboot of the latter resulted in a verbal message “system is starting…starting successfully” followed by “connecting please wait…successful connection” yet the V380 Pro APP was now showing “Internet Offline” for that camera and Advanced IP Scanner could not see the device at all on my network. With the V380 Pro app on my phone – which sees one of my earlier cameras, I tried looking for nearby devices but did NOT see the Guudo47. Adding manually did not work either…. I even tried the factory reset which resulted in “factory reset” then repeats of the above setup messages ending in “connection successful” – but to WHAT? Not my WiFi network that’s for sure. After 2 attempts, the camera announts it was putting up its own access point at which point I switched to that access point – and the camera appeared, password-free in the APP at which point it asked me to enter a password. Quality was SD. I switched to HD. After backing out and going back into that screen, the quality had switched back to SD. And then I made the mistake of trying a manual IP again which ultimately led back to “connecting.. please wait..connection successful” but not to anything on my network – again. “Restore factory default setting”… Life is too short to do more with this camera.

Facebooktwitterpinterestlinkedin

The post Guudgo 21 LED and 47 LED External IP Cameras appeared first on Scargill's Tech Blog.

More Node-Red Dashboard Success

$
0
0

This is a blog entry from 2016 that I’ve just updated.. In an even earlier entry the subject of Node-Red Dashboard, you’ll see I can hide that top menu if needed (the blue menu is great on a phone – not much use on a thermostat)… and then I discovered that desktop TEMPLATES have a spacing round them that needs consideration but here’s what I did at the time.. and see the 2020 update further down and also the blog entry on my Thermostat https://tech.scargill.net/the-thermostat-continues/ and other home control work which now makes extensive use of Node-Red Dashboard.

Dashboard buttons

Update March 2020:  One of you guys just pointed out THIS DISCOURSE LINK to me…..  looks good – I just asked the author if he’s had luck with haptic feedback on custom template icons when used as buttons (but not actual buttons as they work just fine).
End of update

So – the built in standard buttons – no text wrap which makes it hard to make small, a visual effect on press that really is hardly noticeable, inability to change colour or indeed anything other than text colour – all problems now history as some time ago, I made my own buttons using the template node.

The garish red, green and blue buttons you see above – note the rounded edges you control, there is an attractive and obvious colour change on press (and return to original colour after press without you having to program it ), audible feedback on press (on phones with vibrators), wrap on text – indeed you can put anything in there – icons etc. but see my comment above about icons (if used as buttons)

This development is all due to a combination on my insistence on having flexibility – my own experience and lots of help from several guys on the web today – thanks everyone for filling in the missing bits! The end result of all of this – I really DO think that Dashboard is able to take on the big boys and I’m currently backing away from the alternatives and have more or less abandoned Blynk.

So – the enabling technology here is the node-red-dashboard template – this has LOTS of potential and it is now easy to accept incoming information – and send out a value on press or whatever. You’ll note elsewhere that I’ve used this to make whole pages with colour-changing icons etc., well here I’m using one template per button – but that’s just for the purpose of demonstration.

Things that needed considering – CSS for button sizing, JS to get the button colour and change it while pressing then change it back – I was not going to get into setting each and every button press colour etc. More CSS for styling. All described below and trivial to implement.

SO it turns out that if you put a template on a page – make sure it is the first one – you can put nothing but JS and CSS in it – and it will not do anything VISIBLE – but will supply your functions and CSS for the whole page – isn’t that HANDY!!!

tmp3513

Let’s take a look at what is driving the display up there (again ignoring the text at the top – start with the buttons). To the left you see a template all on it’s own – then 3 templates – then 3 buttons – not connected to anything as this is merely a demo.

So – the FIRST template has info we need – CSS and JS to make everything work – you just need this once for any page. The light blue buttons are there just to show you what buttons look like in Dashboard (i.e. not as good as they could be) – and the three templates are the three new coloured buttons you see above right – which react to being pressed both visually and with haptic feedback.

<style>
  .filled { 
      height: 100% !important;

      padding: 0 !important;
      margin: 0 !important;
  }
  .nr-dashboard-template {
      padding: 0;
      margin: 0;
  }
  
  .rounded {
  border-radius: 15px 15px 15px 15px;
  font-size: 18px;
}
  
</style>

<script>
$('.vibrate').on('click', function() {
  navigator.vibrate(100);
});

function restore_bg(x) {
            $(this).css("background-color", x);
    };

$('.touched').on('mousedown', function() {
    
    var x= $(this).css("background-color");
    $(this).css("background-color", "yellow");
    
    setTimeout(restore_bg.bind(this,x),200);
    navigator.vibrate(100);
    });
    
</script>

NOTE: At the time of writing this colour change works on Chrome etc on a PC and Android phone – it does NOT work on Firefox/Chromium on a Pi – this needs resolving.

The class FILLED is important – this is the one that gets rid of the padding that both buttons and template use by default – to make the button fill to the size of the template. nr-dashboard-template is also involved. None of this seems to affect other items on the screen.

ROUNDED is simply a means of forcing rounding on buttons – you can adjust that radius to suit or eliminate it if you like.

The scripts – well VIBRATE merely invokes the haptic feedback when you press a button – easy when you know how.

TOUCHED and it’s associated restore function are variations on the ones I used with images. The class allows on press for a button to store it’s colour – change it’s colour – wait for a while – and change it back – all without having to have individual colour control on the actual button  – which simply has the default colour you select.

Now let’s take a look at once of those templates. Oh and I got those subtle colours from here – https://flatuicolors.com/

<md-button class="vibrate filled touched rounded" style="background-color:#c0392b" ng-click="send({payload: 'Hello World'})"< 
    Red<br/>button
</md-button>

Simple? Yes because the previous code makes it so. A button in a template – auto stretched by the code above and all it has added is the background colour – which the above code can manipulate – and the classes. That’s it. The ng_click is what happens when you press the button – the template outputs a payload of whatever you’ve set. No, really that is it.  So on that output, msg.payload will be whatever you set it to be.

With background colour control, RGB and related buttons become simple – a page full of colours for RGB controls becomes possible. Note that in the class ROUNDED I changed the font size – well you could separate that off to a separate class – and create classes (say) BIGTEXT and LITTLETEXT for example – suitable for different size buttons.

When you grasp this – if you’re not there already, immediately all sorts of ideas should come to mind -it’s a bit like opening a new door to see all the things behind it. Within days my demo screen here looked utterly amateurish as I started adding icons etc but this milestone was important as it was, for me a confirmation that there really is not a lot you can’t do with node-red-dashboard – so many congratulations to the original developer and the guys at IBM and everyone contributing.

If you go to the ANGULAR site and look at their examples – most of them work no problem – changing these rectangular buttons to round ones is a snap!

Oh, talking of improving things  – here’s a snapshot hours later as things progressed…NICE!

new buttons

Oh – here… http://flows.nodered.org/flow/4bfad41290eda31588ff63a23815ac5c  – if you want a play…. and YES that template uses a little white space – but next Node-Red-Dashboard release it will NOT – css and scripts only will NOT use up screen real estate – all coming together VERY well right now.

Facebooktwitterpinterestlinkedin

The post More Node-Red Dashboard Success appeared first on Scargill's Tech Blog.

ZemiSmart Smart WiFi LED Table Lamp

$
0
0

This blog entry will be short as there is not much to this desk light. This ZemiSmart offering is controlleable by WIFI or locally, costs maybe £30 on Amazon and – why would you pay that for a desk light? Well, for one thing you have full control over colour temperature from 2700K (yellow-ish white) up to 6500K (blue-ish white) and of coursed, brilliance. The light looks modern, is lightweight but solid.

Power? Well, in the Italian blog I refer to below, the writer mentions 6W – in the lamp instructions we see “Max power 12w” – so perhaps more clearly, the maximum output is 300lm. Here’s a direct link and an Amazon UK link.

Being a LED strip light it casts a nice soft light – and supposedly lasts for up to 25 years (I can’t verify this for obvious reasons). The lamp is also fully adjustable. You control the lamp locally, by APP or vocally via Amazon Alexa, Siri or Google Home..

For the enthusiasts – yes, the lamp DOES use an ESP8266 chip – and can be re-flashed to Tasmota using TUYA-CONVERT (but be aware, at March 23 2020 there seems to be a slight issue in the Tasmota template, I have to turn my lamp on TWICE when using the web interface or Alexa) – open this blog entry for details of how to set up TUYA. Once that is ready – hold in the lamp reset as below in the para starting “Reset hole”. Once you have Flashed Tasmota to the unit, update the template as per Mr Shark’s comments below starting “same model”. Oh and when all done and working you might want to OTA upgrade Tasmota to the latest release.

App choices seem to be “Smart Life” or “Tuya Smart” – which do the same thing. You can control the light and even add timers in the APP – but in common with other timers of this type you do not have dusk-dawn control – which is one reason I generally stick with gadgets that will run Tasmota and hence be centrally controlled by Node-Red and my BigTimer – but that’s another story.

This aluminium lamp is foldable, comes complete with power supply (110v-220v to 12v) and has a single 1000ma USB output on the lamp base for charging phones etc – note that this is NOT quick-charging, just standard USB charging. In the photo below, note the controls on the base.

Zemismart Desk Lamp

Reset hole: So, to detail, the instruction sheet could be clearer, so here is what you need. The back of the lamp base has (left to right) USB out, power in, blue indicator hole, reset microswitch hole. To mate one of those APPS with the lamp, you need (while the lamp is powered up) to hold a pin into that reset hole for a few seconds until the blue indicator starts to flash rapidly – then you can run through the simple lamp addition described in the leaflet that comes with the lamp. So for example, while that blue indicator is flashing, open the Smart Life APP, press “+” in the APP, select lighting, WIFI light, enter the name and password of your WiFi network and shortly thereafter, you are done.

You can also set up the lamp with Home Assistant but for that I’ll point you to this handy Italian blog – use your browser translate function if you don’t do Italian.

At some point I’ll take the bottom off this to see if it can be converted to Tasmota – for now this is suitable for IOT novices.

Facebooktwitterpinterestlinkedin

The post ZemiSmart Smart WiFi LED Table Lamp appeared first on Scargill's Tech Blog.

A Trip Down Memory Lane

$
0
0

Nothing beats virus-related-boredom like a trip down memory lane. This morning I got an email from Japan – specifically from game journalist Koji Fukuyama.

Now, I get stuff in the mail all the time and I’m VERY wary of people asking questions out of the blue, not relating to the blog – as there are SO MANY scammers out there. – But in this case, Koji was writing about Japan’s first “Adventure” game “Omotesando Adventure” made at the end of 1982 and how it relates to one of the earliest “Adventure” development systems from the same time – specifically my own Dr Dobbs publication, rather unimaginately called “Adven-80” (marketing was never my strong point). I think that’s my code on the front cover you see above.

Clearly by his questions, the writer had done his background checking – just as I thought the entire world had forgotten all about my early pre-Internet-age efforts, along comes someone who wants to write all about it. Well better now while I’m still alive, I guess 🙂

If you are bored, there’s more here, here and here… Oh and the ZIP file of my source code might fill a few bored moments.. or not. Hard to believe how we managed a world without computer graphics – and no, I’d rather not go back, thank you.

Apart from Covid-19, Boris and Trump (in that order), I am more than happy with living in the 21st century, so this dip into the past will definitely be a one-off, probably to the relief of younger subscribers.

Facebooktwitterpinterestlinkedin

The post A Trip Down Memory Lane appeared first on Scargill's Tech Blog.

Helpful Engineering Volunteers Against Covid-19

$
0
0

I’ve been asked today by Aidan Ruff – many of you will have come across the name of my friend and ex-business partner of many years as we work on projects together and so when he asked me to put a word in for a volunteer group called “Helpful Engineering” in these difficult times, I said I would.

The group apparently already has 3400+ volunteers (engineers, developers, doctors, scientists etc. working on 35+ projects. I have to mention that I am NOT vouching for the “partners” in this group, i.e. the larger sponsors as I know nothing about them. The honourable purpose of this group is all about volunteers with engineering/tech knowledge offering to team up (worldwide) with medical people in the fight against the COVID-19 pandemic – so if the human race is as clever as we usually think we are, this post will have served its purpose soon and will then disappear.

My recommendation is to look at their ABOUT page to find out more if you can help (or if you are in the medical profession, if you need help.

After all, what use are our great skills if we don’t have people to use what we design or make… if there ever was a time for open, hopefully for now red-tape-free cooperation between medical professionals and the engineering and technical muscle of the world – surely NOW – RIGHT NOW is that time.

The site has a volunteer form and also a SLACK workspace for online cooperation.

Facebooktwitterpinterestlinkedin

The post Helpful Engineering Volunteers Against Covid-19 appeared first on Scargill's Tech Blog.

Skype Alternatives – a Discussion with Results

$
0
0

I am sick up to here with websites telling you “the best alternatives” while not allowing discussion – in other words, thinly disguised adverts. I’ve been a Skype user since long before Microsoft came along and ruined it.

Recently we’ve been looking for FREE alternatives to the free Skype that might do the job for text, video, audio, chat, screen sharing and file sharing. There are several contenders but typically the authors make assumptions about your preferred platforms or there are other limitations. Now, I use a PC and sometimes use my Android phone or tablet – the first “alternative” does not let you edit something once it has been sent – at least not in the PC version (that’s Google Hangouts – so that’s off the list). WhatsApp is a pain to use if you are not using a mobile device – so that’s another one off the list. ZOOM is WONDERFUL generally – even the free version but even that doesn’t appear to let you edit something already posted.

Skype of course DOES let you edit after posting a chat – but Skype has its own problems like lacklustre video quality.

Discord

Thanks for the feedback guys – I installed the Discord program on my PC and App on my phone – and aside from non-headphone audio feedback on the mobile app, it beats Skype no problem (both sound and video on a PC are great) AND Discord has the after-posting editing… ZOOM is getting all the (non-critical) press right now, I can only suggest looking up issues of ZOOM+PRIVACY and remember that also, if you make a mistake, you are stuck with it.

To my knowledge these are not issues to worry about with DISCORD. I like it already.

Facebooktwitterpinterestlinkedin

The post Skype Alternatives – a Discussion with Results appeared first on Scargill's Tech Blog.

H96 Max Android TV Box

$
0
0

After a while all of these Android TV boxes begin to look and sound alike – but are they? What about picture quality?

I just received a new Android 9 TV box from Banggood – and we did not get off to the best start. On opening the box, hidden therein was a nice, small, round TV box, very pretty compared to others I’ve seen.

The shape sets it apart. The H96 MAX is round, not square and has (along the edge at the rear) USB3 and USB 2 connectors – one of each, as well as an HDMI output and both 3.5mm and SDPDIF audio outputs. There is a small 12v DC input and a TF card connection. Both Ethernet (RJ45) and WiFi are available. The H96 Max came complete with plug-in-the-wall power supply. All pretty standard stuff.

H96 MAX Android 9 TV Box

On the front edge is a clock display in purple. This is a bit of a waste of time as I found it insufficiently bright to view in any kind of strong lighting. The remote control is pretty standard for units like this – not really that special as it has no keyboard for entering passwords – but again, all pretty standard stuff. You can of course buy replacement RF remote controls with more buttons, very inexpensively.

The box has the standard Android Playstore (not a crippled Android TV version) and so the full range of Apps is available for use on the fairly uninspiring TV dashboard.

H96 MAX
H96 MAX TV Box with remote

What for me makes this Android 9 box stand out from others is the picture quality on my 4K TV. I have used several such boxes and the picture quality on the H96 Max, given the right material such as YouTube 8K trailers (which downscale to 4K of course) – the quality in these circumstances is the best I’ve seen and makes up for the lacklustre remote easily. I can’t of course demo such quality here so you’ll have to take my word for it. I’m no stranger to 4K trailers and videos but neither my Roku box nor my other recent Android boxes do them justice – this box does. I usd the harwired Ethernet connection to view the demos and at home I have 75Mbps Vodaphone broadband so results will vary depending on the kind of broadband you have.

Given that i have other such boxes, does this one get the job? YES, absolutely.

Facebooktwitterpinterestlinkedin

The post H96 Max Android TV Box appeared first on Scargill's Tech Blog.


Sonoff RF Bridge 433

$
0
0

I just received another neat little Sonoff RF Bridge, a great and inexpensive gadget (small box) for converting RF signals from various devices into WiFi.

For my first RF-Bridge, it took all of 30 seconds for the brand new (and surprisingly small and neat) unit to connect to Sonoff’s EweLink app and then a few seconds more to upgrade the firmware. How easy was THAT. The only info I gave it was my WiFi username and passwork – and when it came up with a boring name I hit EDIT and called the unit BRIDGE. That’s it. The Banggood link for these handy gadgets is here.. The new unit will be the same as the original and this is going at the /OTHER end of the house.

You might find this extensive information on the RF Bridge 333 here at the Itead Wiki useful.

And why do I need more than one? Well, I have a single storey, WIDE stone cottage – no WAY a single 433Mhz unit will span from one end to the other through several 200-year old stone walls.

As I got started, I immediately updated the sofware revision from 2.7.0 to 3.3.0 – mind you, that didn’t last long. Well, what did you expect? I hack things.

As soon as I got used to the RFBridge I installed Tasmota on it. Firstly the latest release 8.0 of Tasmota then the latest DEV update 8.1.0.5

Sonoff RFBridge

This will be ongoing – I needed this device as I am adding the odd 433Mhz device to my home control – and monitoring UK smoke alarms, water and door sensors on my mobile when I’m over in Spain is a must. I need (and now have) at least two of these RF Bridges, as, from my home to the home office comprises several inches of solid stone wall and there have been no major miracles in RF technology recently. (Update: All of the Itead sensors work across from my office to the house – but my trusty Byron SX35s do not),

Anyway as you might imagine I very quickly tired of the standard RF Bridge software and went off here for Tasmota. Flashing the ESP side of the RF Bridge33 takes no time with the latest release of Tasmota. I used my normal 3v3 FTDI – and hence did not need any mods on my “Board R2 V1.0” Bridge.

As you might expect, to flash Tasmota onto the Bridge, I had to hold down the one and only button on the board while powering up the FTDI (that’s after setting the only onboard switch to OFF). I flashed the Tasmota software, cycled the power, set the onboard switch back to ON and after a reboot, that was Tasmota up and running. I tried loading the config at the same time but messed up my WIFI password. NO matter, the board came up with it’s own local web server and so using my phone I connected to that – and then put in my WIFI credentials – and gave the board the name “bridge”. From there the board appeared on my network. Using the assigned IP address in my PC browser I filled in the MQTT details and friendly name “bridge” and tried an experiment in MQTT that worked. With a topic of tele/bridge/RESULT the board, on getting an RF signal from my handy Itead 8-key remote, returned:

tele/bridge/RESULT : msg.payload : string[109]”{“Time”:”2019-12-30T23:39:38″,”RfReceived”:{“Sync”:7330,”Low”:250,”High”:730,”Data”:”1FCD68″,”RfKey”:”None”}}”

At this point I’m still learning but that “data” reliably returns a value for each of the keys on the iTEAD remote and a fire alarm I’d grabbed as it claimed to be RF Bridge compatible ALSO returned a reliable result.

I then tried an Itead water detector and a door sensor, As I understand it there are limits as to how far one could expand this using the iTead RF software and sure enough, I quickly found limits – according to Dr ZZs the RF Bridge 433 should be able to support loads of remotes (check out his video – very helpful) but I have a couple of Byron SX35 433Mhz pushbuttons (actually I have about 100) – and out of them with the standard RF sofware… absolutely nothing even running Tasmota.

So having tested the Itead sensors to my satisfaction, my next job was to grab the (also) free “Portisch” firmware (hex file from the Portisch Github page) and add that to the mix. This should greatly extend the number of devices the Bridge will talk to and also allow the bridge to SEND commands itself. Installing the Portish software is easy and does not require the use of an FTDI. On the R2 RF-Bridge board, assuming you can muster up 3v3 without using the usb connector – no link cuts are needed (follow instructions on the Tasmota site).

All that is needed is to turn off the RF side of the RF-Bridge board using the onboard switch, connect power, put in 2 cross-links (no soldering required unless you really want to) and 3v3 + ground onto one of the onboard connectors – photos on the Tasmota site and using the Tasmota Web UI for the RF-Bridge, select “firmware upgrade” local file option, pointing it to your downloaded Portisch HEX file.

When the download is done, remove the links and 3v3/gnd, turn ine onboard switch back on, apply USB power and you are in business. The RF-Bridge Tasmota software will continue to function as before but now will accept new RAW data. Back to the Tasmota and Portisch/Github sites for details. I managed to get my RF-Bridge to simulate a pair of my Byron SX35 doorbell buttons reliably.

I quickly figured out (with help) how to add a permanent rule to the RF Bridge to always work with RAW codes. More on that later.

Facebooktwitterpinterestlinkedin

The post Sonoff RF Bridge 433 appeared first on Scargill's Tech Blog.

Sothing PTC Shoe Drier and Diodoriser

$
0
0

Something new… when you are stuck in the house for weeks on end with no sun (Northeast of England – under lockdown) and instructions to wash clothing and hands whenever you are planning a grocery shopping trip, it certainly comes in handy (and cheap) to have something to dry your shoes 🙂

I asked Banggood to ship the dryer to me, not having any idea if it would actually be of any use, however, the Sothing PTC Electric Shoe and Boot dryer from Banggood actually does seem to do the job.

I’m not sure about the timing as the unit I received had no timer that I could find, but I plugged it into the mains supply – it turns out this takes only 20w so I figured it would be ok to leave it on all day, so I did. The unit did a good job. It is also pretty.

In fact, not only did my shoes need a wash but I had to scrape red floor paint off them as well and I thoroughly expected at the end of the wash and dry scenario to have an utterly destroyed pair of shoes. Wrong. They’re just fine.

Facebooktwitterpinterestlinkedin

The post Sothing PTC Shoe Drier and Diodoriser appeared first on Scargill's Tech Blog.

Sonoff Mini with Espurna versus the competition

$
0
0

You can’t get away from it, the iTead products are cheap – and sometimes that is very important. But are they the best solution for Home Control? Well, that depends. Sonoff products have always been inexpensive. But bear with me.

At one time the company had a seemingly unbeatable grip on the DIY end of home control – their products which are based on the likes of the ESP8266 include Sonoff BASIC and variations. Not much use for more complex control but for basic on-off control, less than £5 sterling gets you a simple WIFI controller. Today there is some competition depending on your wallet and how much you want to spend on controlling a light.

Of course many of us are averse to using even more Chinese “cloud” or even more APPS – not in my case for political reasons but because I am a happy Raspberry Pi/Node-Red user – and I want to keep my home control working as much as possible even if the WIFI goes off – you can mitigate power issues by using battery backup, generators and other solutions but if your entire control system is cloud-based, what do you do if the Internet service provider screws up?

Every IOT company seems to think you should use THEIR APP… I already have lots of different apps for my various watches – I don’t want any more for my home control thank you. Which brings us back on topic – Sonoffs. Sonoffs were the smallest and lightest cheap control box until along came Shelly. But on cost, Sonoff still have the edge by some way – and on size, well, the new Sonoff Mini competes there as well.

Sonoff Mini

Shelly made some smart moves however – MQTT support and a nice user interface. Sonoff Mini has DIY mode and as I just found out that kind of works – though it needs fixing up. Cutting to the chase, this page has good info on using Sonoff Mini in DIY mode and within that is the Windows tool you need to set these units up in DI mode. The tool however seems like an unfinished demo.

So, grab a Sonoff Mini (not as cheap as Sonoff Basic but smaller). After wasting hours following the WRONG info I got hold of the links above. The initial issue I had was this – often this kind of board has a user interface i.e. built in with a web server for initial setup – Sonoff Mini doesn’t.

Instead, they expect you to set up a router (or your mobile phone hotspot) with a specific SSID and password. That floored me initially as I was expecting to find that hotspot within the device itself. I took the approach of temporarily renaming one of my WIFI access points.

WiFi SSID: sonoffDiy
WiFi password: 20170618sn

So firstly I did the above, then turned on the un-altered Sonoff Mini – and used the EWELINK App on my phone to set the Mini to work with that access point. I then set the Mini to work with my normal access point. Easy up to now. Using the APP I upgraded the firmware of the Mini to v3.50 – you HAVE to do this as the stock software that likely came with the unit (v3.0.0) doesn’t support the DIY mode.

Next I turned off the device, opened it up (no screwdriver needed) and fitted the supplied “DIY” link to the two OTA pins inside – clearly marked. I put the top back on.

The instructions refer to a single flashing LED meaning you do NOT have a WIFI connection – a double flashing LED means you DO. I turned on the Mini and sure enough, I DIDN’T. WHY? Well, despite the really poor translations I eventually twigged that when you change modes to and from DIY mode and normal CLOUD mode, you lose any custom WIFI settings. Right, back to the special access point.

NOW I was COOKING. I grabbed the EXE program in the link above but frankly it is just not very good. Glaring problems (renaming the device doesn’t work, the popup dialog is faulty, changing access point options don’t show you the EXISTING access point etc. I changed the name of the Mini from the utterly useless default to myfirstmini. I also set up my normal WiFi access point.

Sonoff Mini DIY does not support MQTT natively, but it DOES have an API on port 8081 and if you get stuck into THIS page, you can supposedly easily make use of it. I had no joy. Strangely as a devout MQTT user I just recently spoke to my SHELLY 1 using ITS API – if you are a Node-Red user, that’s a lot easier than it seems. Essentially using the HTTP REQUEST node is a doodle.

HTTP Request

Thats the yellow one above. I’m controlling a relay on my heating system with simple on off commands and THIS is the setup inside of that node.

HTTP Shelly

In the Shelly I simply fire into that node a payload of “turn=on” or “turn=off”. Easy once you know how. I can also read the output of that node to see what came back… String(msg.payload.ison)

But that’s Shelly .

Thankfully what the otherwise poor Sonoff tool DOES manage is to let you flash the likes of Tasmota and Espurna – I’ve used both and I have to say, at least for the Sonoffs – for me, Tasmota wins. When I originally wrote this article I flashed Espurna onto the Mini – but since then Tasmota has come along in leaps and bounds and is now my standard go-to.

I tried the Sonoff DIY software but it simply isn’t rock solid and so eventually I pulled out the soldering iton. Wiring to the 5 pins on the Mini isn’t that hard if you take care. Using a bog-standard TFDI and TASMOTIZER on the PC, I flashed the online TASMOTA-LITE.BIN straight onto the board.

And there it is. Make sure you use 3v3 and not 5v. You need a fine soldering tip and steady hand for this but it is no-where near as hard as trying to solder, for example, an ESP8266 chip. To FLASH the board, before powering up, CAREFULLY ground the PRG pin (In the image below it says GPIO – I meant GPIO0). Once done programming – release that pin. In fact I took the lot off, put the unit back in the box, fired mains power at it and on my phone the familiar access point popped up and I then told the board (192.168.4.1 in my phone browser – configuration tab – no need to change module settings – jump straight to WIFI ) about my local access point on my network, then fed in MQTT details and that was that.

Actually some interesting stuff from the Tasmota site.

Sonoff Mini

I’m sure we can find a use for the second input (on the connector) not to mention GPIO2, GPIO3, GPIO16 (output only)….

Facebooktwitterpinterestlinkedin

The post Sonoff Mini with Espurna versus the competition appeared first on Scargill's Tech Blog.

Ravpower PD Pioneer 61W Wall Charger RP-PC112

$
0
0

Wall chargers for phones are not vsomething I get excited about but as this handles Quick Charge AND has enough power for a Raspberry Pi, here goes. The RP-PC112 UK version is a white, neat-looking USB-C wall charger weighing 105g and sized at 82.8x52x48.1mm. Equivalents for other countries may vary in size.

But that’s not why I’m writing about this (just getting the specs out of the way). The important bit is that the connector on the front (no USB lead supplied) is USB-C. Power output is 5v or 9v or 12v or 15v or 20v or 20.3v at 3A regardless. If you are familiar with fast chargers you’ll know that they can adapt the output using a special technique depending on what they are charging. So for a simple 5V USB gadget you are looking at 5v – 3A whereas for phones able to handle quick-charging, higher voltages are used.

My Pocophone F1 is currently sitting at 47% and I’m plugging it into the charger using a handy USB-C to USB-C lead. Let’s see what happens:

SO, first things first – the only USB-c to USB-C lead I have is 1 metre long – normally would not use a USB lead that long for charging a phone. In this case my Pocophone F1 says “Quick Charge” – that’s a good start.

Start time at 3:35pm with the phone starting at 47% (the phone is on, with WIFI connected but apart from taking and processing then uploading a photo of the charger, is not in use). By 15:51pm the battery is at 73%, thats 25% charge in 16 minutes, WIFI on, Bluetooth off. At 4:20pm (50 minutes) the phone is at 92%.

Can’t complain – and that’s on a long lead. For assistance, contact support@ravpower.com

Facebooktwitterpinterestlinkedin

The post Ravpower PD Pioneer 61W Wall Charger RP-PC112 appeared first on Scargill's Tech Blog.

Scargill’s Covid-boredom fighting idea #1

$
0
0

My friend Antonio just pointed me to an expensive Australian “Smart” kettle which heats up coffee in the morning for you. All very nice but not cheap AND not ACTUALLY available right now.. also, simple imers asume you always get up at the same time – right now, few people are doing that and people not currently in jobs (or retired) often do not have rigid schedules – why would they. So, I came up with another idea.

Take any old kettle – like mine and put a Smartplug on it, preferably a pretty one and definitely with an easily-accessible button (A Tasmotized plug has the added advantage of a timeout). Next time you use the kettle, turn on the kettle at its base or wherever you do that and when it is done, turn off at the wall (or have it time out) and turn on at the base of the kettle. So, the kettle is ON but not actually getting any power.

Next, before getting out of bed the next morning,. tell Alexa to “turn on the Kettle”. By the time you get into the kitchen you should have piping hot water for your tea or coffee.

There is always a cheap way to do things, but me being me I took the oportunity to upgrade our living room Alexa to the (currently half price at Amazon) “Alexa Show” hence freeing up an Alexa Echo (gen 3) for the bedroom. If you are reading this and you have never heard of Alexa then you are in the wrong place. No doubt Google Home Mini would do a similar thing with most un-modified Smart plugs but that’s out of the scope of this short article.

Standard kettle about to be made smart

Enjoy.

And there it is, all done, dusted.

Smart plug driving my Kettle

Facebooktwitterpinterestlinkedin

The post Scargill’s Covid-boredom fighting idea #1 appeared first on Scargill's Tech Blog.

A ZemiSmart Weekend

$
0
0

Today, I received a shipment of goods from ZemiSmart including a small but surprisingly bright 5W Smart Bulb, a WiFi Smart Socket (max load 16A – 1875W (non-inductive)) with twin USB (5v@2A) and a really neat battery-free (yes, battery-free bell-push) Smart Doorbell.

First the Smart Bulb.. well, I just fell in love with it immediately.I’ve not hacked it yet (I will) and am currently playing with the Smartlife APP controls. White colour temperature, full colour control, intensity, scheduling, timeout – it’s all there and the colours are quite bright for a “5W” lamp.

Zemismart Smart Lamp

A visit to MACVENDORS.COM confirmed that this device IS based on an ESP8266 and hebce can run Tasmota for those adverse to using the cloud.

Secondly, the Smart Plug with twin USB – another visit to MACVENSORS.COM confirmed this is NOT based on an ESP8266 chip and hence CANNOT run Tasmota. Using the Smartlife APP, this unit has a button bottom-front to turn it on or off. This turns on and off the mains outlet AND the twin USBs at the same time, while on the APP you control mains power and USB separately.

Zemismart Smart Socket

Note the width of the smart plug – this does NOT take up 2 sockets as some do – and that’s nice – on the other hand if you have mains sockets too near the floor, you might not be able to fit this device without using a block.

You also have separate timeout and schedule controls for USB and mains power in the APP. The USB sockets do not light up separately. On the APP, device information (unlike some Chinese cameras I’ve seen) gives you the IP and MAC addresses for the plug along with timezone and signal strength.What I don’t like about this switch, aside from inability to Tasmotise it – is that on power cycling, it defaults to OFF, so if you had one of these controlling a small (1KW) heater, you might come home to find a cold room. That’s just daft.

Third party controls include Alexa, Google Assistant, IFTT, Tsmall Genie, DuerOS and Rokid (I’d never heard of the last three either).

Thirdly – the Battery-Free Wireless Doorbell. Lovely. Standard, small, plug-in-the-wall bell with 48 sounds, some of which are voice, sadly in the wrong language, the one most of us here don’t understand, but the tunes are nice. More’s the point, the actual door push is kinetic, i.e. no batteries – and that’s a good thing. I have a kinetic hallway light switch – and unlike most cheap piezo fire starters, these do seem reliable with a claimed life of 20,000 operations and operating range of -25c to +50c (just as well, I will take this to Spain when we finally get out of the UK).

Zemismart Doorbell

The doorbell and bell push arrived pre-synced, all ready to go straight out of the box, The bell has 2 buttons, one for volume, the other to select tunes. The bell push comes complete with adhesive pad. You also get a somewhat daft “Please ring the doorbell” sticker – too big to fit on the button.

More soon.

Facebooktwitterpinterestlinkedin

The post A ZemiSmart Weekend appeared first on Scargill's Tech Blog.

Weather Data using Node-Red and APIs

$
0
0

With the forthcoming descent of Dark Skies into an Apple-Only universe (a sad loss for the rest of us) I’ve been looking into alternative APIs to use for grabbing weather forecasts and related data. While I struggle with the MET Office behemoth, here’s a little information on yr.no

I’d not heard of them until this week so if this is new to you, don’t worry. The yr.no API is free to use, getting results is easy using Node-Red and useful for obtaining weather information, now and in the future and as a bonus, sunrise and sunset times for any place. Unlike more comprehensive and involved systems, yr.no lets you access this information by place name only, not longitude and latitude – after all do you really need weather, sunrise, sunset, wind, air pressure etc down to your exact house or office? By PLACE I mean town. Of course you could always use the Node-Red Geonames nodes if you want to put in long/lat or something else.

Ok, so when you first look at this, depending on your experience with APIs and also Node-Red, this might look horrific or simple – I can’t narrow it down more than that. I was terrified for all of 30 minutes until I twigged.

No passwords or accounts are needed to access this information. Let’s take an example, my (summer) home town in the Spain. Punch this exact URL (Universal Resource Locator) into your web browser.

https://www.yr.no/place/Spain/Andalusia/Galera/forecast.xml

So what you will get out of that URL is a huge block of data in XML format not pretty).

I was interested in temperature NOW (you can have hourly forecasts into the future) along with wind speed, precipitation and for the sake of it, sunrise and sunset times. I also wanted to be able to easily separate the location from the URL, get the output in JSON format and for demo, put bits of it into a DEBUG node. Here’s my FLOW – for in this case my local town in the UK (note the embedded space in the location). When you see this flow in Node-Red, it’s a lot easier than it looks here.

[
{
"id": "eb15898.cc42378",
"type": "debug",
"z": "2cc9e9b.cf76b16",
"name": "Json Data",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "jsonata",
"x": 760,
"y": 260,
"wires": []
},
{
"id": "a8fe5bd9.9cbb68",
"type": "inject",
"z": "2cc9e9b.cf76b16",
"name": "Wark",
"topic": "",
"payload": "United%20Kingdom/England/Wark",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 180,
"wires": [
[
"d058e98b.288fc8"
]
]
},
{
"id": "336a67bc.abb528",
"type": "http request",
"z": "2cc9e9b.cf76b16",
"name": "req1",
"method": "GET",
"ret": "txt",
"paytoqs": false,
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"x": 550,
"y": 240,
"wires": [
[
"2b054761.f76838"
]
]
},
{
"id": "2b054761.f76838",
"type": "xml",
"z": "2cc9e9b.cf76b16",
"name": "xml1",
"property": "payload",
"attr": "",
"chr": "",
"x": 430,
"y": 300,
"wires": [
[
"6cf9c4e9.c0d64c"
]
]
},
{
"id": "6cf9c4e9.c0d64c",
"type": "function",
"z": "2cc9e9b.cf76b16",
"name": "BIts I need",
"func": "var bits=msg.payload.weatherdata.forecast[0].tabular[0].time[0];\nvar place=msg.payload.weatherdata.location[0].name[0];\nvar sun=msg.payload.weatherdata.sun[0].$;\nmsg.payload=place + \": \" + bits.temperature[0].$.value + \"c \" + \" Precip: \" + bits.precipitation[0].$.value + \" Wind: \" + bits.windSpeed[0].$.name + \" (Rise:\" + sun.rise + \" Set:\" + sun.set + \")\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 570,
"y": 300,
"wires": [
[
"eb15898.cc42378"
]
]
},
{
"id": "f60f5d63.f1eab",
"type": "change",
"z": "2cc9e9b.cf76b16",
"name": "",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 240,
"wires": [
[
"336a67bc.abb528"
]
]
},
{
"id": "d058e98b.288fc8",
"type": "function",
"z": "2cc9e9b.cf76b16",
"name": "Merge URL and PLACE",
"func": "msg.payload= \"https://www.yr.no/place/\" + msg.payload + \"/forecast.xml\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 370,
"y": 180,
"wires": [
[
"f60f5d63.f1eab"
]
]
},
{
"id": "1178dba3.b15684",
"type": "inject",
"z": "2cc9e9b.cf76b16",
"name": "Galera",
"topic": "",
"payload": "Spain/Andalusia/Galera",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 220,
"wires": [
[
"d058e98b.288fc8"
]
]
},
{
"id": "443e8b8.5b6fe74",
"type": "inject",
"z": "2cc9e9b.cf76b16",
"name": "Baza",
"topic": "",
"payload": "Spain/Andalusia/Baza",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 260,
"wires": [
[
"d058e98b.288fc8"
]
]
},
{
"id": "55efd882.53d238",
"type": "inject",
"z": "2cc9e9b.cf76b16",
"name": "Vera",
"topic": "",
"payload": "Spain/Andalusia/Vera",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 300,
"wires": [
[
"d058e98b.288fc8"
]
]
}
]

For a test, click on the top left INJECT node… The one that says WARK… and view the result in the DEBUG node. I’ve used standard Node-Red nodes here including function nodes with a little coding to break up the (now Json) data into what I’m interested in).

Another way to get info out of yr.no

https://flows.nodered.org/flow/affa4bd5194a25019081d2ec8191fa48

and for pretty pictures.. a URL like this perhaps… EASY https://www.yr.no/place/spain/Andalusia/Galera/meteogram.png

Facebooktwitterpinterestlinkedin

The post Weather Data using Node-Red and APIs appeared first on Scargill's Tech Blog.


RFLink – 433Mhz Remote Control and Node-Red

$
0
0

Many moons ago I just happened to be staying overnight with my pal Jonathan and he had some surplus (and so free) Byron doorbell pushes to demonstrate.

He showed me a universal RF 433Mhz receiver board he purchased with which could look at the signals from the various kinds of 433Mhz standard transmitting units.

RFLink Board and Mega

This was interesting as I had an Acurite weather station with the most appalling interface which required a PC to be ON constantly in order to remotely access the information.

I don’t know what planet the Acurite designers were on – but it was a gift from my wife, solar powered and including rain level, wind speed and direction etc.. a nice job other than the software. It has been sitting outside the wall on my office for months doing nothing.  I thought it might be interesting to get that going.

RFLink

The unit my friend was using was rather expensive but he suggested I try the free RFLink software along with a DIY unit comprising an Arduino Mega2560, a little board called an RFLink V1.1.4 (now updated) and an antenna – you see the lot here.

tmpC75DThe kit duly arrived and I put it together with a soldering iron easily enough but had to wait for a Chinese Arduino Mega board to arrive. I downloaded the software – a very simply install program for the PC – couple of button presses really – and that was that. I plugged the little RF board into the MEGA, plugged the Mega into my PC and… out of the blue, information from my Acurite board appeared out of no-where, as did more one-liners from my Byron button presses and even our doorbell. It took no time at all with help from a fellow enthusiast who’s used this stuff before to figure out how to send a signal back to the doorbell to make it work.

All very nice but I needed to get this running in Node-Red.

I took my latest Raspberry Pi using DietPi and after adjusting comms permissions, simply plugged the USB device into the Pi and set up a serial node for both transmit and receive. Note April 2020 – today I use only the full Raspbian for various reasons.

From there on it was easy  – the combination of the two boards and that software seems to work really well for receiving from 433Mhz sensors and for sending out commands to 433Mhz boards.

I had a slight concern about how long you have to leave the Byron SX35 pushbuttons before pressing again (3 seconds). But I  mentioned this to the RFLINK author and within an hour he came back with an update which made the delay much more practical.

Valid input instructions from the various sensors is in this link along with the Arduino software download….

http://www.nemcon.nl/blog2/protref

I bought a bog-standard Arduino 2560 (cheap Chinese version)

I bought this board… the RFLink 433 kit – requires a little soldering…

https://www.nodo-shop.nl/en/21-rflink-gateway

10 minute soldering (take note of version numbers – important), 10 minutes max to blow the software. Test the board (56k baud) to ensure when nearby sensors are sending results – they are coming in and then I wrote this test… it isn’t very elegant yet.

My SERIAL node is set to split input on character “\n” so the code has to get rid of return characters as you’ll see in the “replace” line below. Note also that when you send out serial (to actually control something) it should be followed by both “\r\n”.

RF433

Put that in a Node-Red template – attach a Node-Red serial Node set to take serial input from USB0 at 56k – character /r as a separator and deliver ascii strings…and that – is just the beginning…  note also that the designer of this free software has also added GPIO control both input and output – on several pins (recently expanded so check his docs).

Tests

For some time I used an old K10000 phone acting as a server running Debian and running Tasker and the MQTT client Tasker plugin with the same phone running as a resource…. and I could fire an MQTT message at the latter to get a doorbell message out! Meanwhile a Raspberry Pi was running that RFLink unit and when one of the Byron doorbell pushes was pressed – a message was sent out to the phone to play the doorbell – yes, I know, somewhat over the top – but I was just experimenting… and sure enough – press the button and pretty much in real time the doorbell sound appeared.

433Mhz to MQTT Gateway

In the comments below you’ll see reference to an ESP8266 to MQTT Gateway – and this would be ideal as it would be all in one little box – whereas I need to stick something like a Pi on the end to generate a wireless MQTT signal…. so – I grabbed the software and (disregarding several wasted hours due to a duff FTDI) put together one of these – as you’ll see in the photo on the right-  the antenna is due to kind feedback below – and as you can see, it is a precision job – not (it is accurate however and works).

Well, I have a 4-way remote control for a cheap Chinese remote and indeed this little system does pick it up and sends a unique number for each key off as MQTT – lovely – however – even with a decent little aerial the unit does not pick up (or recognise) my weather station of any of my BYRON pushbuttons – and the data coming back is crude compared to the RFLink software so at first glance, not impressed.

// So firstly a generic means of getting incoming items into an object 
var the433 = {}; 
msg.payload = msg.payload.replace(/(\r\n|\n|\r)/gm,""); 
node.warn(msg.payload); 
var parts433 = msg.payload.split(";"); 
the433.p1 = parts433[0]; the433.p2 = parts433[1]; 
the433.name = parts433[2]; var a = 3; 
while (a < parts433.length) { var bits433 = parts433[a].split("="); 
switch (bits433[0]) { case "ID": the433.id = bits433[1]; break; case "SWITCH": the433.switch = bits433[1]; break; case "CMD": the433.cmd = bits433[1]; break; case "SET_LEVEL":
the433.set_level = parseInt(bits433[1], 10); break; case "TEMP":
var int=parseInt(bits433[1],16);
if ((int & 0x8000) >0) {
the433.temp=-(int & 0x7fff) / 10;
} else {
the433.temp = int / 10;
}
break; case "HUM": the433.hum = parseInt(bits433[1], 10); break; case "BARO": the433.baro = parseInt(bits433[1], 16); break; case "HSTATUS":
the433.hstatus = parseInt(bits433[1], 10); break; case "BFORECAST":
the433.bforecast = parseInt(bits433[1], 10); break; case "UV": the433.uv = parseInt(bits433[1], 16); break; case "LUX": the433.lux = parseInt(bits433[1], 16); break; case "BAT": the433.bat = bits433[1]; break; case "RAIN":
the433.rain = parseInt(bits433[1], 16) / 10; break; case "RAIN":
the433.rainrate = parseInt(bits433[1], 16) / 10; break; case "WINSP":
the433.winsp = parseInt(bits433[1], 16) / 10; break; case "AWINSP":
the433.awinsp = parseInt(bits433[1], 16) / 10; break; case "WINGS": the433.wings = parseInt(bits433[1], 16); break; case "WINDIR":
the433.windir = parseInt(bits433[1], 10); break; case "WINCHL":
the433.winchl = parseInt(bits433[1], 16); break; case "WINTMP":
the433.wintmp = parseInt(bits433[1], 16); break; case "CHIME": the433.chime = parseInt(bits433[1], 10); break; case "SMOKEALERT": the433.smokealert = bits433[1]; break; case "PIR": the433.pir = bits433[1]; break; case "CO2": the433.co2 = parseInt(bits433[1], 10); break; case "SOUND": the433.sound = parseInt(bits433[1], 10); break; case "KWATT": the433.kwatt = parseInt(bits433[1], 16); break; case "WATT": the433.watt = parseInt(bits433[1], 16); break; case "CURRENT":
the433.current = parseInt(bits433[1], 10); break; case "CURRENT2":
the433.current2 = parseInt(bits433[1], 10); break; case "CURRENT3":
the433.current3 = parseInt(bits433[1], 10); break; case "DIST": the433.dist = parseInt(bits433[1], 10); break; case "METER": the433.meter = parseInt(bits433[1], 10); break; case "VOLT": the433.volt = parseInt(bits433[1], 10); break; case "RGBW":
the433.rgbc = parseInt(bits433[1].substring(0, 2), 16); the433.rgbw = parseInt(bits433[1].substring(2, 4), 16);
break; } a++; } // SO - the above is general... here is my specific setup for temporarily displaying // the Acurite info if ((the433.p1 == "20") &&
(the433.name == "Acurite") && (the433.id == "c826")) { if (typeof the433.temp !== 'undefined') temp = the433.temp; if (typeof the433.hum !== 'undefined') hum = the433.hum; if (typeof the433.bat !== 'undefined') bat = the433.bat; if (typeof the433.rain !== 'undefined') rain = the433.rain; if (typeof the433.winsp !== 'undefined') winsp = the433.winsp; if (typeof the433.windir !== 'undefined') windir = the433.windir; node.warn("Temperature: " + temp + "c"); node.warn("Humidity: " + hum + "%"); node.warn("Battery: " + bat); node.warn("Rain: " + rain + "mm"); node.warn("Wind Speed: " + winsp + "km/h"); node.warn("Wind Dir: " + (windir * 22.5) + " degrees"); }

Costs:  Ok of course the hardware for the little ESP board is DIRT CHEAP compared to what I’ve put together – which in turn is cheap compared to one of these all in one boxes – but you pay your money – I’m sticking with https://www.nodo-shop.nl/en/21-rflink-gateway – at under £20 plus £9 for the aerial plus a Mega2560 (cheap from China) I think it is worth it (no I don’t know the company and no I didn’t get samples etc).

The transceiver they supplied costs  £16.51 on Ebay so the board with connectors and the transceiver really is a good deal.  You can of course use cheaper receivers – but the software writer suggests these might be naff. I’d like to hear back from someone who had had GOOD results just using the Mega board (they’re only a fiver from China) and other boards. There is information here on that subject. RXB6 board seems cheap but don’t buy from the UK as they seem to be a rip here – on guy wants nearly £8 inc postage – China for same board – under £2 all in. I’m kind of stuck for testing one of these as I’m off to Spain in a few weeks and chances are it won’t get to the UK in time for me leaving!! Shame as I’d like to have given one a shot on my spare MEGA board.

Summary updated April 2020: The RFLINK setup  made my day by turning my otherwise useless weather station into another working part of my home control – and soon I had buttons all over the place. It also has good range though I think aerial design and positioning could be improved. 

In April 2020 I’ve resurrected this project as I’ve been playing with the good but restricted Sonoff RF-Bridge and this old project came to my attention.. I realised that Antonio and I both bought combined Arduino Mega and ESP8266 boards (cheap from China) so no need to mess with serial as the board uses WIFI (thanks to the ESP8266) and the two chips talk to each other serially – internally. The RFLINK software has not changed but Antonio and I put Tasmota on the ESP8266 side (using Tasmotiser after setting the onboard dip switches accordingly) and telling Tasmota to use the normal pins for serial – and putting in a rule to set the serial baud rate to 57600 baud permanently. So, what we did was:

Flash RFLink and tasmota.bin: https://tech.scargill.net/rflink-and-node-red/#comment-48469

Set tasmota rx and tx pins to their serial function in config – module

Set baudrate on boot with “Rule1 on System#Boot do Baudrate 57600 endon” and “rule1 1”

Incidentally I gave the ESP side the name “rflink” not for any special reason. Here is the only setup you need in Tasmota apart from WIFI and MQTT. Shame the board designers didn’t think to bring out the remaining GPIO pins on the ESP side of that board – you can never have too many indicator lights.

Tasmota setup

After all of that, watching the web console in Tasmota and pressing one of my RF buttons I saw:

20:59:08 MQT: tele/rflink/RESULT = {“SerialReceived”:”20;16;EV1527;ID=048ce4;SWITCH=01;CMD=ON; “}

RFLINK

Above, the combined board and the RFLINK unit complete with Antenna. I’m running the final product on USB – working a treat but it is only using the USB for power – it is sending and receiving over WIFI (MQTT) and I’m running Tasmota on the ESP8266 end.

Antonio suggested these two links…

https://www.instructables.com/id/Arduino-MEGA-2560-With-WiFi-Built-in-ESP8266/

https://iotdiary.blogspot.com/2017/11/esp-link-on-atmega2560esp8266-board.html

Lots of details on the board, on the 8 dipswitch segments on the main board for programming, and in the second link, how to enable an external WiFi antenna.

Facebooktwitterpinterestlinkedin

The post RFLink – 433Mhz Remote Control and Node-Red appeared first on Scargill's Tech Blog.

The Predictable End of Free Apps – eWeLink?

$
0
0

I read today that eWeLink, the app used by Itead for their Sonoff products, is looking to offering a “paid” option. “What!?!” I hear you say? But we already paid for the hardware…

Well, for some time now, I and others have been writing about taking the time and effort to move the likes of Sonoff and other ESP8266-based devices to Tasmota or similar local network-based operation. In my case mainly because I don’t always get 100% reliable Internet – but for others, a mistrust of “the cloud” and in particular the cloud as run by international companies.

Time for reflection

As we all become more and more comfortable with such cloud services, perhaps now during the Covid-19 epidemic (hot on the tail of the anti-EU Brexit) is as good a time as any to think about just how long-term viable this trend to using arbitrary cloud servers is. Will politics start to get in the way of globalisation? Unthinkable? The world closing down was unthinkable in 2019 and where are we now. In Trump’s America there are already import and export restrictions (including technology) against some countries – and much of this has nothing to do with the current epidemic. Will the Chinese goverment always guarantee unrestricted access to their cloud servers for the rest of the world? Even today, an unreserved “yes” answer begins to sound naive. Amazon Echo (example only) as a cute tool is one thing, actually relying on the cloud for heating and security systems is another – and that doesn’t even tackle the hacking implications which themselves are something worth considering.

If Itead decide to go down the paid APP route then perhaps that will be their loss as more of us use the likes of Tasmota to keep access to our devices local – or at least local with VPN options for remote use – I’ve been doing that for a long time now). If they then decide to move away from ESP8266 to chips which do not have third party support… well, for now let’s just hope they don’t do that. I’ve enjoyed a great relationship with Itead (Sonoff products) for years and hopefully long may that live. They would be sadly missed if their cloud was the only way to access their products.

Conclusion

Tasmota and other free, third party software is only going to get easier to use and more comprehensive thanks to Theo Arendts and a small army of supporters. It is absolutely up to the hacker community as commercial IOT companies mature, to ensure that we keep banging the drum for DIY – it is not entirely in the interests of these companies to have us customising their products so they will be putting their efforts into pushing us into relying on their cloud and hence a potential income stream long after selling the hardware, perhaps for years.

Facebooktwitterpinterestlinkedin

The post The Predictable End of Free Apps – eWeLink? appeared first on Scargill's Tech Blog.

T95 MAX+ Android TV Box

$
0
0

I could not tell you how many TV boxes I’ve had over the years. I’ve had ROKU 2 (no VPN, restricted, takes over everything), “proper” “Android TV” boxes with pathetically restricted PlatStore and severe limits on what you can install, through to a range of “full Android” TV boxes and I’ve pretty much settled on the latter, even though in the UK, that pretty awful Sky NowTV app won’t “stream” through these or any other Android boxes I’ve tested.

The title is the T95 Max Plus Amlogic S905X3 4GB RAM 64GB 5G WIFI TV Box and it came from Banggood. As you might know, I’m not interested in WIFI-only sticks as WiFi, specially for HD is invariably inferior to hardwired Ethernet (or even over-the-mains Ethernet if you simply cannot get a wire to the TV). The box does of course have WiFi but I won’t got into that here for the reason I’ve just described..

Ok, so if you look at older entries in the blog you’ll find a number of half-decent boxes including the very pretty, round H96 MAX box, the rectangular low-height A95X box, the A5X Max box, the Windows-based Ace PC – which turned out to be rubbish.. and many more for which I may have made videos or put on a previous version of the blog.

Right now I’m generally using The H5X in Spain and the A95X here in the UK. I was planning to move to the H96 Max when this new T95Max+ turned up. Now, I won’t claim that setup is the easiest thanks to the (typical) crappy remote control, but before I started setting it up in my office where it is now, I fastened it to my 4K TV and watched some of those YouTube 4K and 8K videos – beautiful – the latter clearly scaled down as my TV is able to handle 4K and downwards only. I have to tell you, given the right material, the picture is SUPERB – and to verify it is 4K you merely have to sit up near the TV and watch the edges of the likes of skyscrapers.

In particular, I watched this video – the most stunning 4K footage by Bashir Abu Shakra with Han’s Zimmer’s “Time” from one of my all-time favourite movies “Inception” if this is all new to you – get your 4K on, turn up the volume and be prepared for a treat. The video is incredible, the music was good on its own but coupled Zimmer’s music use in “Inception” it becomes emotionally outstanding and the whole lot works together brilliantly. Even if this TV box is of no interest I strongly recommend both the clip above and the movie Inception itself.

I’ve included a link to Bashir Abu Shakra’s video up here, if anyone gripes I’ll pull it down – let’s hope not. If you have a quality PC and large 4K monitor (I know many of you do) – you will be better off pulling it down from YouTube and make sure you select 4K. If I were selling the T95 Max+ (which I am not) it would be as good a demo as any.

That out of the way, my next question was “and what is this box compatible with?” as so may of these Android boxes won’t work with this, that or the other App. First off, Netflix, then Amazon Video, BBC i-Player (in a browser – full screen – excellent), Movie HD, Cinema HD V2, “Curiosity Stream”, the list goes on… everything I tried WORKS and works fine. I’m not convinced about that remote – I still ended up using a mouse and keyboard to enter credentials but then every box I’ve had has faced that issue and better remotes are dirt cheap.

T95 Max+

Well, there it is, I won’t insult you by attempting to show 4K video footage in a little browser window – you’ll just have to take my word for it that video output is GREAT (for those who’ve been living in a cave (I do from time to time) – 4K is rapidly becoming the norm and even 8K is just starting to emerge.

Don’t forget to check out the link at the top of this entry for the specs of the T95 MAX+

I just spent the night, having now installed the T95 Max+ in the living room, watching first a movie remended me that quality depends heavily on a combination of the source quality, processor and Internet speed and consistancy. The movie quality was disappointing – and as I have 80Mbps Internet and the box is great, it came down to the App providing the movie. Then we decided to spend an hour on the “Curiosity Stream” App – learning about “The networks within our bodies”, in which the kidneys play a major role in determining lifespan (more so it seems than we imagined in the past) – the quality was so good that the fact we were watching a recorded program seemed to fade into the distance as we learned fact after fact about bodily networks. Watching such documentaries in 4K without distraction is very rewarding.

And no, of course this image doesn’t reflect the stunning quality of that particular show – but here it is anyway – I’d put up a vido but I’d rather not get prosecuted, brilliant thought it was, it’s not free.

"The Networks within our Bodies" - Curiosity Stream - viewed on the T95 Max+

Right, enough of that. Now for some WLED and flashing lights and maybe even some sleep.

Facebooktwitterpinterestlinkedin

The post T95 MAX+ Android TV Box appeared first on Scargill's Tech Blog.

Cutting or Bleeding Edge – RGBCCT Lamps and Tasmota

$
0
0
https://www.zemismart.com/gu10-wifi-bulb-alexa-google-home-assistant-ifttt-tuya-smart-life-app-remote-control-rgb-led-light-dimmer-lamp-ampoule-led-gu10-p0052-p0052.html

I’ll let readers decide if we are on the cutting or bleeding edge here. Having received a 6-pack of ZemiSmart new GU10 Smartlamps to test, I went into my kitchen where I have a pair of ceiling 3-lamp non-smart fittings and duly replaced the normal GU10 LED lamps with the new 5W smart lights.

As you will see as this blog develops, the installation turned into a 2-day episode ending with installing Tasmota (free – open source replacement firmware for ESP8266-based switches, sockets, dimmers and Smartbulbs) which as a result resulted in a Tasmota colour-control fix on April 19 and hopefully a minor modification to the Tasmota webUI in the near future – while exposing an issue with the standard cloud-based “Smart Life” offering. Before I get into that, ZemiSmart also have an Amazon link an Alexpress offering.

Bear with me – mid-April 2020 I’m betting enough of you have time to read this entry, comment and hopefully suggest any remaining Tasmota modification to the right people… however at the end of this I had a working installation which will do just fine.

Smart Bulbs in boxes from ZemiSmart - see info in picture

So, a pair of standard 3-lamp fittings, six new smart lights – what could be easier? 5W, 50K hour claimed lifespan, it’s all in the photo above, “Smart Life” App, Alexa, you name it. I put the new lights into the fittings – THEN remembered that to set them up they have to be in SETUP mode – that is, power off-on-off-on-off-on. At this point they flash – but you must install them one at a time (not QUITE so straight-forward when there are three lamps in one fitting – sharing common power) – so – back to the old bulbs.. and ONE new bulb at a time.

Probably better to do this in broad daylight? I loaded up the Smart life APP on my Android phone… I have a free account – I hit the + on the Smart Life main screen to add a new WIFI LAMP. EASY.

Up on the ladders

The next step was (remember, one at a time) to remove the new lamp and replace with another new lamp ( GU10s tend to be a tight fit and this IS the ceiling – and they get HOT – whoever said LEDs run cool was lying).

And repeat – I did 3 lights this way. THEN it hit me – NOT flicking lights on and off at the wall switch is not intuitive to everyone in the house. By now I could use the Smart Life app to turn the lights on and off, select cool or warm white, change colour and change brightness of individual lamps. LOVELY. I left the lights on bright WARM white almost as if nothing had changed, expecting my wife to be impressed that these lights were slightly more pleasing than before I started interfering in her kitchen.

Here’s where I hit a snag… I turned off the lights via the APP, walked away and went to get the other three lights from my home office at the other end of the building.

MEANWHILE, wife notes the lights are off… hits the wall switch – nothing happens. Does that again on and off a couple of times and the new, warm (2300K) super smart lights go into setup mode and immediately default back to horrible, cold (6400k) bathroom white. Credibility SHOT.

Group mode

BUT like any good techie I ignored this slight issue until ANOTHER issue came along. 3 Lights in one fitting. 3 lights which must work as one. And how do we perform THAT magic? GROUP MODE of course – NOT easy – I could not figure it out. Maybe I think the wrong way – but for the life of me I could not turn the 3 lights into a group never mind the issue of a group of groups for colour controlling two of these fittings as one, while allowing independent on-off control for each set of three. Overall I decided, as I often do, that Tasmota was the way to go.

This was all early evening April 18, 2020. I took the lights (£59 a set of 6 at Amazon) out of the kitchen fittings (Back to square one) and retired into my office and started a DISCORD discussion with my Italian pal Antonio which developed into a full blown discussion with others in the TASMOTA forum.

So, I decided that the standard 3-power-cycles setup mechanism for such lights is not the best idea (10 on-off cycles would be safer, trust me) and you probably already know how I feel about being stuck with relying on cloud services – good until the Internet goes off then how do you control the lights?

Solution? Simple – the free Tasmota software… but as it turns out – it wasn’t QUITE so simple…

So, Tasmota – RGB lights controlled via the Tasmota web gui…. looks great, full RSB control including white colour temperature. Theses lights not only have RGB LEDs in them but also WARM and COLD white LEDs.

That worked, but group mode? You might expect two browser images of two Tasmota lights in a group to show the same colour etc. No. To get the two browser images in sync requires a browser REFRESH on the non-controlling window – and even THAT in Chrome requires a plug-in – on the other hand if you are treating them as one – you only ever need to look at the first webUI. Select WHITE control – and then hit refresh, fine, but select a colour, then go to WHITE control and THEN refresh the second browser – and while the WHITE slider updates, the colour slider DOESN’T – I guess the logic being that colour isn’t in use right now – hence the need for auto-refresh if you want to peruse webUIs for each lamp in a group.

So, I figured – what the hell, I’ll be controlling this stuff from MQTT anyway, why worry about the visual WebGUI… so I tried console commands for color (American spelling of course) according to the Tasmota online manual – commands – “color 1” is red, “color 2” is green, “color 3” is blue – but that didn’t work – now fixed (Tasmota 8.2.0.4 as of late April 19, 2020) – thanks to the Tasmota community in DISCORD that got put right quickly. Maybe soon that WebUI visual display will get fixed too.

For controlling lights in Tasmota console view:

dimmer 0-99

(MQTT example: topic: cmnd/DEVICENAME/dimmer payload: 99)

Color: (various ways, 0,1,2,3 etc or #0000000000″ the last 4 digits being white control) see the Tasmota docs for more.

So: color #ff000

Colour temperature is:

ct 152-500 (where 500 is WARM, 153 is COLD).

So – all looking good but once you go down the customisation route you are on your own and in total, out of six new lamps, we had three lamps which simply would not convert to Tasmota correctly over WiFi – so out with the soldering iron, for each lamp in turn, I carefully prized off the plastic front cover and with a fine tip, soldered 5 wires to the PCB at the points marked GPIO, gnd, rx, tx, 3v3 – just as you would expect for any programming of ESP8266 chips.

Success

Six lamps fitted on the ceiling – running together perfectly, no cloud needed and unlikely to be foiled by wall-switch hammering.

Commands needed to set up s group like mine… for each device:

backlog setoption85 1; DevGroupName1 kitchen

The above requires AT LEAST version 8.2.0.3 of Tasmota development branch (elsewhere I refer to 8.2.0.4 which I’m using at the time of writing). I will likely make a Node-Red-Dashboard tab for them – I only NEED full on warm white and a small range of full-one colours in this instance. One slider and one button should do it. Note the template I used in Node-Red (below), the Zemismart template was no good for these as it was put into blakadder’s repository for simpler RGBW lamps, not these, but I soon found a working alternative.

Summary

Success. Wheeeee. I made the FRIENDLY name of the first lamp “kitchen – and enabled Alexa in the CONFIG for the first lamp as” Hue Bridge”.

Minutes later I went into the kitchen and started talking to Alexa.

Alexa… turn kitchen ON
Alexa… set kitchen to MAGENTA
Alexa.. set kitchen to WHITE
Alexa… make kitchen WARM

Obviously I can’t do the right colours here but I thought you might like a little drama. I am chuffed – my first group lighting.

As I write this, the lamps are all working a treat. I just need to think of something creative to do with them. I’m thinking timeouts might be a good idea given my memory. That’s easy in Tasmota. In case you are wondering, in the webUI images above, the top slider handles white colour temperature, the next RGB colour, then saturation and finally brightness.

Facebooktwitterpinterestlinkedin

The post Cutting or Bleeding Edge – RGBCCT Lamps and Tasmota appeared first on Scargill's Tech Blog.

Mosquitto on Raspberry Pi 4

$
0
0

I currently have The Eclipse Mosquitto MQTT broker running on the Raspberry Pi 2, 3 and 4, Buster Raspbian, not to mention countless other variations of Debian and Ubuntu on various boards used at one time or another in the past (Orange Pi, various FriendlyArm boards and far more).

Below is the link I originally followed for the install – Mosquitto has been part of my standard install using “the script” for a long time – (last update April 2020). See my Bitbucket area and other parts of this blog for more on “the script”. I still use the Mosquitto broker having looked at several alternatives – the MOSCA Node-Red broker didn’t go anywhere – meanwhile, Mosquitto IS ready, works perfectly and it is also free and easy to use – I use it 24-7 in my own RPi4 installations here in Spain and in the UK, not to mention countless installations I’ve helped put together for others.

I started running Mosquitto on RPI2, then RPI3 and now RPI4. As an alternative to Mosquitto you could now take a look at node-red-contrib-Aedes – no other installation needed (you can also use Aedes alongside Mosquitto on a different port – just put the Aedes node somewhere on one of your pages and adjust the port number – then use the normal MQTT nodes to access it). I used npm to install it but apparently it installs for others through the Node-Red Pallette Manager.

This blog entry has been constructed over time going as far back as 2015…

http://jpmens.net/2013/09/01/installing-mosquitto-on-a-raspberry-pi/

I simply installed the repository then Mosquitto itself, nothing more.

This installation put a non-personalised config file at /etc/mosquitto – so in there was pointed to the directory /etc/mosquitto/conf.d  – so I put my mosquitto.conf in there which was basically 2 lines…

allow_anonymous false
password_file /etc/mosquitto/conf.d/passwords.txt

I’ve not yet put SSL in there but I certainly wasn’t going to start up the broker with NO security.  I added a simple text file passwords.txt as above with a one-liner admin (colon) password where the password is encrypted using the Mosquitto password program for the PC (thankfully I already had a passwords file).

And that’s it really, stop the broker and restart it to make sure it takes notice of the config file..

sudo /etc/init.d/mosquitto stop
sudo /etc/init.d/mosquitto start

And talk to it via something like MQTT SPY – subscribe to any old topic (“testing”, in my case) and try publishing to that topic. I’ve tested powering down and back up and all is well.

Easiest thing I’ve done all day.. oh, NO it wasn’t – I could not write to the etc/mosquitto/conf.d directory  – the usual Linux security issues….  I did this.. most likely giving FAR too much access (if anyone wants to tell me what it SHOULD be, please do but don’t let’s get complicated)…

sudo chmod 777 ./conf.d

and from there on I could use my FTP described earlier and Notepad++ to create and edit the necessary files.

Facebooktwitterpinterestlinkedin

The post Mosquitto on Raspberry Pi 4 appeared first on Scargill's Tech Blog.

Viewing all 1390 articles
Browse latest View live